1 00:00:08,690 --> 00:00:15,290 So my name is Jason Haddix, and this is Gunnar, and we are hackers. 2 00:00:16,010 --> 00:00:22,930 We created a data, I guess, data repository and tooling called... 3 00:00:23,510 --> 00:00:25,310 You didn't want that picture in the slides? 4 00:00:25,310 --> 00:00:26,450 No, no, no, it's a good picture. 5 00:00:26,450 --> 00:00:27,790 That's a great picture, dude. 6 00:00:27,790 --> 00:00:28,930 I appreciate it. 7 00:00:29,530 --> 00:00:37,150 And so we created some tooling and some data repository stuff for people primarily who are doing application security testing. 8 00:00:38,550 --> 00:00:39,590 Okay. 9 00:00:39,690 --> 00:00:41,050 So a little bit of history. 10 00:00:41,290 --> 00:00:44,950 So about... oh, I don't know. 11 00:00:45,750 --> 00:00:50,930 2016, I spoke at DEF CON on the main stage on this topic. 12 00:00:50,950 --> 00:00:52,890 And the talk was called HUNT. 13 00:00:52,890 --> 00:00:55,930 It was called HUNT Data-Driven Web Hacking and Manual Testing. 14 00:00:56,510 --> 00:01:02,410 Now, HUNT, these fine people at the bottom were the ones who helped me put that talk together. 15 00:01:02,430 --> 00:01:05,350 What we're doing today is enhancing it a whole bunch. 16 00:01:05,350 --> 00:01:09,670 So let me talk about the problem space we're working in right now. 17 00:01:09,750 --> 00:01:20,250 So right now, a seasoned hacker, application security hacker, can kind of look at a website, and for some reason, they've developed, like, a spidey sense. 18 00:01:20,250 --> 00:01:26,390 If you've been doing this for 10 years or 15 years, you look at a website and you're like, oh, yeah, that's probably vulnerable to X, right? 19 00:01:26,470 --> 00:01:30,050 And that's just, like, something that people talk about all the time. 20 00:01:30,050 --> 00:01:31,450 It's like, oh, I don't know really how I hack. 21 00:01:31,450 --> 00:01:34,510 I just kind of, you know, I look at the site and I do this thing. 22 00:01:34,510 --> 00:01:37,890 That is not helpful for new people getting into application security. 23 00:01:37,890 --> 00:01:41,750 Just saying, oh, you'll develop this skill set in 15 years, right? 24 00:01:42,330 --> 00:01:45,050 And so a lot of them call it, like, their spidey sense. 25 00:01:45,150 --> 00:01:55,630 But really, it's experience and context that are driving these decisions when you look at an application and know where to hack it and how to hack that section of the application. 26 00:01:56,550 --> 00:01:59,730 So how do we shortcut experience and context? 27 00:01:59,730 --> 00:02:01,410 And in general, you should never do this, right? 28 00:02:01,410 --> 00:02:09,290 But in our cases, we're going to try to help new people get some ideas about where to hack certain things in the web application assessment arena. 29 00:02:10,470 --> 00:02:10,990 Okay. 30 00:02:10,990 --> 00:02:12,730 So this is a URL. 31 00:02:12,730 --> 00:02:14,510 Have any of you seen a URL before? 32 00:02:15,710 --> 00:02:16,150 Woo! 33 00:02:16,150 --> 00:02:16,990 There we go. 34 00:02:16,990 --> 00:02:17,750 There we go. 35 00:02:17,750 --> 00:02:18,270 All right. 36 00:02:18,270 --> 00:02:19,750 So here is a URL. 37 00:02:19,830 --> 00:02:22,950 And at the end here, we have ID. 38 00:02:23,550 --> 00:02:34,450 And so the whole structure is, like, you have your protocol, and then you have your subdomain and your domain, and then you have your file or resource name, and then you pass that, usually a parameter and a parameter value. 39 00:02:34,890 --> 00:02:39,570 Now, our talk and research is all about these things. 40 00:02:39,570 --> 00:02:41,050 Parameters, right here. 41 00:02:41,050 --> 00:02:49,530 Because they can be used in a sense and fashion to give you the context we're looking for and guide you into what to test. 42 00:02:50,830 --> 00:02:51,730 Okay. 43 00:02:51,830 --> 00:03:02,670 So in 2016, when we did this research, I mean, I won't call it stole, because I worked for them at the time, but I didn't really get permission, but, you know, whatever. 44 00:03:03,710 --> 00:03:07,730 Basically, I went over the dataset of every bug bounty on BugCrowd. 45 00:03:07,730 --> 00:03:09,210 Anybody know who BugCrowd is? 46 00:03:09,790 --> 00:03:10,350 Yeah. 47 00:03:10,350 --> 00:03:10,670 Okay. 48 00:03:10,670 --> 00:03:10,950 Cool. 49 00:03:10,950 --> 00:03:13,590 So BugCrowd is a bug bounty platform. 50 00:03:13,670 --> 00:03:16,670 And at the time, it had over 600 bounties, internal and external. 51 00:03:16,870 --> 00:03:21,210 And what I did is I had the data engineers chop off the domain, so I could not identify who the companies were. 52 00:03:21,210 --> 00:03:22,970 But they gave me the URL data. 53 00:03:22,970 --> 00:03:36,790 And then for every bug that existed on a URL, I parsed out the parameters for that bug class and the bug URL. 54 00:03:36,870 --> 00:03:38,850 So that was about two programs... 55 00:03:38,850 --> 00:03:43,370 or every program had, on average, about two targets per bug bounty. 56 00:03:43,630 --> 00:03:50,090 So targets are like www.defcon.org, forums.defcon.org, media.defcon.org, etc., etc., etc. 57 00:03:50,870 --> 00:03:57,590 So each target had about 15 average parameters per application. 58 00:03:57,990 --> 00:03:59,850 And many were many, many more. 59 00:03:59,850 --> 00:04:06,210 So approximately, we saw about 18,000 parameters with vulnerabilities on them in this dataset. 60 00:04:06,210 --> 00:04:12,490 Which is probably the biggest dataset, I think, that's ever been parsed for vulnerability research in web before. 61 00:04:14,370 --> 00:04:15,590 Or 18,000. 62 00:04:15,590 --> 00:04:16,290 Sorry. 63 00:04:16,290 --> 00:04:26,190 So in the 18,000 parameters that we found, that were anonymized, we reduced them to make sure that we got the vulns that we wanted to investigate, the vulnerabilities. 64 00:04:26,190 --> 00:04:29,330 So things like cross-site scripting, SQL injection, command injection. 65 00:04:29,330 --> 00:04:31,970 Things that you find in AppSec testing, right? 66 00:04:31,970 --> 00:04:34,630 So we reduced it to ones we wanted to do research on. 67 00:04:34,630 --> 00:04:40,790 And then we also reduced it to only P1s and P2s or high-severity critical vulns. 68 00:04:41,130 --> 00:04:45,250 Then we sorted by recurring instances of when that took place. 69 00:04:45,250 --> 00:04:54,470 And then we included the 5 to 10 or 15, in some cases, we expanded to, the reoccurring instances per vulnerability category. 70 00:04:54,910 --> 00:05:09,390 And then we looked at those and then manually reviewed them and were like, OK, well, I know with my 15 years of context and that team of five people, there's some permutations of this thing that I always want to look at, so I'll add those just off the top of my head. 71 00:05:09,390 --> 00:05:13,010 And then we also looked at a whole bunch of repos that include fuzzing data. 72 00:05:13,010 --> 00:05:19,390 Which was like PentestDB, FuzzDB, and SecLists, which I run SecLists with Daniel Meisler. 73 00:05:19,430 --> 00:05:21,610 So, we made these lists. 74 00:05:21,610 --> 00:05:29,130 And what these lists were, were just lists of parameters in websites that were vulnerable ones to a certain class of vulnerability. 75 00:05:29,190 --> 00:05:43,490 But because we had seen certain ones so many times, we started to tell our friends, like, every time you see a next parameter, probably you should check it for redirects and LFIs and RFIs and stuff like that. 76 00:05:46,220 --> 00:05:56,120 So, this talk, SUS Params, is about releasing the tooling to do that yourself, and jacking up the lists to the nth degree. 77 00:05:56,420 --> 00:05:58,300 And analyzing that data. 78 00:05:58,540 --> 00:06:03,140 So, SUS Params, obviously SUS and parameters. 79 00:06:03,960 --> 00:06:09,040 We did a whole bunch of work with AI, which Gunnar's going to talk about, to actually do the data parsing. 80 00:06:09,040 --> 00:06:11,580 And people say that data parsing with AI is impossible. 81 00:06:11,580 --> 00:06:12,700 I'm here to tell you it's not. 82 00:06:12,700 --> 00:06:16,420 We used it very effectively in this talk, or in this set of tools. 83 00:06:16,440 --> 00:06:25,180 We're going to release the lists, and then we're also going to work with a friend of ours, xmlhacker, who will give you a way to implement this in your day-to-day life using his tool. 84 00:06:25,180 --> 00:06:28,120 So, I'm going to pass it over to Gunnar as we go. 85 00:06:30,060 --> 00:06:30,860 Alright. 86 00:06:31,760 --> 00:06:39,980 So, right now, what we started with on this release of the repo and the data, the next target we went for was HackerOne. 87 00:06:39,980 --> 00:06:43,580 We don't have any internal digs in HackerOne, right? 88 00:06:43,580 --> 00:06:45,200 So, it's all the public data. 89 00:06:45,280 --> 00:06:50,920 Anyone who knows HackerOne knows that there's a very long list called the hacktivity that is publicly disclosed data. 90 00:06:52,580 --> 00:06:53,460 Perfect. 91 00:06:53,460 --> 00:06:56,040 So, we used AI to parse this data, which I'll talk about later. 92 00:06:56,040 --> 00:06:58,120 But this is what hacktivity looks like. 93 00:06:58,640 --> 00:07:05,740 So, this would be kind of annoying to scrape, and web scraping nowadays with dynamic websites and all that stuff gets very annoying. 94 00:07:06,200 --> 00:07:13,700 So, huge shout-out to HackerOne for making this whole list populated by a GraphQL query in the backend. 95 00:07:13,700 --> 00:07:26,520 So, you can actually just script the GraphQL query, it's a paginated GraphQL query, and you can get all, I think, 15,000 publicly disclosed reports on every public program on HackerOne. 96 00:07:26,520 --> 00:07:37,700 Then, the next thing that's nice about it is normally when you click on one of these, it brings you to a HackerOne report, which is now also stuff that would be very annoying to scrape for text. 97 00:07:37,700 --> 00:07:41,920 Well, again, all of the HackerOne reports come in JSON format. 98 00:07:41,960 --> 00:07:50,200 If you take the URL of the HackerOne report and tack on .json at the end, it shows up in JSON format, because that's how it gets pulled out of their backend. 99 00:07:50,320 --> 00:08:01,820 So, what we did is I went and grabbed all of the report IDs out of the GraphQL endpoint, and then saved all of the JSON format of all those reports, and we ended up with right around 15,000. 100 00:08:01,820 --> 00:08:03,700 Again, it's in the repo if you want to see it. 101 00:08:03,700 --> 00:08:12,560 I saved all the data from every step, so if you want to reproduce it for some other data set, you can follow the steps and make sure it looks very similar. 102 00:08:13,640 --> 00:08:16,540 So, the AI parsing discussion. 103 00:08:16,640 --> 00:08:21,880 So, we tried to do a whole bunch of different things with AI to parse this data. 104 00:08:21,980 --> 00:08:31,360 As a lot of people know who have messed with AI, I'm not an AI expert myself, but AI output is normally never very uniform. 105 00:08:31,360 --> 00:08:34,460 You normally can't get AI to just give you JSON output and only JSON output. 106 00:08:34,460 --> 00:08:39,540 You normally can't get it to give you really clean output that you can count on to be the exact same every single time. 107 00:08:39,740 --> 00:08:47,480 So, just telling some of the AI, hey, I'm going to let you read this text that I pulled, and then you give me the parameter. 108 00:08:47,860 --> 00:08:49,980 Sadly, it doesn't exactly work that way yet. 109 00:08:50,340 --> 00:08:52,140 Maybe soon, but not quite yet. 110 00:08:52,780 --> 00:08:54,600 So, oh, sorry, misclicked. 111 00:08:54,600 --> 00:09:01,340 So, what we did instead was GPT 3.5 Turbo, you can use with the OpenAI API. 112 00:09:01,340 --> 00:09:07,680 I messed with that and messed with temperature and all that kind of other stuff, and it works sometimes, doesn't work all the time. 113 00:09:08,220 --> 00:09:19,080 You pay the extra 20 bucks and use GPT 4, and it's much, much better at understanding HTTP requests, HTTP URLs, code, JSON, whatever it may be. 114 00:09:19,220 --> 00:09:40,120 And we were able to use AI to basically take the mountain of text that you would get from 15,000 bug bounty reports and reduce it down to basically one sentence that either had parameters in quotes, parameters in a bulleted list, or basically something that makes it basically rejectable, 115 00:09:40,120 --> 00:09:41,540 which is going to be the next step. 116 00:09:41,840 --> 00:09:51,100 So it takes this massive thing of text, reads it, and then will tell you, like, this report has parameters that are vulnerable or not, this is what they are. 117 00:09:51,220 --> 00:10:00,980 And since the reports come from HackerOne, already broken into cross-site scripting, command injection, SQL injection, whatever it may be, you don't have to use AI to do that. 118 00:10:01,140 --> 00:10:04,840 You just can already split it up as it goes and then ingest it into AI that way. 119 00:10:05,420 --> 00:10:10,920 And at the end of all the slides, I'm going to go through the repo, and I'll show you exactly what I did. 120 00:10:11,640 --> 00:10:14,560 We used HackerOne, like Jason said. 121 00:10:14,560 --> 00:10:19,900 You can use what we did, and we're releasing the scripts, of very few changes. 122 00:10:19,900 --> 00:10:29,900 If you have, within your company, your own internal data set of either incidents you've had, or you run your own bug bounty program, and you have your own internal reports, and you want to know, hey , can I make this data set just for my stuff? 123 00:10:29,920 --> 00:10:30,500 Absolutely. 124 00:10:30,500 --> 00:10:31,580 That's the point of the project. 125 00:10:31,580 --> 00:10:40,500 We're releasing our set, our new set of lists, based on Jason's list, and this new data, for bug bounty hunters, solopreneurs, whatever it may be. 126 00:10:40,500 --> 00:10:44,140 But we're also releasing the scripts, and we're going to explain how we did it. 127 00:10:44,160 --> 00:10:50,540 That way, if you have something very similar that you would like to generate your own honed list of SUS params for, you can also do it. 128 00:10:51,480 --> 00:10:58,700 So, as Jason mentioned, we have a buddy who goes by xnailhacker on Twitter, who makes a burp extension called GAP. 129 00:10:59,080 --> 00:11:06,980 GAP originally would collect, as stuff goes through your proxy, it will collect links, and it will collect parameters, yes? 130 00:11:06,980 --> 00:11:07,380 Yep. 131 00:11:07,380 --> 00:11:09,680 From anything that flows through your proxy. 132 00:11:09,680 --> 00:11:17,120 It does it automatically, and then there's a GAP tab in your burp suite that you can click on and read through them all and filter them all and highlight and all that stuff. 133 00:11:17,120 --> 00:11:23,200 He was nice enough to work with us and implement the list that we created into GAP. 134 00:11:23,200 --> 00:11:40,720 So the new version that's releasing today with GAP will now do, is not only will it collect parameters, but if you check a little box in the config, it will create burp issues, just little burp issues for you, for all your parameters that show up in the SUS params list. 135 00:11:41,100 --> 00:11:46,820 So if you have a parameter that shows up in a URL, it will automatically put it in the list for you. 136 00:11:46,820 --> 00:11:52,320 You can go to GAP, pull down the list of burp issues, and you can see all your parameters that show up in SUS params. 137 00:11:52,400 --> 00:11:54,740 So we'll show that to you in a screenshot. 138 00:11:54,740 --> 00:11:55,400 Yep. 139 00:11:55,560 --> 00:11:57,440 So this is part of what it looks like. 140 00:11:57,440 --> 00:11:58,080 Is there two? 141 00:11:58,080 --> 00:11:58,380 Oh, no. 142 00:11:58,380 --> 00:11:58,560 Okay. 143 00:11:58,560 --> 00:11:59,440 So there's just the one. 144 00:11:59,440 --> 00:12:01,160 So this is kind of what it looks like. 145 00:12:01,160 --> 00:12:05,740 So when it, you can basically pull the list and it'll say like, okay, so it found an ID parameter. 146 00:12:05,900 --> 00:12:11,920 Like people in the past have tested that for XSS, IDOR, SQLI, SSTI, whatever it may be. 147 00:12:13,180 --> 00:12:14,080 That kind of thing. 148 00:12:14,180 --> 00:12:29,960 You can turn it off and on, but this is basically what Jason was talking about, where if you're maybe newer to the scene, or you maybe are doing a fast, you know, you're doing a fast engagement or something like that, this is something to really help you kind of narrow it down and maybe get to stuff that might be vulnerable a little quicker. 149 00:12:31,960 --> 00:12:32,260 Okay. 150 00:12:32,620 --> 00:12:34,380 Did I miss anything before the demo? 151 00:12:34,380 --> 00:12:34,840 Yeah. 152 00:12:34,920 --> 00:12:35,580 Cool. 153 00:12:36,800 --> 00:12:37,920 Where's the escape key? 154 00:12:37,920 --> 00:12:38,500 There we go. 155 00:12:39,020 --> 00:12:39,720 Okay. 156 00:12:39,720 --> 00:12:45,220 So I'll leave it up at the end, but this is the repo for the project. 157 00:12:46,600 --> 00:12:48,820 I was going to say, can we zoom in? 158 00:12:48,820 --> 00:12:51,160 I wasn't allowed to use my Mac, so... 159 00:12:52,020 --> 00:12:53,780 So this is a repo for the project. 160 00:12:54,340 --> 00:12:57,900 Again, at the top, anyone who knows it is TomNoNone, correct, is GF? 161 00:12:58,660 --> 00:12:59,460 Yes. 162 00:12:59,820 --> 00:13:02,820 So there's a tool that some people use in automation just called GF. 163 00:13:02,820 --> 00:13:06,360 So there's GF patterns for the list at the top, too, if you use that tool. 164 00:13:07,260 --> 00:13:10,900 And then as we go down... 165 00:13:10,900 --> 00:13:13,020 So this query I saved. 166 00:13:14,300 --> 00:13:16,500 This was the original query that I pulled. 167 00:13:16,500 --> 00:13:18,160 This is your GraphQL query. 168 00:13:18,180 --> 00:13:23,840 So if you want to try and pull hacktivity a little bit different than I do, this is the GraphQL query that you start with. 169 00:13:23,880 --> 00:13:28,080 So that's just thrown into a text file just in case, you know, so you don't have to hunt it down. 170 00:13:28,720 --> 00:13:29,980 That kind of thing. 171 00:13:31,460 --> 00:13:35,380 After that, HackerOne and BugCrowd, we did try and pull BugCrowd data publicly. 172 00:13:35,440 --> 00:13:38,420 The CrowdStream is much smaller than hacktivity. 173 00:13:38,420 --> 00:13:46,820 So size of dataset-wise, the hunt dataset is vastly larger, obviously, than what is on the CrowdStream. 174 00:13:47,020 --> 00:13:48,680 Whereas HackerOne has much bigger... 175 00:13:48,680 --> 00:13:50,200 Hacktivity is just much bigger. 176 00:13:50,200 --> 00:13:54,480 So HackerOne.py, that file, will basically run... 177 00:13:54,480 --> 00:13:59,200 It does take a little bit, because it's paginated GraphQL queries, and there's quite a bit of JSON files. 178 00:13:59,360 --> 00:14:02,880 But what it will do is it will save them in this volns.json. 179 00:14:02,880 --> 00:14:06,580 Again, I'm not going to try and open it, because it's very big. 180 00:14:06,740 --> 00:14:09,580 But this is the last pull that we did, if you're interested. 181 00:14:09,580 --> 00:14:17,020 Otherwise, just running that HackerOne.py will make a new JSON for you, and you can start over. 182 00:14:17,020 --> 00:14:20,860 Because obviously, there's new stuff getting disclosed on Hacktivity all the time. 183 00:14:21,500 --> 00:14:33,100 If you want to take this list and not run it, and regenerate the whole list, it's very easy in the query that's in the HackerOne.py file to just add a filter that says from X date to X date. 184 00:14:33,100 --> 00:14:34,900 So you can be like, ah, just grab the last month. 185 00:14:34,900 --> 00:14:38,900 So you don't have to run through all 18,000 that there will be at some point. 186 00:14:41,860 --> 00:14:46,180 Next, this POC.py, this is our proof of concept for how we did AI. 187 00:14:46,180 --> 00:14:53,140 Again, this will change depending on what type of text you're putting in, what type of data you're putting in, etc. 188 00:14:53,200 --> 00:15:01,820 What we did is I took the JSON file and there was just one of the strings was just all the text that was in the description of the report. 189 00:15:01,820 --> 00:15:02,560 So it was pretty easy. 190 00:15:02,560 --> 00:15:05,640 You just take the text and you put it into OpenAI. 191 00:15:05,640 --> 00:15:08,860 So how we did that is you just put in your OpenAI token at the top. 192 00:15:08,860 --> 00:15:14,480 Again, GPT-4 for this use case worked way better than GPT-3. 193 00:15:14,760 --> 00:15:19,800 Someone out there who is more of an AI wizard than I am, play with it. 194 00:15:19,800 --> 00:15:21,540 If you get it to work, let me know. 195 00:15:22,420 --> 00:15:24,840 But GPT-4 does it basically out of the box. 196 00:15:25,200 --> 00:15:36,520 This GPT conversation function that you see at the top is basically the out-of-the-box conversation API call that they would recommend you make using GPT-4. 197 00:15:36,960 --> 00:15:50,760 So the one thing I did play with that you can either turn off and on if you want to change the script, is this is using the chat completion part of the API, which technically speaking will save a chat if you want it to. 198 00:15:50,760 --> 00:15:56,560 I clear the chat every time because I'm doing 18,000 pieces of text. 199 00:15:56,560 --> 00:16:06,160 And if you keep trying to hand OpenAI an 18,000 thing long conversation, it will very quickly hit the token limit and you can't do it anymore. 200 00:16:06,160 --> 00:16:14,360 If you want to do something with conversations and keep some back-end data, you can probably play with that and actually use a tokenizer. 201 00:16:14,580 --> 00:16:15,940 I use TickToken. 202 00:16:16,120 --> 00:16:22,180 You can use a tokenizer and probably keep the back half of the conversation if you wanted to and maybe enrich the data even further. 203 00:16:22,180 --> 00:16:29,460 But what I did is I did one piece of text in a conversation, had OpenAI handle it, and started over with a fresh conversation. 204 00:16:29,820 --> 00:16:31,840 Just throwing that out there. 205 00:16:32,460 --> 00:16:35,980 Then all it's doing is, again, there's going to be a function for each one. 206 00:16:35,980 --> 00:16:42,040 I split it into functions that way if you want to just rip the function and do it for whatever your own thing is. 207 00:16:42,120 --> 00:16:48,120 This goes through the JSON and does all the XSS, all the SSRF, and we'll show the categories at the end. 208 00:16:48,360 --> 00:16:51,920 But this is basically just for every category there's a function for it. 209 00:16:52,200 --> 00:16:52,500 So... 210 00:16:53,700 --> 00:16:54,500 What? 211 00:16:55,780 --> 00:16:56,840 Okay, yeah. 212 00:16:57,880 --> 00:17:01,200 These are just... and all the functions are very similar. 213 00:17:01,760 --> 00:17:10,060 And then again, this is the conversation that will grab the conversation and print it out to the, as you can see here, to the volumetype-file in the test. 214 00:17:10,120 --> 00:17:15,540 So this test directory, this is what I was talking about, and this one I can open. 215 00:17:15,620 --> 00:17:17,640 This is not too big, hopefully. 216 00:17:17,920 --> 00:17:19,580 So this is what I was talking about. 217 00:17:19,580 --> 00:17:24,160 Data parsing in AI is interesting, and the output is never uniform. 218 00:17:24,160 --> 00:17:32,060 But, if you even look at these top couple things, you'll notice there's pretty obvious patterns in the output. 219 00:17:32,060 --> 00:17:41,140 First of all, 90% of those parameters that it gave me, it says the vulnerable parameter is, and then the vulnerable parameter is normally in some kind of quotation. 220 00:17:42,200 --> 00:17:50,280 So I can use regex on this dataset, which is now much smaller than the mountains of text that I just was putting into OpenAI. 221 00:17:50,760 --> 00:17:56,280 And it now also eliminated any report that it read and didn't find the parameter in the report. 222 00:17:56,280 --> 00:17:59,040 If it didn't find any parameter names in the report, those are now eliminated. 223 00:17:59,040 --> 00:18:06,980 So not only did I eliminate a huge amount of reports, but I lowered the amount of text to much lower where you can easily regex through this and it happens instantly. 224 00:18:07,480 --> 00:18:14,800 And we regex for any type of quotation, any type of list, anything that comes after a colon, a whole bunch of things. 225 00:18:15,460 --> 00:18:16,880 That is 226 00:18:23,670 --> 00:18:24,110 in... 227 00:18:24,110 --> 00:18:25,190 Oop, wrong one. 228 00:18:26,030 --> 00:18:27,190 This one, sorry. 229 00:18:29,530 --> 00:18:34,550 So these, again, this file here, when you look at it, and again, this is something you can play with too. 230 00:18:34,550 --> 00:18:37,150 If your data looks a little bit different, this one you can play with too. 231 00:18:37,150 --> 00:18:44,130 But this, I put little comments in the Python so you can know what each of the regex does. 232 00:18:44,310 --> 00:18:47,950 Thanks to ChadGPT for making my regexes, by the way, to look through its own data. 233 00:18:50,230 --> 00:19:00,310 So, like I said, there's stuff for quotes, there's stuff for single quotes, the dashes, there's stuff for REST API endpoints that lands inside two backslashes, colons, everything else. 234 00:19:00,310 --> 00:19:01,790 Like the list goes on and on. 235 00:19:02,030 --> 00:19:20,590 Then what it does is it takes, as it goes through the regexes, those regexes create their own list of data that they parsed out of the much smaller text, you combine all those files for each category, and you end up in here where now you actually have sorted, 236 00:19:20,590 --> 00:19:25,130 counted parameters from the output. 237 00:19:25,530 --> 00:19:30,830 And from here is how we then basically turned it into categories and lists. 238 00:19:30,830 --> 00:19:33,370 So , I think... 239 00:19:34,210 --> 00:19:35,230 Alright. 240 00:19:35,230 --> 00:19:39,110 So, let's look at the categories. 241 00:19:43,450 --> 00:19:44,930 Okay. 242 00:19:47,930 --> 00:19:51,770 So, we looked at file inclusion. 243 00:19:51,770 --> 00:19:59,590 What parameters when you do web application testing are most likely vulnerable to file inclusion of some sort. 244 00:19:59,610 --> 00:20:10,890 So, that is something like the parameter name lang, type, text domain, name, token, URL, path, etc., app, platform, resource type, file, default language, directory, API path name. 245 00:20:10,890 --> 00:20:18,450 So, if you've ever written an application, you probably use one of these keywords to reference how you handle a file or anything, right? 246 00:20:18,450 --> 00:20:28,150 And so in the English language, in my 15 years of testing web applications, I don't see any on here that I haven't found a file inclusion button on. 247 00:20:28,150 --> 00:20:31,010 I've found at least one on all of these parameters. 248 00:20:31,550 --> 00:20:35,330 We also did insecure direct object reference. 249 00:20:35,590 --> 00:20:49,250 So, of all of those two datasets, which at this point encompasses over 32,000 vulnerable parameters, out of all of those, out of all of the IDORs that existed there, these are the most statistically likely ones that have IDOR. 250 00:20:49,330 --> 00:20:57,230 The ID parameter, the user ID, username, email, extended data, username, data ID, etc. 251 00:20:57,410 --> 00:21:00,110 We also did redirect vulnerabilities. 252 00:21:00,710 --> 00:21:04,670 So, redirect, very common, has a high score in URL. 253 00:21:05,470 --> 00:21:13,670 The parameter next, redirect, return, host, you can see that redirect and return appear multiple times under permutations. 254 00:21:14,050 --> 00:21:15,510 So, it makes sense, right? 255 00:21:15,510 --> 00:21:18,970 A redirect vulnerability lies in these parameters. 256 00:21:19,010 --> 00:21:29,290 Now, one thing is that we looked at parameter data, but if your application uses RESTful URLs, you can just substitute these keyword terms for parameters instead. 257 00:21:29,290 --> 00:21:32,990 You could just look for them in the path instead of parameters. 258 00:21:34,690 --> 00:21:36,710 So, we also did SQL injection. 259 00:21:37,230 --> 00:21:46,370 Obviously, the biggest offender in SQL injection, because it fits the database nomenclature as ID, then email, refer, limit, search, token, username, password. 260 00:21:46,830 --> 00:21:53,290 Pro bounty tip, always try SQL injection in the refer, keep a blind SQL injection payload in your refer at all times. 261 00:21:53,630 --> 00:21:55,930 Hit that one many, many, many times. 262 00:21:57,110 --> 00:22:00,690 Server-side request forgery, we did the same thing here. 263 00:22:01,090 --> 00:22:07,610 Same thing, URL, source, start, host, those make a lot of sense for server-side request forgery. 264 00:22:08,290 --> 00:22:15,050 Server-side template injection, we didn't get great data for this, so we just... So, the GF patterns have more together. 265 00:22:15,050 --> 00:22:18,230 Okay, so hold on, we do have some stuff for server-side template injection. 266 00:22:18,310 --> 00:22:19,710 And then cross-site scripting. 267 00:22:20,590 --> 00:22:21,730 So, yeah. 268 00:22:21,730 --> 00:22:25,650 So these are the places where you're most likely to find vulnerable parameters. 269 00:22:26,470 --> 00:22:33,370 And the GF, so when you go up to the GF patterns, the GF patterns, so that was the output for only HackerOne, right? 270 00:22:33,370 --> 00:22:40,210 So HackerOne actually didn't have, at least that we found, using the parsing methods we found, didn't have anything for SSTI. 271 00:22:40,350 --> 00:22:44,790 Maybe it's not as common, maybe, you know, there's a possibility we missed it, either way. 272 00:22:44,790 --> 00:22:52,490 But, there's still old data from Hunt, that's still, like, it's old, but it's still very useful, and it's still the same parameters that are being used. 273 00:22:52,490 --> 00:22:56,510 So the GF patterns that we made are the full list of both, right? 274 00:22:56,510 --> 00:23:06,910 That's where they both come together, and same thing, the SUS parameters, if you use the SUS parameters list on XNL Hacker's GAP extension, that will be both data sets put together, right? 275 00:23:06,910 --> 00:23:23,670 So the GF patterns are basically the end product of Jason's old research, with the five people that were at the bottom, and our research this time, put together, and basically the goal of this is, A, to close the gap in experience, but again, I really want to reiterate, 276 00:23:23,670 --> 00:23:25,630 you can do this with anything. 277 00:23:25,770 --> 00:23:35,510 There's CVE data out there, there's XSS data out there, we will probably do that at some point, as we continue to play with the repo and bring in the database. 278 00:23:35,630 --> 00:23:42,710 Again, if you have internal data that's, you know, pertaining only to your company, make your own lists. 279 00:23:42,770 --> 00:23:46,470 The scripts are supposed to be out there, and the repo is public. 280 00:23:47,490 --> 00:23:55,270 Specifically so that this can maybe generate some other folks out there, to make maybe some different kind of lists for stuff that you would also want to see. 281 00:23:55,570 --> 00:24:03,590 This is kind of an opportunity, hopefully, to again close the experience gap in more fields than just vulnerable parameters. 282 00:24:03,850 --> 00:24:08,810 So we had planned to do CVE stuff, and we put it in the abstract for the talk. 283 00:24:08,810 --> 00:24:15,190 The problem we ran into is that many CVEs are like what I like to call ghost CVEs. 284 00:24:15,190 --> 00:24:22,870 They're CVEs that people say the bug class, and they put it out on CVE details or some other place, but they don't actually give you any exploitation data, right? 285 00:24:22,870 --> 00:24:25,770 They just said X product, how to cross-site scripting, whatever. 286 00:24:26,030 --> 00:24:32,310 And then the ones that do have proof of concepts, which include URL data, which we need to do this, are often on blogs. 287 00:24:32,310 --> 00:24:37,790 And so we have to do two steps of crawling, and we're close to figuring out all that. 288 00:24:38,170 --> 00:24:42,150 And so when we get that done, we'll probably try to tackle this data set. 289 00:24:42,150 --> 00:24:44,350 And we figured the last five years would be relevant. 290 00:24:44,350 --> 00:24:45,790 That's what we had planned for the talk. 291 00:24:45,790 --> 00:24:50,710 So we got stymied a little bit on this data set, but we really want to include it in the list as well. 292 00:24:51,430 --> 00:25:00,990 The other one we wanted to do was XSS.com, which if you've ever seen that site, it's purely XSS proof of concepts. 293 00:25:01,450 --> 00:25:02,310 Oh my god. 294 00:25:07,570 --> 00:25:09,710 So this is XSS.com. 295 00:25:09,710 --> 00:25:20,690 It's a hacker website where gray hat hackers post a bunch of XSS vulnerabilities, usually when they don't get paid through a bug bounty. 296 00:25:20,690 --> 00:25:26,450 So they have a total of 45,000 total XSS proof of concepts on XSS.com. 297 00:25:26,450 --> 00:25:30,490 So that one would specifically enrich the XSS data. 298 00:25:30,810 --> 00:25:43,530 Some other ones that we might look at in the future is actually looking at instead of looking at the bugs that come through HackerOne or BugCrowd, we could look at researcher lists. 299 00:25:43,530 --> 00:25:56,470 We could figure out a way to scrape their blogs and look at their personal research and see where they find cross-site scripting vulnerabilities, which was actually the first iteration of anything like this when stuff like this happened in 2014 or 2012 or something like that. 300 00:25:56,470 --> 00:25:59,870 So the possibilities are endless for us to keep enriching the lists. 301 00:26:00,510 --> 00:26:03,270 We think that this project will help a lot of people. 302 00:26:03,270 --> 00:26:08,550 And I think that's all we have. 303 00:26:08,610 --> 00:26:17,670 So last thing, I will say for people curious about cost, because the few people I've talked to about the talk before we gave it, that was the first question that came up. 304 00:26:18,330 --> 00:26:26,410 I parsed all of the HackerOne reports on a personal OpenAI token, and it was right around $30. 305 00:26:27,330 --> 00:26:31,070 So it's not, you know, not too bad. 306 00:26:32,910 --> 00:26:33,990 Any questions? 307 00:26:35,010 --> 00:26:36,330 Kind of talk fast. 308 00:26:37,710 --> 00:26:38,270 No? 309 00:26:38,270 --> 00:26:38,510 Cool. 310 00:26:38,510 --> 00:26:39,170 Thank you very much. 311 00:26:39,170 --> 00:26:39,930 Oh, wait, we got one. 312 00:26:39,930 --> 00:26:40,410 Sorry. 313 00:26:40,790 --> 00:26:42,310 Sorry, I killed you guys. 314 00:26:46,270 --> 00:26:46,990 Yeah. 315 00:26:54,570 --> 00:26:55,190 Oh, yeah. 316 00:26:55,910 --> 00:26:56,870 Oh, yeah. 317 00:26:57,010 --> 00:26:58,370 With every model. 318 00:26:58,370 --> 00:27:00,870 It will do it sometimes. 319 00:27:02,290 --> 00:27:04,030 Let me repeat the question. 320 00:27:04,030 --> 00:27:11,890 So the question was, did we try prompt engineering to change the prompt to pull out the data in the format that we wanted? 321 00:27:11,950 --> 00:27:17,730 If we said, give us the parameters this one way, did we try more specification in what we wanted? 322 00:27:17,730 --> 00:27:20,270 Did we change it to say different words? 323 00:27:20,370 --> 00:27:21,830 And the answer is yes. 324 00:27:22,070 --> 00:27:25,010 So we tried a lot of that with a lot of the different models. 325 00:27:25,010 --> 00:27:30,930 Even, because obviously it will definitely struggle to give you a JSON output or something like that. 326 00:27:30,930 --> 00:27:34,810 But even just trying to beg it to be like please just always put it in quotes. 327 00:27:34,810 --> 00:27:38,390 Like no matter what the extra stuff is, just please use double quotes. 328 00:27:38,530 --> 00:27:39,930 It'll do it. 329 00:27:39,930 --> 00:27:42,250 It looks almost identical. 330 00:27:42,490 --> 00:27:44,590 It's immensely frustrating. 331 00:27:45,750 --> 00:27:47,250 Was there any other questions? 332 00:27:47,450 --> 00:27:48,290 Yes, sir. 333 00:28:02,080 --> 00:28:03,540 Boom. 334 00:28:04,080 --> 00:28:05,600 Yeah. 335 00:28:13,480 --> 00:28:15,920 You could try. 336 00:28:15,920 --> 00:28:19,080 I feel so bad for your open AI token. 337 00:28:19,820 --> 00:28:25,280 Like I guess I never just like let it fully exhaust itself into infinity. 338 00:28:25,280 --> 00:28:27,400 But I tried doing retries. 339 00:28:27,400 --> 00:28:35,480 I even tried going to the quoted version, and then taking the quoted version, like slowly going downhill, and it still is... 340 00:28:36,280 --> 00:28:39,880 Yeah, it has a really hard time creating structured output like JSON. 341 00:28:39,880 --> 00:28:41,080 It just doesn't work. 342 00:28:41,340 --> 00:28:46,180 I don't know why, but it hallucinates formats, it adds extra characters. 343 00:28:46,560 --> 00:28:48,940 It's just because it's trained on next characters, right? 344 00:28:48,940 --> 00:28:52,120 It just doesn't create structured JSON very well. 345 00:28:52,920 --> 00:28:54,500 Not saying it can't be improved. 346 00:28:54,500 --> 00:28:56,360 Again, I'm not saying I'm the expert. 347 00:28:56,360 --> 00:28:58,020 This is just like what we've tried. 348 00:28:58,120 --> 00:29:04,300 Again, that is probably if you play with this project, that is probably one of the areas to play with, right? 349 00:29:04,300 --> 00:29:05,640 Yeah, I mean we wanted that to work. 350 00:29:05,640 --> 00:29:07,180 We really did want that to work. 351 00:29:11,540 --> 00:29:12,480 Yep, yep. 352 00:29:12,480 --> 00:29:21,400 So I actually counted... so with the regex I actually counted how many lines I was actually catching with the regex versus how many I was just like dropping. 353 00:29:22,020 --> 00:29:24,600 And the regex was able to catch like 98%. 354 00:29:24,600 --> 00:29:25,620 Right? 355 00:29:25,620 --> 00:29:32,200 So I mean there's like 2% there that probably still had malformed data or whatever, but like that was as close as I could get. 356 00:29:32,200 --> 00:29:39,560 Without literally making like a whole list of like 80 regexes for every single... at that point you're just manually going through the file anyway. 357 00:29:39,780 --> 00:29:41,900 And I... why even script it, right? 358 00:29:41,960 --> 00:29:42,940 So, yeah. 359 00:29:43,280 --> 00:29:45,100 So this is the repo and you guys can use it. 360 00:29:45,100 --> 00:29:45,840 Any other questions? 361 00:29:46,320 --> 00:29:47,120 Yes . 362 00:29:47,120 --> 00:29:47,920 ... 363 00:29:56,640 --> 00:29:59,220 That's actually a really great question. 364 00:29:59,220 --> 00:30:07,120 So the question was, could you subcategorize these into parameters that were most likely vulnerable on an industry vertical? 365 00:30:07,380 --> 00:30:11,060 Like finance or banking or automotive or something like that. 366 00:30:11,400 --> 00:30:16,360 You could with the HackerOne data I believe because they... I think they reference the vertical, don't they? 367 00:30:16,400 --> 00:30:21,700 So you can with the HackerOne data if you're going to go deep into it because they always reference the target. 368 00:30:21,920 --> 00:30:24,120 The publicly disclosed reports always say a target. 369 00:30:24,120 --> 00:30:33,080 So if you're willing to make a master list of like for instance the HackerOne targets and say okay this target is financial, this target is like XYZ or gaming or whatever it may be. 370 00:30:33,220 --> 00:30:35,260 You could probably do that with AI pretty easily. 371 00:30:35,500 --> 00:30:35,860 Yeah. 372 00:30:35,860 --> 00:30:36,780 So it is possible. 373 00:30:36,780 --> 00:30:37,100 Yep. 374 00:30:38,440 --> 00:30:39,840 Any other questions? 375 00:30:40,940 --> 00:30:41,360 Okay. 376 00:30:41,360 --> 00:30:42,480 Now you guys can clap for Gunnar. 377 00:30:42,480 --> 00:30:43,560 Thanks guys.