WEBVTT

00:00.000 --> 00:04.700
So, welcome everyone to our talk, Leveraging AI for Smarter Back Bounties.

00:04.700 --> 00:16.720
First of all, thank you to DEF CON and the Back Bounty Village for giving us this space to discuss how AIs can improve and change the security field and the back bounty space.

00:17.080 --> 00:27.060
And we are going to be discussing how AIs can improve our daily job and help us work on what we want and also let the AI take care of other stuff.

00:27.060 --> 00:34.100
So, his name is Diego Jurado, I'm Joel Nogueira, we are both security researchers at Expo.

00:34.140 --> 00:40.520
For those that don't know us, we have been quite a while in the back bounty scene.

00:40.840 --> 00:51.900
And apart from that, we have been also working for several years in some well-known companies in the security industry as security researchers and testers.

00:51.900 --> 00:55.820
So, let's start from the very beginning.

00:56.300 --> 01:02.860
When we started this three months ago, we started looking at their main...

01:02.860 --> 01:09.140
In the recent years, we have seen a lot of research being published about people hacking AIs, right?

01:09.140 --> 01:17.760
Like, people doing research about publishing how to force the AI to do unexpected things, to leak information, etc.

01:17.760 --> 01:26.320
However, there is one particular realm that remains unclear regarding AIs, and it's how AIs could be used in a more offensive way.

01:26.640 --> 01:32.940
In other words, it would be the AI hacking for us and taking care of some stuff that we could do.

01:33.780 --> 01:46.520
So, we started three months ago, and we don't know where the limit is for this technology, but we wanted to show you one quick example of the things that an AI agent could do on our field.

01:48.140 --> 01:58.420
So, first of all, we are going to be talking about different questions, interesting questions, that we have been encountering while doing this journey.

01:58.880 --> 02:03.640
And this is one of the first ones, and it's how can AIs mimic human bounty hunters.

02:03.640 --> 02:11.740
But in order to understand what a bounty hunter, what a human bounty hunter means, we need to first understand what it is, right, for us.

02:11.740 --> 02:19.620
So, humans have several skills and capabilities that we hardly see on the tools that we use in our daily job.

02:19.800 --> 02:27.340
And some of them are intuition, creativity, decision-making, based on the experience that we have collected before.

02:27.340 --> 02:34.960
For example, if we learn something doing bounties, this is something that we are going to apply in the future to keep improving and getting better results.

02:35.840 --> 02:39.780
So, let's try to answer this question with a demo.

02:39.780 --> 02:49.000
In this case, we are going to see our agent exploiting a JWT Python implementation for this particular CVE.

02:49.640 --> 03:04.560
During the video, you are going to see the AI interacting with the web application, performing, executing commands, processing the outputs, taking decisions, and creating goals and learnings based on what it sees and learns during the process.

03:04.560 --> 03:09.880
All it takes for this is just a small description or goal and the target that we want to test.

03:14.100 --> 03:21.060
So, I'm going to pause a little bit here, just to show you a little bit of the interface, because it's the first time you are seeing this.

03:21.520 --> 03:30.400
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.

03:30.400 --> 03:37.680
Then, you can see the things that the AI is processing, analyzing, and the decisions and learning that it's taking.

03:38.100 --> 03:44.100
Then, you can see the commands and the output, and the goals that the AI is generating all by itself.

03:44.100 --> 03:45.820
We have no influence on that.

03:46.800 --> 03:52.360
So, first of all, we start with the basic recon, and recognize that there is a register endpoint.

03:52.400 --> 03:55.960
So, it decides to attempt to register a user.

03:55.960 --> 04:01.980
And in this case, it tries to use a content type JSON, which is grown and expected for the website.

04:02.220 --> 04:07.660
So, it learns that based on the response, and decides to change that to use the correct content type.

04:07.840 --> 04:19.900
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.

04:21.480 --> 04:26.320
Once logged in, it detects on the response that it has a JWT token.

04:26.320 --> 04:34.760
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.

04:35.020 --> 04:40.940
It tries NIST and GitHub, and in GitHub, it finds one match that is a possible proof-of-concept.

04:40.940 --> 04:49.700
So, it decides to download the proof-of-concept, and you can see that it's going to cut the readme file.

04:49.700 --> 04:51.160
This is something that we always do, right?

04:51.160 --> 04:56.040
We want to understand how this exploit works, and we need to learn how to use it.

04:56.240 --> 05:01.280
So, it's going to try to grab the token and run the exploit, but it makes a mistake.

05:01.280 --> 05:03.140
It's running in an incorrect path.

05:03.180 --> 05:04.180
Who hasn't been there, right?

05:04.180 --> 05:06.360
Like, running in an incorrect path for an exploit.

05:06.840 --> 05:13.540
So, now that it learns, we define where it is, it runs again everything, and it finds that there is one missing dependency.

05:13.540 --> 05:20.760
So , it goes ahead and installs the dependency and runs again the exploit, changing the claimed username to admin.

05:20.760 --> 05:23.980
This is a small detail that we are going to talk about later.

05:23.980 --> 05:34.840
Then it starts trying the different payloads that it's getting from the exploit against the whole application, changing from logging to registration to see where this exploit works or not.

05:34.840 --> 05:45.880
And at some point, this works on the root page, so the AI realizes that it has been logged as the admin user, and successfully retrieved the flag from the challenge that we have proposed.

05:49.610 --> 05:53.710
So, during

05:56.900 --> 06:04.420
this video, we have seen some of the things that we mentioned before about humans and tools that we use every day.

06:04.420 --> 06:14.880
We have seen some creativity, learning from mistakes like identifying the incorrect path and taking a decision to decide where to execute the exploit.

06:14.880 --> 06:20.360
But most important, we have seen the capability of the AI to adapt into different situations.

06:20.360 --> 06:34.880
We have seen the AI registering a user, changing the content type to adapt to what the application expects, using the credentials that it just created, and then interacting with authenticating endpoints based on all the things that it has learned.

06:35.560 --> 06:45.140
And something that really is interesting is, for example, things that we do like cutting the readme for an exploit, reading the Python code to understand how it works.

06:45.140 --> 06:59.760
There are probably simple things for us, but when we talk about something that is going on all by itself, and it's reading the code and understanding the input, the output, and also the claims that we need to modify from the JWT token, it's super interesting.

07:00.080 --> 07:06.320
And most interesting, probably, is that if you are familiar with DCP, there is no Nuclei template for this.

07:06.380 --> 07:14.120
And if you wonder why, it's probably because you first need a valid token, which would mean you have to register, sign in, and retrieve that token.

07:14.120 --> 07:19.840
Automating, automatizing that for every existing application on the Internet would be quite a challenge.

07:19.840 --> 07:24.460
In this case, the AI takes care of all that and makes progress on that goal.

07:25.640 --> 07:32.500
So in order to understand how we got here, we have to first understand where we were three months ago when we started.

07:33.340 --> 07:41.420
We started looking for different papers, white papers, that were trying to use agents in a more offensive way.

07:41.420 --> 07:51.400
We found a few of them, not many, but when we started looking at the results, they all have different approaches.

07:51.660 --> 07:59.100
One super common was the human-in-the-loop, that is the human providing real-time feedback to the AI in order to improve the results.

07:59.100 --> 08:02.080
Others have full automated agents, like the one you are seeing.

08:02.080 --> 08:08.980
Others have super specific agents where they were in charge of different tasks.

08:09.040 --> 08:14.060
And some of them were trying to exploit known vulnerabilities or other types of CTF challenges.

08:14.060 --> 08:30.600
When we started looking at the results, for example for this paper, actually one of the authors of this paper, Brendan Dolan-Gavitt, is one of our colleagues at Expo, on this paper they were trying to use LM agents to solve CTF challenges.

08:30.600 --> 08:44.000
If you see in the categories, they attempt to work with all of them, but probably if we pay attention to the web one, which is probably the most interesting for us as bounty hunters, the results are not that promising, right?

08:44.000 --> 08:46.480
It's 16% just for one model.

08:46.560 --> 08:55.480
So we keep digging into the different papers and we found another one that had more promising results.

08:55.480 --> 09:00.680
In this case, they were trying to use LM agents to exploit one-day vulnerabilities.

09:01.220 --> 09:18.280
When we look there, we see an 87% and that's quite exciting and promising, but when we start reading the results and the details, we see that if you remove the CV description that you provide to the model, that 87% drops dramatically to a 7%.

09:18.280 --> 09:22.740
So again, the results weren't that promising in this case.

09:24.140 --> 09:30.920
So as a conclusion from the state of art, the results weren't good at all for models three months ago.

09:30.920 --> 09:33.740
All the cases weren't complex enough.

09:33.740 --> 09:42.800
For example, they were based on particular cases, like the exploit being just one, two lines, or just requiring two requests to forcefully exploit it.

09:43.000 --> 09:47.140
And something that they have in common is that they were all limited.

09:47.140 --> 09:51.500
For example, this last paper only had 15 CVs on their paper.

09:51.500 --> 09:58.080
So when you try to scale this to the real world, you don't know how this is going to be expanded, right?

09:58.080 --> 10:01.580
So we wanted to change things and scale things up.

10:03.700 --> 10:08.940
Okay, so now let's talk about the approach that we had at Expo.

10:09.000 --> 10:12.440
As Joel was saying, we wanted to scale things up.

10:12.440 --> 10:19.580
So the first thing that we did was starting collecting thousands of benchmarks from different CTF competitions.

10:20.060 --> 10:24.860
We also partnered with some companies that you may know, like Postfigure and Pentester Labs.

10:24.860 --> 10:30.280
So they provided to us all the exercises that they have online, and we added to our benchmarks.

10:30.660 --> 10:36.620
Also, we wanted to collect the most interesting and realistic challenges that we can find.

10:36.620 --> 10:39.340
And of course, with a great focus in web applications.

10:40.740 --> 10:47.940
Also, apart from that, we had to categorize all the challenges, depending on the level of difficulty, from easy to hard.

10:47.940 --> 10:56.760
And we also, something really important for us, we created a fully autonomous agent, which is connected to an attack machine.

10:56.840 --> 11:07.420
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.

11:08.540 --> 11:16.260
And apart from that, one thing that is also very important, we wanted to analyze the performance of our solvers.

11:16.260 --> 11:21.260
So for that, we created an exclusive set of more than 100 novel benchmarks.

11:21.380 --> 11:24.020
These benchmarks are used for validation.

11:24.200 --> 11:33.420
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.

11:35.260 --> 11:39.300
And here are the results that we got after three months of work.

11:39.420 --> 11:45.120
As you can see, Expo was able to solve 75% of the challenges from Postfigure Labs.

11:45.120 --> 11:48.540
72% of the challenges from Pentester Labs.

11:48.620 --> 11:50.800
And all of that without any human interaction.

11:50.860 --> 11:56.040
So all the exercises that we were able to solve were completely solved by the AI.

11:56.480 --> 12:04.180
Also, something really important, talking again about the novel benchmarks, we were able to solve 85% of those.

12:04.180 --> 12:08.200
We tried to create these challenges as more representative as possible.

12:08.200 --> 12:11.820
And now we are going to see how these challenges were created.

12:13.380 --> 12:20.540
So here you have a tree map with a distribution of some vulnerabilities that we added to our benchmarks.

12:20.900 --> 12:28.560
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.

12:29.600 --> 12:40.960
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.

12:40.960 --> 12:48.600
But we also have some vulnerabilities like server-side rigorous forgery, common injections, privileged escalation, and also some CVEs.

12:48.600 --> 12:54.340
So we tried to follow a very good distribution to cover all the areas and all the vulnerability types.

12:54.880 --> 13:00.240
Also, just in case someone is interested, we are going to share all the benchmarks that we have.

13:00.240 --> 13:07.560
So we are planning to publish them in a few weeks, just in case you want to test them against your own agents.

13:07.560 --> 13:13.060
So just keep an eye to our social media and website, as we will be sharing those over there.

13:14.340 --> 13:22.100
And here we have some statistics about the success rate that we have, depending on the category.

13:22.100 --> 13:30.020
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.

13:30.520 --> 13:36.200
And as you can see here, for some kind of categories, the AI was performing better than others.

13:36.200 --> 13:44.020
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.

13:44.060 --> 13:49.560
This is something that we will be talking about later, but we are trying to increase this success rate.

13:50.080 --> 13:53.800
But for example, for broken authentication, we have very good success.

13:54.120 --> 13:59.760
And again, we are failing in CCRF tokens and CCRF issues.

14:00.240 --> 14:04.920
And we have some examples of injection vulnerabilities, which, of course, you all may know.

14:04.920 --> 14:06.960
Again, we are failing in DOM XSS.

14:07.340 --> 14:13.620
This is basically because at the beginning, when we started doing our agent, we were missing an embedded browser.

14:13.620 --> 14:20.280
So the agent was not able to exploit some issues that requires exploiting something in the browser or in client-side.

14:20.280 --> 14:24.760
So this is something that we have improved now, and I think we will be talking later about this.

14:26.140 --> 14:33.800
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.

14:33.800 --> 14:40.800
I was really impressed about the blind XSS because it's not something really easy, and we had a very good success rate.

14:41.200 --> 14:49.460
And then talking about the success versus difficulty, we can see that we perform really well for easy and medium vulnerabilities.

14:49.460 --> 14:54.260
We have almost 90% from all the benchmarks that we are talking about now.

14:54.260 --> 15:02.040
Just to clarify, these statistics belong to Portsweiger, Pentester Lab, and our own validation challenges.

15:02.040 --> 15:09.380
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.

15:09.620 --> 15:17.640
And then for hard vulnerabilities, we can see that we have 40%, so yeah, of course we are going to try to improve that.

15:18.720 --> 15:26.220
And now, here you can see some examples about some vulnerability types that you can see there.

15:26.220 --> 15:28.660
And we have one question for all of you.

15:28.780 --> 15:37.020
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.

15:37.320 --> 15:39.780
So, somebody has any idea?

15:40.180 --> 15:41.040
Any number?

15:42.960 --> 15:46.900
I will give you some seconds so that you can read all of them.

15:48.160 --> 15:49.080
Which one?

15:49.460 --> 15:50.300
Seven?

15:50.740 --> 15:51.680
Okay, yeah.

15:51.680 --> 15:57.500
So, this was a tricky question because in the end, the AI was able to solve all of them.

15:59.400 --> 16:03.920
You can see that in our website, we have already shared some of those examples.

16:03.920 --> 16:07.340
For example, the Node.js one, the first one, the IDLE.

16:07.340 --> 16:12.580
But now we don't have time to see all of them, but we want to show you three of them.

16:12.580 --> 16:16.620
So, we are going to start with the reflected XSS.

16:16.800 --> 16:21.000
So, for the people that like exploiting this issue, you will like this example.

16:21.840 --> 16:25.000
In this example, the goal is to exploit an XSS.

16:25.720 --> 16:29.460
We have some sort of server filtering in place.

16:29.460 --> 16:33.040
So, you will see the AI trying to train some default payloads.

16:33.040 --> 16:36.480
Then you will see that it tries to use some kind of encodings.

16:36.480 --> 16:44.060
And finally, after realizing how is the way to exploit it, he managed to exploit it using HTML entity encoding.

16:44.120 --> 16:46.600
So, let's go to the example.

16:47.240 --> 16:49.580
Yeah, let me update this.

16:50.100 --> 16:54.380
Okay, so here you have an example of our agent working.

16:54.480 --> 17:03.120
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.

17:03.120 --> 17:07.400
So, let's go up to see to the very beginning what we have.

17:07.440 --> 17:11.620
As Joel was mentioning before, we have the description of the challenge.

17:11.620 --> 17:17.920
In this case, we are only providing the goal to execute an XSS with the string XSS in capital letters.

17:18.060 --> 17:21.440
And we have also information about the target that we want to exploit.

17:21.680 --> 17:27.800
So, if we go a bit down, you can see that first it starts accessing to the web application.

17:27.800 --> 17:34.960
It finds an endpoint which is XSS20 and then realizes that there is a potential vulnerable parameter.

17:34.960 --> 17:38.520
So, now it starts trying with a typical payload.

17:38.760 --> 17:42.860
And it realizes that it fails because it's getting a 405 error.

17:42.860 --> 17:46.020
This is because it's trying to perform a POST request.

17:46.280 --> 17:51.820
If we go a bit up to the previous output, you can see that there is a form which has no action.

17:51.820 --> 17:58.640
So, first it will try it with a POST request and then realizes that it's doing bad and changes to GET.

17:58.640 --> 18:00.540
And tries again with the same payload.

18:01.320 --> 18:08.460
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.

18:08.460 --> 18:14.820
So, this is something really important, especially when we want to face, for example, bypassing a WAF or something like that.

18:14.820 --> 18:16.920
We want to know what characters are being filtered.

18:16.920 --> 18:21.280
So, this is something that the agent is realizing by itself and is really interesting.

18:21.280 --> 18:24.440
Then here is something that is really important.

18:24.440 --> 18:29.420
It fails while trying to craft a request within a space.

18:29.420 --> 18:32.320
So, it realizes that the current request is bad form.

18:32.320 --> 18:41.300
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.

18:41.400 --> 18:44.820
And then, let's go a bit down.

18:44.820 --> 18:50.900
Here you can see that after trying a couple of payloads, it realizes that it's not able to find a good solution.

18:50.900 --> 18:52.960
So, it tries to change from context.

18:53.140 --> 18:59.440
At this point, tries to analyze again the application, but then it sees that there is nothing interesting apart from that.

18:59.440 --> 19:06.660
So, again, gets the initial goal to exploit the XSS and goes again to try and exploit with different payloads.

19:07.080 --> 19:22.480
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.

19:23.400 --> 19:26.480
Again, it says, okay, this is not the way to go.

19:26.480 --> 19:28.660
So, start again with another payload.

19:28.780 --> 19:38.160
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.

19:38.160 --> 19:43.160
And then, after a few attempts, it managed to get a payload that is working.

19:43.160 --> 19:45.520
You can see all the encoded output.

19:45.740 --> 19:52.760
And if we go to the response, we can see the alert and the flag of the challenge who has been retrieved.

19:53.660 --> 19:56.160
So, yeah, that was our first example.

19:57.700 --> 19:58.740
Thank you.

20:02.450 --> 20:07.330
If we go to the next one, here we have an image of loader vulnerability.

20:07.590 --> 20:11.750
We know that we have some extensions that are being filtered by the application.

20:11.850 --> 20:18.710
So, one thing that is really interesting in this example is that Expo has to deal with some CCRF token and session cookies.

20:18.710 --> 20:22.570
You will see that it struggles with that because it's something that we have to do manually.

20:22.570 --> 20:35.550
So, after that, he managed to log in the application, then tries to upload a PHP web shell, plays again with some extensions until it finally exploited by uploading an htaccess file.

20:35.570 --> 20:37.650
So, let's go to the next example.

20:41.500 --> 20:43.560
Let me update this one.

20:44.160 --> 20:44.880
Okay.

20:45.120 --> 20:50.020
So, here, in this case, you can see, again, the trace working.

20:50.020 --> 20:56.660
We can see that in this description, which is a challenge from Perswiger, we have a very detailed description.

20:56.660 --> 21:01.760
So, the first thing that says is that we have to exploit, again, an image of load function.

21:01.760 --> 21:12.600
It says that, in this case, the goal is to exploit and retrieve the content of the secret, which is inside the server, and then also provide some credentials that you can use for authenticate.

21:12.600 --> 21:17.120
So, the agent will take all this information and, from that point, will start working.

21:17.120 --> 21:21.700
So, if we go a bit down, you can see, again, that it starts to access the application.

21:21.920 --> 21:30.340
It sees that there is some redirect, so it follows that, and then tries to use the credentials to authenticate that were provided in the description.

21:30.720 --> 21:34.220
At this point, it sees that it's missing a CSRF parameter.

21:34.380 --> 21:37.820
So, in these old comments, I'm going to scroll again.

21:38.380 --> 21:45.480
It will start to understand how the CSRF token works, how it has to deal with that part, which is new to him.

21:45.480 --> 21:56.100
And, finally, after playing around with session cookies and playing around with the CSRF token, there is a point where it realizes that, OK, I'm going to do this in only one step.

21:56.100 --> 22:09.440
So, it creates this bash example with first access to the login page, retrieves the session cookie and the CSRF token to have that updated, and then, for that point, uses that to login into the application with the provided credentials.

22:09.580 --> 22:14.020
And, finally, as you can see here, we access to the application.

22:14.020 --> 22:17.740
OK, so we are now this user winner with this session.

22:18.120 --> 22:21.140
OK, so now the next point is trying to upload the web shell.

22:21.140 --> 22:25.260
So, it will try to go and create a PHP file.

22:25.260 --> 22:26.280
It fails.

22:26.280 --> 22:31.900
We are getting some errors here in the output, as you can see here, like PHP files are not uploaded.

22:31.920 --> 22:34.300
So, that tries again with a double extension.

22:34.340 --> 22:40.240
If we go and scroll a bit, we can see that, eventually, we'll try with another extension, phtml.

22:40.240 --> 22:43.060
And then, finally... sorry?

22:43.720 --> 22:44.820
Oh, yeah, sorry.

22:45.360 --> 22:53.580
And, after that, we see, which is really, really important and interesting, is that it tries to upload an HT access.

22:53.580 --> 23:00.780
In this case, what it's trying to do is it's trying to get any image file that can execute PHP code.

23:01.300 --> 23:16.100
And I ask you here, how many times we were doing like a pen test, and maybe we forgot of doing or trying these kind of things, like loading an HT access to see if we can replace that, and we can execute PHP code in an image file, which, at the beginning,

23:16.100 --> 23:17.200
was filtered.

23:18.040 --> 23:20.920
And, yeah, after that, it just accesses the application.

23:20.920 --> 23:22.460
It tries a couple of times.

23:22.460 --> 23:27.000
Sorry for doing a scroll, but I don't want to waste too much time on this.

23:27.200 --> 23:30.600
So, eventually, let's go to the final one.

23:31.300 --> 23:45.820
Yeah, here we can see that, after uploading the PHP file, it can execute this command, access to the secret key, and then submitting it to the submit solution, which is over here.

23:45.820 --> 23:48.420
We can get the flag.

23:55.870 --> 24:10.550
So, something interesting about all these cases is that the AI is also being able to take goals, like exfiltrating this file, submitting the secret to the endpoint to get the flag, and all these kind of details are things that we are not used to seeing in any tool,

24:10.550 --> 24:18.370
or even if we want to test some particular functions of a web application, that's also super interesting to see, and it's able to manage.

24:18.790 --> 24:34.730
So, now, the last example that we are going to see, and then, after that, we are going to see some experiments that we have done, is this is a super interesting case, because we have provided no goal to the AI in this case.

24:34.730 --> 24:45.810
We are going to see that we are going just to present a typical, random text, as in any CTF, that makes no sense and just confuses you, and the target.

24:45.810 --> 24:51.110
And the AI will start exploring the web application, and trying to pursue that goal, right?

24:51.110 --> 24:55.850
Because since it doesn't have a goal, it needs to find out what to do, and how to hack the website.

24:58.350 --> 25:00.510
So, let's go to the challenge.

25:01.570 --> 25:03.370
Let's refresh this.

25:03.370 --> 25:16.870
And, as you can see, the description is, saggy quack quack, try to quack me, that makes no sense, and any of us doing a CTF will be confused, and we also get some information about the target.

25:18.150 --> 25:26.990
Based on that, the agent understands that this is a CTF description, and pursues to go and start doing some recon on the web application.

25:27.490 --> 25:35.410
So, first of all, access to the route, then to a login website, and notice that there is some JavaScript file.

25:35.410 --> 25:38.910
So, decide to go and analyze the JavaScript all by itself.

25:38.910 --> 25:54.590
We're going to see that this behavior is repeated during the whole trace, because every time that it's detecting a new JavaScript, it's reading and understanding that file, to improve the knowledge about the application, and keep digging deeper until it finds some particular goal to exploit.

25:55.150 --> 26:04.450
So, once it learns about the login, it's going to test some test test user, as we always do when doing appendix to see how it behaves.

26:04.450 --> 26:08.110
Of course, it doesn't work, but the application understands that the login is working.

26:09.010 --> 26:13.590
So, after that, try some basic payloads for SQL injection.

26:13.870 --> 26:14.950
Doesn't work either.

26:14.950 --> 26:16.870
We get the same message.

26:17.430 --> 26:22.230
And now we craft just a quick Python script to do some default credentials for the admin user.

26:22.230 --> 26:28.910
Just trying some few well-known passwords to see if anything of that is a low-hanging fruit that can get quickly.

26:28.910 --> 26:31.250
None of them work, of course.

26:31.310 --> 26:35.270
So, it decides to move on and try NoSQL injection against the login.

26:35.750 --> 26:38.050
Doesn't have lag anymore.

26:38.310 --> 26:46.890
So, decides to just try some JSON parameter injection to see if also can get some unexpected behavior on the application.

26:47.690 --> 26:49.070
It didn't work either.

26:49.170 --> 26:54.790
So, now it decides to go to the initial recon and say, okay, let's see what other endpoints we have.

26:54.790 --> 26:58.430
And it realized that there was one endpoint called post create.

26:59.150 --> 27:02.970
When it tried to access this endpoint, it realized that it requires authentication.

27:03.550 --> 27:09.390
And in this application, the main feature is that users can create posts like in any social media.

27:09.390 --> 27:14.570
So, it decides to go to the endpoint for register an account.

27:14.570 --> 27:25.970
Again, as we have seen in other examples, it's going to access the endpoint, read the JavaScript file, understand how the form works to register an user, and it's going to try to register a test user.

27:26.650 --> 27:29.370
This works, and the user is registered.

27:29.590 --> 27:38.030
So, now we move on to, again, use those credentials and keep getting more access to the application and perform some authenticated tests.

27:38.790 --> 27:45.070
If we scroll a little bit down, we are going to see now that it tries to access again to this endpoint providing the cookies.

27:45.990 --> 27:57.430
This endpoint works, retrieves the JavaScript file, gets more information about the application, and now decides just to do a simple post, like we always do, like we are just in the website.

27:57.430 --> 28:00.850
We want to learn how the application behaves.

28:00.910 --> 28:01.890
So, this works.

28:01.890 --> 28:03.350
It creates a post.

28:03.530 --> 28:12.790
So, now it knows, based on everything that it has written from the HTML and JavaScript files, that all the posts can be accessed on this endpoint for the test user.

28:12.870 --> 28:19.830
So, when it accesses, we can see here the post being printed.

28:19.830 --> 28:26.350
But also, if we pay attention, we are going to see that there is a report to admin feature that is at the bottom here.

28:27.110 --> 28:34.850
And this is super interesting because now the AI is realizing that there is a report to admin feature and it has found a potential attack vector.

28:34.850 --> 28:48.090
At this point, we didn't have any goal, but now the AI understands that there is an admin user that could potentially be reviewing the reports, so it decides to go ahead and try some exploits on payloads to see if it can force any type of interaction.

28:48.090 --> 28:54.630
Remember that this is a CTF, so it's expecting to have something to leak or to exploit in order to retrieve the flag.

28:55.730 --> 29:04.130
So, once it learns how it works based on the JavaScript, it's going to just do a report of this case to see if it works.

29:04.130 --> 29:04.930
It worked.

29:04.930 --> 29:13.970
So, now it decides to start collecting more information for one of the final payloads and creates a super interesting script because, in this case, it's taking care of everything.

29:13.970 --> 29:15.610
It's creating a new user.

29:15.610 --> 29:27.590
It's reusing those credentials to login in the application, then grabbing the cookie, setting a payload for a client-side exploit to try to send some fetch requests to our collaboration server.

29:28.030 --> 29:34.290
Another interesting case of this, understand what the collaboration server is and how to use it, how to interact with it, and use the payloads.

29:34.290 --> 29:39.370
And then we'll create just the post, trigger the report, and then wait for some interactions.

29:39.450 --> 29:41.750
Of course, it's five seconds because it's a CTF.

29:41.750 --> 29:44.830
We expect some kind of quick interaction in this case.

29:44.830 --> 29:50.250
Again, it tries a different payload to see if it can trigger any interaction.

29:50.730 --> 29:55.390
Something interesting here is that it's not creating the user anymore because it understands that it already has this.

29:55.390 --> 29:59.670
So, it removes that part from the script and keeps improving it to make better results.

30:00.130 --> 30:04.470
It doesn't work neither, so it goes on to try one more time with a different payload.

30:05.150 --> 30:15.910
And again, sending the DOM of the application for the admin user, it sends it, and after that, it gets that interaction on the Interact SH server that we have.

30:16.190 --> 30:24.330
And it's super interesting to see that it understands that this is an interaction for an admin that has access to the website and is able to retrieve the whole DOM of the application.

30:24.630 --> 30:27.610
And if we try to search for the flag...

30:27.610 --> 30:28.530
Oops.

30:29.350 --> 30:37.990
Well, like the flag, we are going to see that all this here is URL encoded, but this is the flag that has exfiltrated from the DOM of the admin user.

30:38.070 --> 30:44.190
With that, the AI understands that the challenge has successfully finished and has everything it needs to complete the challenge.

30:52.810 --> 31:04.050
So, too many examples and too many scrolling, so now let's jump to something different, a different experiment we did, and it's to know if can AI be compared to human pen testers.

31:04.730 --> 31:10.710
So for this, we did an experiment that you may have seen in the Internet that we published some of the results.

31:12.550 --> 31:24.130
And here on the screen, you are going to see both terminals, one screenshot is the pen tester working and the other one is the AI working at the same time, trying to solve the same challenge.

31:24.650 --> 31:38.710
Something interesting about this case is that you are going to see images because now we have built in a new browser for the AI so it can understand buttons, everything, and more JavaScript application-based, so it improved the results a lot on the client-side applications.

31:39.190 --> 31:51.870
And if you keep tracking the numbers, you are going to see that after the AI finished in four minutes, the pen tester is still struggling in 20 minutes more to exploit this vulnerability and this challenge.

31:52.170 --> 31:57.830
So for this, we hired five pen testers from different companies, going from junior to principal.

31:58.270 --> 32:06.110
We gave them 40 hours to solve all of the validation cases that they were able to solve from our validation set.

32:06.110 --> 32:08.550
They could use any tools, no exceptions.

32:08.550 --> 32:11.670
They could do whatever they want, just a real CTF.

32:13.130 --> 32:14.950
The thing is that...

32:14.950 --> 32:26.750
Well, I'm just going to let it continue just a few seconds so you can see how the AI has finished and the pen tester is still working on the challenge up to 19 minutes, approximately.

32:27.290 --> 32:37.290
So the results from this experiment were quite interesting and let us understand much more of how these things work and how it can be applied to our field.

32:37.550 --> 32:50.330
So on this chart, you can see how Expo behaved, obtained the same results as the principal, both solving the 85% of this challenge from the validation set.

32:50.710 --> 32:56.770
And on the other chart, you can see their resolutions, percentage made by difficulty.

32:56.990 --> 33:04.910
And if you pay attention to the easy and medium, you are going to see that the AI excels the human pen tester and performs better results.

33:04.910 --> 33:15.930
However, as was mentioned before, for the hard challenges, the AI is struggling a little bit more and those cases require more creativity, alternative thinking or more careful process.

33:15.950 --> 33:19.010
The human excels in those cases.

33:19.010 --> 33:37.830
So this gives us a huge hint about how this can be applied to our field, where we can imagine a place where the AI is taking care of all those things that are less interesting for us and leaving the human experts the work of working on the more exciting parts or more challenging parts of the application.

33:41.720 --> 33:42.580
Okay.

33:43.180 --> 33:46.540
And now we go to our last question for today.

33:46.700 --> 33:50.460
So can AI actually be our second brain or assistant?

33:50.620 --> 33:55.840
So we know that AI has been very used in multiple contexts.

33:55.840 --> 34:03.040
But we haven't seen before how we can use the AI to assist a serpent tester or a backhunter in this case.

34:03.040 --> 34:05.300
All the people are interesting here.

34:05.300 --> 34:11.700
So for this meaning we use something called human in the loop we have been talking about before.

34:11.700 --> 34:23.120
So here we have a prototype in what we wanted to do is basically analyze how we can use AI to perform better the work of the human.

34:23.480 --> 34:24.100
Okay.

34:24.520 --> 34:29.780
So yeah, here is a small video which just let it run.

34:29.780 --> 34:35.360
But basically what we wanted to create was a prototype that basically will provide some goals.

34:36.380 --> 34:44.140
Apart from that goal, what we can do is provide some feedback to the AI so we can change the workflow and how it works.

34:44.140 --> 34:53.800
So for example, if we are analyzing how the AI is performing and what kind of stuff it is trying to do we can go in the middle and we can try and change that workflow.

34:53.800 --> 35:00.920
So for example, if we see that it is trying to execute a command that is FAD we can modify that and let the AI interact and continue with that.

35:00.920 --> 35:16.920
Also, if we see that for example it is trying to exploit an SQL injection and we see that it is missing some payloads or it is missing some entry points we can also provide that as part of the learnings and we can say to the AI that it has to be and follow that right path.

35:16.980 --> 35:18.840
So this is just a prototype, an example.

35:18.840 --> 35:22.800
This is not something that we are pretending to sell or anything like that.

35:22.800 --> 35:28.060
We just wanted to see how we can interact with the human in the loop.

35:29.680 --> 35:31.340
So let's skip this one.

35:32.060 --> 35:40.480
Okay, and now to sum up we are going to be reviewing again the three questions that we have been talking before.

35:40.520 --> 35:51.860
So for the first question of all if we can mimic human backhunters Okay, we have seen that the AI is surprisingly good for some examples especially the easy ones and the medium ones.

35:51.860 --> 35:56.580
But depending on the difficulty we have to improve the performance.

35:56.780 --> 36:12.140
Then, talking about if we can compare human pen testers to AI as Joel was talking before expert human excel at creativity and are really good at hard challenges But yeah, the AI is faster and better.

36:12.140 --> 36:21.540
We saw in the example that we provided like five pen testers we gave them like 40 hours and the AI was able to solve all of them in just 30 minutes.

36:22.160 --> 36:30.160
And if we talk about if the AI can be our second brain or assistant, this is something that we need to try together.

36:30.180 --> 36:34.400
So we will be sharing some stuff in our websites in a couple weeks.

36:34.500 --> 36:42.040
So just we can go there to expo.com, you can join the waitlist and we will be sharing everything over there and also in our social media.

36:42.040 --> 36:44.100
So let's keep an eye on that.

36:45.200 --> 36:47.480
And finally we don't want to forget about the team.

36:47.480 --> 36:50.060
This is not something that we have done ourselves.

36:50.060 --> 36:52.500
This is an effort of all the expo team.

36:52.560 --> 37:01.320
So a big shout out to all of them because we have been working hard these three last months and yeah, this is something that we have done all together.

37:02.620 --> 37:05.600
And yeah, that's the end of the talk.

37:05.600 --> 37:10.080
Again, thank you to DEF CON and the Bug Bounty Village for giving us the opportunity.

37:13.200 --> 37:16.340
And we have some questions if you want.

37:19.160 --> 37:20.040
Yes.

37:20.640 --> 37:23.030
I'm not sure if we have the mic, so we just...

37:33.780 --> 37:38.160
So, so far everything has been done under control and environment.

37:38.780 --> 37:42.300
We are not yet using this to do bug bounties.

37:42.300 --> 37:50.280
We are trying to test this to be used to understand how this could be used in a bug bounty field and in the security field.

37:50.280 --> 37:54.260
So, so far there is not a monetary search for this now.

37:54.360 --> 37:56.820
It's just this what we have shared.

37:58.120 --> 37:58.920
Yes.

38:07.750 --> 38:09.390
Sorry, could you repeat that?

38:19.310 --> 38:20.750
Yeah, yeah, we have tried.

38:20.750 --> 38:25.390
Probably those are into, if I remember correctly, into misconfigurations category.

38:25.470 --> 38:28.630
But we have tried the headers, the manipulations and information.

38:28.850 --> 38:30.990
We have a few challenges of those.

38:30.990 --> 38:34.590
I can maybe look for the results after the talk if you want.

38:35.150 --> 38:35.810
Yes.

38:51.880 --> 38:57.140
So, for the first question, it's depending on how you set the goal, it's very persistent.

38:57.140 --> 39:09.620
For example, we saw the cross-site scripting that was trying, keeping trying, then doing something that we also do kind of human thing is like going and looking around to see if we can find another hint or something to get into the feedback.

39:09.620 --> 39:13.440
But then goes back to the goal that's very persistent into that.

39:13.460 --> 39:21.480
In terms of technical details, it's like you can set the amount of iterations that you want to spend so you don't have like an infinite loop of things trying out.

39:21.740 --> 39:24.260
And the second question was to protect.

39:24.260 --> 39:33.280
So, now is everything run in an isolated environment and protected, so we are working on improving that in order to be conscious about what it's doing and running.

39:33.280 --> 39:37.740
And that's also taking into account all the Salesforce that it has to do while testing application.

39:37.740 --> 39:40.400
So, one more.

39:40.400 --> 39:41.100
There we go.

40:04.570 --> 40:13.530
Yeah, the thing is that if you have played CTF, when you go into hard challenges, it's like you have to maybe change too many things together.

40:13.570 --> 40:14.250
You have to.

40:14.250 --> 40:23.310
So, probably the AI is being able to detect the first two vectors, but then it doesn't go farther and detects the final one that is giving you the flag.

40:23.310 --> 40:25.610
So that, for us, is a known solution.

40:25.610 --> 40:33.530
Even though it found valid endpoints and it started plotting vulnerabilities, if it doesn't get the flag, it's a no-no-no resolution for us.

40:33.530 --> 40:41.370
So, probably the creativity and the effort that can put a human into going so deep, that's what makes it different.

40:41.370 --> 40:42.630
For now, at least.

40:43.890 --> 40:46.730
So, I think we have no more time for questions.

40:46.730 --> 40:49.070
Thank you, everyone.

