start	end	text
0	4700	So, welcome everyone to our talk, Leveraging AI for Smarter Back Bounties.
4700	9960	First of all, thank you to DEF CON and the Back Bounty Village for giving us this space
9960	16720	to discuss how AIs can improve and change the security field and the back bounty space.
17080	23360	And we are going to be discussing how AIs can improve our daily job and help us work on what we want
23360	27060	and also let the AI take care of other stuff.
27060	34100	So, his name is Diego Jurado, I'm Joel Nogueira, we are both security researchers at Expo.
34140	40520	For those that don't know us, we have been quite a while in the back bounty scene.
40840	47280	And apart from that, we have been also working for several years in some well-known companies
47800	51900	in the security industry as security researchers and testers.
51900	55820	So, let's start from the very beginning.
56300	62860	When we started this three months ago, we started looking at their main...
62860	69140	In the recent years, we have seen a lot of research being published about people hacking AIs, right?
69140	75820	Like, people doing research about publishing how to force the AI to do unexpected things,
75820	77760	to leak information, etc.
77760	82620	However, there is one particular realm that remains unclear regarding AIs,
82620	86320	and it's how AIs could be used in a more offensive way.
86640	92940	In other words, it would be the AI hacking for us and taking care of some stuff that we could do.
93780	100300	So, we started three months ago, and we don't know where the limit is for this technology,
100300	106520	but we wanted to show you one quick example of the things that an AI agent could do on our field.
108140	113220	So, first of all, we are going to be talking about different questions, interesting questions,
113220	118420	that we have been encountering while doing this journey.
118880	123640	And this is one of the first ones, and it's how can AIs mimic human bounty hunters.
123640	128580	But in order to understand what a bounty hunter, what a human bounty hunter means,
128580	131740	we need to first understand what it is, right, for us.
131740	139620	So, humans have several skills and capabilities that we hardly see on the tools that we use in our daily job.
139800	147340	And some of them are intuition, creativity, decision-making, based on the experience that we have collected before.
147340	152620	For example, if we learn something doing bounties, this is something that we are going to apply in the future
152620	154960	to keep improving and getting better results.
155840	159780	So, let's try to answer this question with a demo.
159780	169000	In this case, we are going to see our agent exploiting a JWT Python implementation for this particular CVE.
169640	175000	During the video, you are going to see the AI interacting with the web application,
175000	179920	performing, executing commands, processing the outputs, taking decisions,
179920	184560	and creating goals and learnings based on what it sees and learns during the process.
184560	189880	All it takes for this is just a small description or goal and the target that we want to test.
194100	198800	So, I'm going to pause a little bit here, just to show you a little bit of the interface,
198800	201060	because it's the first time you are seeing this.
201520	210400	So, on the first part, you are going to see what we give to the AI, just that we want to exploit that CVE and the target.
210400	217680	Then, you can see the things that the AI is processing, analyzing, and the decisions and learning that it's taking.
218100	224100	Then, you can see the commands and the output, and the goals that the AI is generating all by itself.
224100	225820	We have no influence on that.
226800	232360	So, first of all, we start with the basic recon, and recognize that there is a register endpoint.
232400	235960	So, it decides to attempt to register a user.
235960	241980	And in this case, it tries to use a content type JSON, which is grown and expected for the website.
242220	247660	So, it learns that based on the response, and decides to change that to use the correct content type.
247840	259900	In this case, we register a new user, and here on the bottom, you can see that the agent is logging in and saving the cookies on a cookie jar to use it later during the whole thing.
261480	266320	Once logged in, it detects on the response that it has a JWT token.
266320	274760	So, it immediately binds this to the goal that we have provided, and decides to go to the internet to look for some public information and public exploits.
275020	280940	It tries NIST and GitHub, and in GitHub, it finds one match that is a possible proof-of-concept.
280940	289700	So, it decides to download the proof-of-concept, and you can see that it's going to cut the readme file.
289700	296040	This is something that we always do, right? We want to understand how this exploit works, and we need to learn how to use it.
296240	301280	So, it's going to try to grab the token and run the exploit, but it makes a mistake.
301280	306360	It's running in an incorrect path. Who hasn't been there, right? Like, running in an incorrect path for an exploit.
306840	313540	So, now that it learns, we define where it is, it runs again everything, and it finds that there is one missing dependency.
313540	320760	So, it goes ahead and installs the dependency and runs again the exploit, changing the claimed username to admin.
320760	323980	This is a small detail that we are going to talk about later.
323980	330000	Then it starts trying the different payloads that it's getting from the exploit against the whole application,
330000	334840	changing from logging to registration to see where this exploit works or not.
334840	342600	And at some point, this works on the root page, so the AI realizes that it has been logged as the admin user,
342600	345880	and successfully retrieved the flag from the challenge that we have proposed.
349610	364420	So, during this video, we have seen some of the things that we mentioned before about humans and tools that we use every day.
364420	369280	We have seen some creativity, learning from mistakes like identifying the incorrect path
369280	374880	and taking a decision to decide where to execute the exploit.
374880	380360	But most important, we have seen the capability of the AI to adapt into different situations.
380360	386300	We have seen the AI registering a user, changing the content type to adapt to what the application expects,
386300	394880	using the credentials that it just created, and then interacting with authenticating endpoints based on all the things that it has learned.
395560	402760	And something that really is interesting is, for example, things that we do like cutting the readme for an exploit,
402760	405140	reading the Python code to understand how it works.
405140	410600	There are probably simple things for us, but when we talk about something that is going on all by itself,
410600	414080	and it's reading the code and understanding the input, the output,
414080	419760	and also the claims that we need to modify from the JWT token, it's super interesting.
420080	426320	And most interesting, probably, is that if you are familiar with DCP, there is no Nuclei template for this.
426380	429960	And if you wonder why, it's probably because you first need a valid token,
429960	434120	which would mean you have to register, sign in, and retrieve that token.
434120	439840	Automating, automatizing that for every existing application on the Internet would be quite a challenge.
439840	444460	In this case, the AI takes care of all that and makes progress on that goal.
445640	452500	So in order to understand how we got here, we have to first understand where we were three months ago when we started.
453340	461420	We started looking for different papers, white papers, that were trying to use agents in a more offensive way.
461420	466580	We found a few of them, not many, but when we started looking at the results,
466580	474080	they all have different approaches. One super common was the human-in-the-loop,
474080	479100	that is the human providing real-time feedback to the AI in order to improve the results.
479100	482080	Others have full automated agents, like the one you are seeing.
482080	488980	Others have super specific agents where they were in charge of different tasks.
489040	494060	And some of them were trying to exploit known vulnerabilities or other types of CTF challenges.
494060	499100	When we started looking at the results, for example for this paper,
499100	505400	actually one of the authors of this paper, Brendan Dolan-Gavitt, is one of our colleagues at Expo,
505400	510600	on this paper they were trying to use LM agents to solve CTF challenges.
510600	514960	If you see in the categories, they attempt to work with all of them,
514960	521200	but probably if we pay attention to the web one, which is probably the most interesting for us as bounty hunters,
521200	526480	the results are not that promising, right? It's 16% just for one model.
526560	535480	So we keep digging into the different papers and we found another one that had more promising results.
535480	540680	In this case, they were trying to use LM agents to exploit one-day vulnerabilities.
541220	546400	When we look there, we see an 87% and that's quite exciting and promising,
546400	553140	but when we start reading the results and the details, we see that if you remove the CV description
553140	558280	that you provide to the model, that 87% drops dramatically to a 7%.
558280	562740	So again, the results weren't that promising in this case.
564140	570920	So as a conclusion from the state of art, the results weren't good at all for models three months ago.
570920	576160	All the cases weren't complex enough. For example, they were based on particular cases,
576160	582800	like the exploit being just one, two lines, or just requiring two requests to forcefully exploit it.
583000	587140	And something that they have in common is that they were all limited.
587140	591500	For example, this last paper only had 15 CVs on their paper.
591500	598080	So when you try to scale this to the real world, you don't know how this is going to be expanded, right?
598080	601580	So we wanted to change things and scale things up.
603700	608940	Okay, so now let's talk about the approach that we had at Expo.
609000	612440	As Joel was saying, we wanted to scale things up.
612440	619580	So the first thing that we did was starting collecting thousands of benchmarks from different CTF competitions.
620060	624860	We also partnered with some companies that you may know, like Postfigure and Pentester Labs.
624860	630280	So they provided to us all the exercises that they have online, and we added to our benchmarks.
630660	636620	Also, we wanted to collect the most interesting and realistic challenges that we can find.
636620	639340	And of course, with a great focus in web applications.
640740	647940	Also, apart from that, we had to categorize all the challenges, depending on the level of difficulty, from easy to hard.
647940	656760	And we also, something really important for us, we created a fully autonomous agent, which is connected to an attack machine.
656840	667420	And this attack machine not only contains a lot of pentesting tools, but we also added some tools that we use on our daily basis for bug bounty, as we have a lot of experience using them.
668540	676260	And apart from that, one thing that is also very important, we wanted to analyze the performance of our solvers.
676260	681260	So for that, we created an exclusive set of more than 100 novel benchmarks.
681380	684020	These benchmarks are used for validation.
684200	693420	And as we are completely sure that the solution is not part of any training data set, we can also evaluate how the AI is performing.
695260	699300	And here are the results that we got after three months of work.
699420	705120	As you can see, Expo was able to solve 75% of the challenges from Postfigure Labs.
705120	708540	72% of the challenges from Pentester Labs.
708620	710800	And all of that without any human interaction.
710860	716040	So all the exercises that we were able to solve were completely solved by the AI.
716480	724180	Also, something really important, talking again about the novel benchmarks, we were able to solve 85% of those.
724180	728200	We tried to create these challenges as more representative as possible.
728200	731820	And now we are going to see how these challenges were created.
733380	740540	So here you have a tree map with a distribution of some vulnerabilities that we added to our benchmarks.
740900	748560	As you can see, we tried to be as more realistic as possible, trying to follow a distribution similar to what we see in bug bounties.
749600	760960	So you can see here that we have cross-site scripting and IDORS, which probably are one of the most common issues and vulnerabilities that we see when doing bug bounties, and especially in lifehacking events.
760960	768600	But we also have some vulnerabilities like server-side rigorous forgery, common injections, privileged escalation, and also some CVEs.
768600	774340	So we tried to follow a very good distribution to cover all the areas and all the vulnerability types.
774880	780240	Also, just in case someone is interested, we are going to share all the benchmarks that we have.
780240	787560	So we are planning to publish them in a few weeks, just in case you want to test them against your own agents.
787560	793060	So just keep an eye to our social media and website, as we will be sharing those over there.
794340	802100	And here we have some statistics about the success rate that we have, depending on the category.
802100	810020	We tried to follow a similar category to what we have in OWASP, which is a reference for all of us that we are doing web pentesting.
810520	816200	And as you can see here, for some kind of categories, the AI was performing better than others.
816200	824020	So let's say, for example, for broken authentication, we can see that OAuth and SAML were performing not that well than in other examples.
824060	829560	This is something that we will be talking about later, but we are trying to increase this success rate.
830080	833800	But for example, for broken authentication, we have very good success.
834120	839760	And again, we are failing in CCRF tokens and CCRF issues.
840240	844920	And we have some examples of injection vulnerabilities, which, of course, you all may know.
844920	853620	Again, we are failing in DOM XSS. This is basically because at the beginning, when we started doing our agent, we were missing an embedded browser.
853620	860280	So the agent was not able to exploit some issues that requires exploiting something in the browser or in client-side.
860280	864760	So this is something that we have improved now, and I think we will be talking later about this.
866140	873800	And then finally, some misconfiguration issues that, as you can see here in cache poisoning and cores, is something that we still need to improve.
873800	880800	I was really impressed about the blind XSS because it's not something really easy, and we had a very good success rate.
881200	889460	And then talking about the success versus difficulty, we can see that we perform really well for easy and medium vulnerabilities.
889460	894260	We have almost 90% from all the benchmarks that we are talking about now.
894260	902040	Just to clarify, these statistics belong to Portsweiger, Pentester Lab, and our own validation challenges.
902040	909380	We also have some other benchmarks that we use for training and that all, but here we are only including those three that we were talking before.
909620	917640	And then for hard vulnerabilities, we can see that we have 40%, so yeah, of course we are going to try to improve that.
918720	926220	And now, here you can see some examples about some vulnerability types that you can see there.
926220	937020	And we have one question for all of you. So, for those examples that you can see here, I would like to ask you if you think that there is any case that the AI was not able to solve.
937320	941040	So, somebody has any idea? Any number?
942960	946900	I will give you some seconds so that you can read all of them.
948160	951680	Which one? Seven? Okay, yeah.
951680	957500	So, this was a tricky question because in the end, the AI was able to solve all of them.
959400	967340	You can see that in our website, we have already shared some of those examples. For example, the Node.js one, the first one, the IDLE.
967340	972580	But now we don't have time to see all of them, but we want to show you three of them.
972580	981000	So, we are going to start with the reflected XSS. So, for the people that like exploiting this issue, you will like this example.
981840	985000	In this example, the goal is to exploit an XSS.
985720	993040	We have some sort of server filtering in place. So, you will see the AI trying to train some default payloads.
993040	996480	Then you will see that it tries to use some kind of encodings.
996480	1004060	And finally, after realizing how is the way to exploit it, he managed to exploit it using HTML entity encoding.
1004120	1006600	So, let's go to the example.
1007240	1009580	Yeah, let me update this.
1010100	1014380	Okay, so here you have an example of our agent working.
1014480	1023120	So, this is basically how it looks when we try to provide a challenge with a description and we just say, okay, go ahead and hack it.
1023120	1027400	So, let's go up to see to the very beginning what we have.
1027440	1031620	As Joel was mentioning before, we have the description of the challenge.
1031620	1037920	In this case, we are only providing the goal to execute an XSS with the string XSS in capital letters.
1038060	1041440	And we have also information about the target that we want to exploit.
1041680	1047800	So, if we go a bit down, you can see that first it starts accessing to the web application.
1047800	1054960	It finds an endpoint which is XSS20 and then realizes that there is a potential vulnerable parameter.
1054960	1058520	So, now it starts trying with a typical payload.
1058760	1062860	And it realizes that it fails because it's getting a 405 error.
1062860	1066020	This is because it's trying to perform a POST request.
1066280	1071820	If we go a bit up to the previous output, you can see that there is a form which has no action.
1071820	1078640	So, first it will try it with a POST request and then realizes that it's doing bad and changes to GET.
1078640	1080540	And tries again with the same payload.
1081320	1088460	So, if we go a bit down, we can see that the first thing that the AI does is identify that there is one character which is being blocked.
1088460	1094820	So, this is something really important, especially when we want to face, for example, bypassing a WAF or something like that.
1094820	1096920	We want to know what characters are being filtered.
1096920	1101280	So, this is something that the agent is realizing by itself and is really interesting.
1101280	1104440	Then here is something that is really important.
1104440	1109420	It fails while trying to craft a request within a space.
1109420	1112320	So, it realizes that the current request is bad form.
1112320	1121300	So, then changes, tries to encode the payload and tries again, which is something that maybe we can see when we are trying to do a bounty.
1121400	1124820	And then, let's go a bit down.
1124820	1130900	Here you can see that after trying a couple of payloads, it realizes that it's not able to find a good solution.
1130900	1132960	So, it tries to change from context.
1133140	1139440	At this point, tries to analyze again the application, but then it sees that there is nothing interesting apart from that.
1139440	1146660	So, again, gets the initial goal to exploit the XSS and goes again to try and exploit with different payloads.
1147080	1162480	Again, if we go a bit down, we can see that, again, changes from the initial goal and starts trying to see if it can fuzz the application, trying to do some brute force, and trying to see if it can find any additional endpoint that might be vulnerable.
1163400	1166480	Again, it says, okay, this is not the way to go.
1166480	1168660	So, start again with another payload.
1168780	1178160	And there's one point when it realizes that he's able to bypass the filters by using HTML entity encoding with JavaScript string manipulation.
1178160	1183160	And then, after a few attempts, it managed to get a payload that is working.
1183160	1185520	You can see all the encoded output.
1185740	1192760	And if we go to the response, we can see the alert and the flag of the challenge who has been retrieved.
1193660	1196160	So, yeah, that was our first example.
1197700	1198740	Thank you.
1202450	1207330	If we go to the next one, here we have an image of loader vulnerability.
1207590	1211750	We know that we have some extensions that are being filtered by the application.
1211850	1218710	So, one thing that is really interesting in this example is that Expo has to deal with some CCRF token and session cookies.
1218710	1222570	You will see that it struggles with that because it's something that we have to do manually.
1222570	1228930	So, after that, he managed to log in the application, then tries to upload a PHP web shell,
1228930	1235550	plays again with some extensions until it finally exploited by uploading an htaccess file.
1235570	1237650	So, let's go to the next example.
1241500	1243560	Let me update this one.
1244160	1244880	Okay.
1245120	1250020	So, here, in this case, you can see, again, the trace working.
1250020	1256660	We can see that in this description, which is a challenge from Perswiger, we have a very detailed description.
1256660	1261760	So, the first thing that says is that we have to exploit, again, an image of load function.
1261760	1269100	It says that, in this case, the goal is to exploit and retrieve the content of the secret, which is inside the server,
1269100	1272600	and then also provide some credentials that you can use for authenticate.
1272600	1277120	So, the agent will take all this information and, from that point, will start working.
1277120	1281700	So, if we go a bit down, you can see, again, that it starts to access the application.
1281920	1285160	It sees that there is some redirect, so it follows that,
1285160	1290340	and then tries to use the credentials to authenticate that were provided in the description.
1290720	1294220	At this point, it sees that it's missing a CSRF parameter.
1294380	1297820	So, in these old comments, I'm going to scroll again.
1298380	1305480	It will start to understand how the CSRF token works, how it has to deal with that part, which is new to him.
1305480	1311300	And, finally, after playing around with session cookies and playing around with the CSRF token,
1311300	1316100	there is a point where it realizes that, OK, I'm going to do this in only one step.
1316100	1320180	So, it creates this bash example with first access to the login page,
1320180	1324540	retrieves the session cookie and the CSRF token to have that updated,
1324540	1329440	and then, for that point, uses that to login into the application with the provided credentials.
1329580	1334020	And, finally, as you can see here, we access to the application.
1334020	1337740	OK, so we are now this user winner with this session.
1338120	1341140	OK, so now the next point is trying to upload the web shell.
1341140	1346280	So, it will try to go and create a PHP file. It fails.
1346280	1351900	We are getting some errors here in the output, as you can see here, like PHP files are not uploaded.
1351920	1354300	So, that tries again with a double extension.
1354340	1360240	If we go and scroll a bit, we can see that, eventually, we'll try with another extension, phtml.
1360240	1364820	And then, finally... sorry? Oh, yeah, sorry.
1365360	1370020	And, after that, we see, which is really, really important and interesting,
1370020	1373580	is that it tries to upload an HT access.
1373580	1380780	In this case, what it's trying to do is it's trying to get any image file that can execute PHP code.
1381300	1384820	And I ask you here, how many times we were doing like a pen test,
1384820	1387500	and maybe we forgot of doing or trying these kind of things,
1387500	1390940	like loading an HT access to see if we can replace that,
1390940	1397200	and we can execute PHP code in an image file, which, at the beginning, was filtered.
1398040	1400920	And, yeah, after that, it just accesses the application.
1400920	1402460	It tries a couple of times.
1402460	1407000	Sorry for doing a scroll, but I don't want to waste too much time on this.
1407200	1410600	So, eventually, let's go to the final one.
1411300	1416820	Yeah, here we can see that, after uploading the PHP file,
1416820	1420280	it can execute this command, access to the secret key,
1420280	1425820	and then submitting it to the submit solution, which is over here.
1425820	1428420	We can get the flag.
1435870	1440970	So, something interesting about all these cases is that the AI is also being able to take goals,
1440970	1446410	like exfiltrating this file, submitting the secret to the endpoint to get the flag,
1446410	1450550	and all these kind of details are things that we are not used to seeing in any tool,
1450550	1454790	or even if we want to test some particular functions of a web application,
1454790	1458370	that's also super interesting to see, and it's able to manage.
1458790	1462670	So, now, the last example that we are going to see,
1462670	1467430	and then, after that, we are going to see some experiments that we have done,
1468310	1474730	is this is a super interesting case, because we have provided no goal to the AI in this case.
1474730	1479910	We are going to see that we are going just to present a typical, random text,
1479910	1483930	as in any CTF, that makes no sense and just confuses you,
1483930	1485810	and the target.
1485810	1491110	And the AI will start exploring the web application, and trying to pursue that goal, right?
1491110	1494270	Because since it doesn't have a goal, it needs to find out what to do,
1494270	1495850	and how to hack the website.
1498350	1500510	So, let's go to the challenge.
1501570	1503370	Let's refresh this.
1503370	1506870	And, as you can see, the description is,
1506870	1510490	saggy quack quack, try to quack me, that makes no sense,
1510490	1513600	and any of us doing a CTF will be confused,
1514090	1516870	and we also get some information about the target.
1518150	1523090	Based on that, the agent understands that this is a CTF description,
1523090	1526990	and pursues to go and start doing some recon on the web application.
1527490	1530210	So, first of all, access to the route,
1530210	1532370	then to a login website,
1532370	1535410	and notice that there is some JavaScript file.
1535410	1538910	So, decide to go and analyze the JavaScript all by itself.
1538910	1543190	We're going to see that this behavior is repeated during the whole trace,
1543190	1545830	because every time that it's detecting a new JavaScript,
1545830	1548150	it's reading and understanding that file,
1548150	1550490	to improve the knowledge about the application,
1550490	1554590	and keep digging deeper until it finds some particular goal to exploit.
1555150	1558250	So, once it learns about the login,
1558250	1561210	it's going to test some test test user,
1561210	1564450	as we always do when doing appendix to see how it behaves.
1564450	1565690	Of course, it doesn't work,
1565690	1568110	but the application understands that the login is working.
1569010	1573590	So, after that, try some basic payloads for SQL injection.
1573870	1576870	Doesn't work either. We get the same message.
1577430	1579850	And now we craft just a quick Python script
1579850	1582230	to do some default credentials for the admin user.
1582230	1584530	Just trying some few well-known passwords
1584530	1588910	to see if anything of that is a low-hanging fruit that can get quickly.
1588910	1591250	None of them work, of course.
1591310	1595270	So, it decides to move on and try NoSQL injection against the login.
1595750	1598050	Doesn't have lag anymore.
1598310	1602750	So, decides to just try some JSON parameter injection
1602750	1606890	to see if also can get some unexpected behavior on the application.
1607690	1609070	It didn't work either.
1609170	1612550	So, now it decides to go to the initial recon and say,
1612550	1614790	okay, let's see what other endpoints we have.
1614790	1618430	And it realized that there was one endpoint called post create.
1619150	1621110	When it tried to access this endpoint,
1621110	1622970	it realized that it requires authentication.
1623550	1627850	And in this application, the main feature is that users can create posts
1627850	1629390	like in any social media.
1629390	1634570	So, it decides to go to the endpoint for register an account.
1634570	1636650	Again, as we have seen in other examples,
1636650	1640110	it's going to access the endpoint, read the JavaScript file,
1640110	1643450	understand how the form works to register an user,
1643450	1645970	and it's going to try to register a test user.
1646650	1649370	This works, and the user is registered.
1649590	1652290	So, now we move on to, again, use those credentials
1652290	1655550	and keep getting more access to the application
1655550	1658030	and perform some authenticated tests.
1658790	1660330	If we scroll a little bit down,
1660330	1663470	we are going to see now that it tries to access again to this endpoint
1663470	1665070	providing the cookies.
1665990	1669030	This endpoint works, retrieves the JavaScript file,
1669030	1670850	gets more information about the application,
1670850	1676250	and now decides just to do a simple post, like we always do,
1676250	1677430	like we are just in the website.
1677430	1680850	We want to learn how the application behaves.
1680910	1683350	So, this works. It creates a post.
1683530	1687050	So, now it knows, based on everything that it has written
1687050	1688590	from the HTML and JavaScript files,
1688590	1692790	that all the posts can be accessed on this endpoint for the test user.
1692870	1699830	So, when it accesses, we can see here the post being printed.
1699830	1701310	But also, if we pay attention,
1701310	1703770	we are going to see that there is a report to admin feature
1703770	1706350	that is at the bottom here.
1707110	1709770	And this is super interesting because now the AI is realizing
1709770	1711510	that there is a report to admin feature
1711950	1714850	and it has found a potential attack vector.
1714850	1716810	At this point, we didn't have any goal,
1716810	1719590	but now the AI understands that there is an admin user
1719590	1722090	that could potentially be reviewing the reports,
1722090	1725310	so it decides to go ahead and try some exploits on payloads
1725310	1728090	to see if it can force any type of interaction.
1728090	1729710	Remember that this is a CTF,
1729710	1733090	so it's expecting to have something to leak or to exploit
1733090	1734630	in order to retrieve the flag.
1735730	1738310	So, once it learns how it works based on the JavaScript,
1738310	1742470	it's going to just do a report of this case
1743050	1744930	to see if it works. It worked.
1744930	1748030	So, now it decides to start collecting more information
1748030	1749910	for one of the final payloads
1749910	1751690	and creates a super interesting script
1751690	1753970	because, in this case, it's taking care of everything.
1753970	1755610	It's creating a new user.
1755610	1758890	It's reusing those credentials to login in the application,
1758890	1760410	then grabbing the cookie,
1760410	1762930	setting a payload for a client-side exploit
1762930	1765830	to try to send some fetch requests
1765830	1767590	to our collaboration server.
1768030	1769390	Another interesting case of this,
1769390	1771010	understand what the collaboration server is
1771010	1773050	and how to use it, how to interact with it,
1773050	1774290	and use the payloads.
1774290	1776250	And then we'll create just the post,
1776250	1779370	trigger the report, and then wait for some interactions.
1779450	1781750	Of course, it's five seconds because it's a CTF.
1781750	1784830	We expect some kind of quick interaction in this case.
1784830	1787050	Again, it tries a different payload
1787050	1790250	to see if it can trigger any interaction.
1790730	1792090	Something interesting here is that
1792090	1793470	it's not creating the user anymore
1793470	1795390	because it understands that it already has this.
1795390	1796930	So, it removes that part from the script
1796930	1799670	and keeps improving it to make better results.
1800130	1801410	It doesn't work neither,
1801410	1802950	so it goes on to try one more time
1802950	1804470	with a different payload.
1805150	1807510	And again, sending the DOM of the application
1808390	1810450	for the admin user, it sends it,
1810450	1813370	and after that, it gets that interaction
1813370	1815910	on the Interact SH server that we have.
1816190	1817710	And it's super interesting to see that
1817710	1819210	it understands that this is an interaction
1819210	1821630	for an admin that has access to the website
1821630	1824330	and is able to retrieve the whole DOM of the application.
1824630	1827610	And if we try to search for the flag...
1827610	1828530	Oops.
1829350	1831770	Well, like the flag, we are going to see
1831770	1834570	that all this here is URL encoded,
1834570	1836170	but this is the flag that has exfiltrated
1836170	1837990	from the DOM of the admin user.
1838070	1839330	With that, the AI understands that
1839330	1841170	the challenge has successfully finished
1841170	1844190	and has everything it needs to complete the challenge.
1852810	1856390	So, too many examples and too many scrolling,
1856390	1858650	so now let's jump to something different,
1858710	1860010	a different experiment we did,
1860010	1862190	and it's to know if can AI be compared
1862190	1864050	to human pen testers.
1864730	1865990	So for this, we did an experiment
1865990	1868170	that you may have seen in the Internet
1868170	1870710	that we published some of the results.
1872550	1874330	And here on the screen,
1874330	1877590	you are going to see both terminals,
1877590	1880110	one screenshot is the pen tester working
1880110	1882450	and the other one is the AI working at the same time,
1882450	1884130	trying to solve the same challenge.
1884650	1885930	Something interesting about this case
1885930	1887030	is that you are going to see images
1887030	1889830	because now we have built in a new browser
1889830	1892830	for the AI so it can understand buttons,
1892830	1895290	everything, and more JavaScript application-based,
1895290	1896870	so it improved the results a lot
1896870	1898710	on the client-side applications.
1899190	1901250	And if you keep tracking the numbers,
1901250	1904210	you are going to see that after the AI finished
1904210	1906950	in four minutes, the pen tester is still struggling
1906950	1910290	in 20 minutes more to exploit this vulnerability
1910290	1911870	and this challenge.
1912170	1914450	So for this, we hired five pen testers
1914450	1915670	from different companies,
1915670	1917830	going from junior to principal.
1918270	1920830	We gave them 40 hours to solve
1920830	1922330	all of the validation cases
1922330	1923710	that they were able to solve
1923710	1926110	from our validation set.
1926110	1928550	They could use any tools, no exceptions.
1928550	1929910	They could do whatever they want,
1929910	1931670	just a real CTF.
1933130	1934950	The thing is that...
1934950	1937130	Well, I'm just going to let it continue
1937130	1938550	just a few seconds so you can see
1938550	1939910	how the AI has finished
1939910	1941610	and the pen tester is still working
1941610	1946750	on the challenge up to 19 minutes, approximately.
1947290	1950190	So the results from this experiment
1950190	1951170	were quite interesting
1951170	1953510	and let us understand much more
1953510	1955130	of how these things work
1955130	1957290	and how it can be applied to our field.
1957550	1959450	So on this chart, you can see
1959450	1962070	how Expo behaved,
1962070	1964270	obtained the same results as the principal,
1964270	1968010	both solving the 85% of this challenge
1968010	1970330	from the validation set.
1970710	1971910	And on the other chart,
1971910	1974290	you can see their resolutions,
1974290	1976770	percentage made by difficulty.
1976990	1979210	And if you pay attention to the easy and medium,
1979210	1980770	you are going to see that the AI
1980770	1983150	excels the human pen tester
1983150	1984910	and performs better results.
1984910	1987470	However, as was mentioned before,
1987470	1988730	for the hard challenges,
1988730	1990130	the AI is struggling a little bit more
1990130	1993310	and those cases require more creativity,
1993310	1995930	alternative thinking or more careful process.
1995950	1999010	The human excels in those cases.
1999010	2001230	So this gives us a huge hint
2001230	2003590	about how this can be applied to our field,
2003590	2006150	where we can imagine a place
2006150	2008790	where the AI is taking care of all those things
2008790	2010250	that are less interesting for us
2010250	2011970	and leaving the human experts
2011970	2015170	the work of working on the more exciting parts
2015170	2017830	or more challenging parts of the application.
2021720	2022580	Okay.
2023180	2025060	And now we go to our last question
2025060	2026540	for today.
2026700	2030460	So can AI actually be our second brain or assistant?
2030620	2033100	So we know that AI has been
2033100	2035840	very used in multiple contexts.
2035840	2037060	But we haven't seen before
2037060	2039300	how we can use the AI
2039300	2041300	to assist a serpent tester
2041300	2043040	or a backhunter in this case.
2043040	2045300	All the people are interesting here.
2045300	2047140	So for this meaning we use
2047680	2049220	something called human in the loop
2049220	2051700	we have been talking about before.
2051700	2052860	So here we have a prototype
2052860	2055180	in what we wanted to do
2055180	2056300	is basically analyze
2056300	2057640	how we can use AI
2057640	2060060	to perform better
2061080	2063120	the work of the human.
2063480	2064100	Okay.
2064520	2066520	So yeah, here is a small video
2067220	2069780	which just let it run.
2069780	2070480	But basically
2070480	2072400	what we wanted to create was a prototype
2072400	2075360	that basically will provide some goals.
2076380	2078140	Apart from that goal,
2078140	2079360	what we can do is
2079360	2081080	provide some feedback to the AI
2081080	2082800	so we can change the workflow
2082800	2084140	and how it works.
2084140	2086820	So for example, if we are analyzing how the AI is performing
2086820	2089120	and what kind of stuff it is trying to do
2089120	2090460	we can go in the middle
2090460	2093800	and we can try and change that workflow.
2093800	2094660	So for example, if we see
2094660	2096540	that it is trying to execute a command that is FAD
2096900	2098040	we can modify that
2098040	2100920	and let the AI interact and continue with that.
2100920	2102260	Also, if we see that for example
2102260	2104660	it is trying to exploit an SQL injection
2104660	2106800	and we see that it is missing some payloads
2106800	2108440	or it is missing some entry points
2108440	2111720	we can also provide that as part of the learnings
2111720	2113880	and we can say to the AI
2113880	2114860	that it has to be
2114860	2116920	and follow that right path.
2116980	2118840	So this is just a prototype, an example.
2118840	2121620	This is not something that we are pretending to sell
2121620	2122800	or anything like that.
2122800	2125200	We just wanted to see how we can interact
2125200	2128060	with the human in the loop.
2129680	2131340	So let's skip this one.
2132060	2132860	Okay, and now
2132860	2134240	to sum up
2134680	2137040	we are going to be reviewing again
2137040	2138700	the three questions that we have been talking
2138700	2140480	before.
2140520	2142000	So for the first question of all
2142000	2144760	if we can mimic human backhunters
2144760	2146300	Okay, we have seen that
2146300	2149100	the AI is surprisingly good for some examples
2149100	2151020	especially the easy ones
2151020	2151860	and the medium ones.
2151860	2153360	But depending on the difficulty
2153360	2156580	we have to improve the performance.
2156780	2158300	Then, talking about
2158300	2160860	if we can compare human pen testers to AI
2160860	2163020	as Joel was talking before
2163020	2165460	expert human excel at creativity
2165460	2167920	and are really good at hard challenges
2169540	2171560	But yeah, the AI is faster
2171560	2173380	and better. We saw in the example that
2173380	2175880	we provided like five pen testers
2175880	2177400	we gave them like 40 hours
2177400	2179820	and the AI was able to solve all of them
2179820	2181540	in just 30 minutes.
2182160	2183260	And if we talk about
2183260	2185640	if the AI can be our second brain
2185640	2187480	or assistant, this is something
2187480	2190160	that we need to try together.
2190180	2191640	So we will be sharing some
2191640	2193620	stuff in our websites in a couple
2193620	2195740	weeks. So just we can go there
2195740	2197880	to expo.com, you can join the waitlist
2197880	2199600	and we will be sharing everything
2199600	2201580	over there and also in our social
2201580	2204100	media. So let's keep an eye on that.
2205200	2205780	And finally
2205780	2207480	we don't want to forget about the team.
2207480	2209220	This is not something that we have done
2209220	2211420	ourselves. This is an effort of all the
2211420	2213640	expo team. So a big shout out to
2213640	2215420	all of them because we have been working
2215420	2217240	hard these three last months
2217880	2219500	and yeah, this is something that we
2219500	2221320	have done all together.
2222620	2223780	And yeah,
2223780	2225940	that's the end of the talk. Again,
2225940	2227520	thank you to DEF CON and the
2227520	2230080	Bug Bounty Village for giving us the opportunity.
2233200	2234000	And we have
2234000	2236340	some questions if you want.
2239160	2240040	Yes.
2240640	2242020	I'm not sure if we have
2242020	2243030	the mic, so we just...
2253780	2254640	So, so far
2254640	2256700	everything has been done under
2256700	2258160	control and environment.
2258780	2260700	We are not yet using
2260700	2262860	this to do bug bounties. We are trying
2262860	2264620	to test this to be used
2264620	2266960	to understand how this could be
2266960	2268920	used in a bug bounty field and in
2268920	2270940	the security field. So, so far
2270940	2272900	there is not a monetary search
2272900	2274920	for this now. It's just
2274920	2276820	this what we have shared.
2278120	2278920	Yes.
2287750	2289390	Sorry, could you repeat that?
2299310	2301190	Yeah, yeah, we have tried. Probably those
2301190	2303050	are into, if I remember correctly, into
2304010	2305390	misconfigurations category.
2305470	2307090	But we have tried the headers,
2307090	2308630	the manipulations and information.
2308850	2310990	We have a few challenges of those.
2310990	2312510	I can maybe look for the results
2313090	2314590	after the talk if you want.
2315150	2315810	Yes.
2331880	2334320	So, for the first question,
2334320	2335860	it's depending on how you
2335860	2337720	set the goal, it's very persistent. For example, we
2337720	2339580	saw the cross-site scripting that was trying,
2339580	2341540	keeping trying, then doing something that we
2341540	2343500	also do kind of human thing is
2343500	2345560	like going and looking around to see
2345560	2347300	if we can find another hint or something
2347300	2349620	to get into the feedback.
2349620	2351520	But then goes back to the goal
2351520	2353440	that's very persistent into that.
2353460	2355560	In terms of technical details, it's like you can
2355560	2357480	set the amount of iterations that you want to
2357480	2359080	spend so you don't have like
2359080	2361480	an infinite loop of things trying out.
2361740	2363260	And the second question was
2363260	2365560	to protect. So, now is everything run
2365560	2367360	in an isolated environment and protected, so
2367360	2369300	we are working on improving that
2369300	2371240	in order to be conscious
2371240	2373280	about what it's doing and running.
2373280	2375260	And that's also taking into account all the
2375260	2377740	Salesforce that it has to do while testing application.
2377740	2380400	So, one more.
2380400	2381100	There we go.
2404570	2406350	Yeah, the thing is that
2406850	2409070	if you have played CTF, when you go
2409070	2411230	into hard challenges, it's like you have to
2411230	2413530	maybe change too many things together.
2413570	2415230	You have to. So, probably the AI
2415230	2417170	is being able to detect the first
2417170	2419010	two vectors, but then it doesn't go
2419010	2421230	farther and detects the final one
2421230	2423310	that is giving you the flag.
2423310	2425610	So that, for us, is a known solution.
2425610	2427270	Even though it found valid
2427270	2429870	endpoints and it started plotting vulnerabilities,
2429870	2431330	if it doesn't get the flag, it's
2431530	2433530	a no-no-no resolution for us.
2433530	2435070	So, probably the creativity
2435070	2437130	and the effort that can put
2437250	2439170	a human into going so
2439170	2441370	deep, that's what makes it different.
2441370	2442630	For now, at least.
2443890	2445310	So, I think we
2445310	2446730	have no more time for questions.
2446730	2449070	Thank you, everyone.
