1 00:00:00,000 --> 00:00:03,060 So this is my testing box. So before we get started with the 2 00:00:03,060 --> 00:00:06,520 talk, all of these ideas are a methodology on how to do recon. 3 00:00:07,380 --> 00:00:11,540 Now I have with basically bubble gum and popsicle sticks stitched 4 00:00:11,540 --> 00:00:14,620 this together into some automation just back scripting, 5 00:00:14,680 --> 00:00:18,180 right? A lot of this stuff can be done automatically. Some of 6 00:00:18,180 --> 00:00:21,240 it takes like kind of contextual knowledge but most of it can be 7 00:00:21,240 --> 00:00:26,220 automated. So we're going to choose one of two targets. Both 8 00:00:26,220 --> 00:00:28,320 have bug bounties and bug crowd. I'm not doing anything 9 00:00:28,320 --> 00:00:31,700 illegal to enumerate while we're doing the talk. So you 10 00:00:31,700 --> 00:00:37,520 have your choice of twitch.tv or Tesla. Who wants twitch? Twitch? 11 00:00:38,140 --> 00:00:43,240 Okay. Who wants Tesla? Okay. Twitch is the winner. All right. 12 00:00:43,660 --> 00:00:54,880 So let me start this up and this takes a while to run. All right. 13 00:00:56,120 --> 00:00:58,300 So this is literally my script I use to run my tests. So I'm 14 00:00:58,320 --> 00:01:00,460 going to use when I'm red teaming our bug bounty hunting. 15 00:01:00,840 --> 00:01:03,160 And so we're going to go through the talk and the output but this 16 00:01:03,160 --> 00:01:04,820 takes a little while to run. Hopefully it will be done by the 17 00:01:04,820 --> 00:01:14,640 end of the talk. Okay. Emergent recon. Already did the intro. 18 00:01:15,260 --> 00:01:17,660 The only thing I will say additionally is that I'm a dad. 19 00:01:17,880 --> 00:01:21,440 I love my kids. And that's my girl winning, well not winning 20 00:01:21,440 --> 00:01:24,820 but solving her first CTF challenges at OWASP CTF in Santa 21 00:01:24,820 --> 00:01:28,300 Barbara. So really proud of her there. I'm also a huge game 22 00:01:28,320 --> 00:01:31,120 gamer. I play a bunch of games. So you can probably socially 23 00:01:31,120 --> 00:01:34,500 enumerate my battle tag or something like that and add me on 24 00:01:34,500 --> 00:01:38,640 steam or wow or whatever I play. All right. The first section. 25 00:01:38,760 --> 00:01:42,120 Discovering IP space. So one of the methods I use to discover 26 00:01:42,120 --> 00:01:45,820 IP space is keyword searching by organization. Now these slides 27 00:01:45,820 --> 00:01:48,740 show Tesla but the tool that we're running we're going to do 28 00:01:48,740 --> 00:01:53,340 twitch. So the best place to do this searching for what's called 29 00:01:53,340 --> 00:01:57,860 an autonomous system number is this site called bgp.he.net. The 30 00:01:57,860 --> 00:01:58,300 reason I'm doing this is because I'm not going to be able to do it 31 00:01:58,320 --> 00:01:58,340 without a lot of people. So I'm going to go ahead and show you 32 00:01:58,340 --> 00:01:59,360 what I'm going to do. So the reason you want to find an 33 00:01:59,360 --> 00:02:01,040 autonomous system number, right, if you're a large enough 34 00:02:01,040 --> 00:02:04,640 organization and you run your own network, really the Internet is 35 00:02:04,640 --> 00:02:07,500 not globally connected computers. It's globally connected little 36 00:02:07,500 --> 00:02:09,880 networks. Well not little at all. They're very large. They're 37 00:02:09,880 --> 00:02:13,520 called autonomous systems. When you have a large enough system or 38 00:02:13,520 --> 00:02:16,380 network you have to register it. And so when you register it you 39 00:02:16,380 --> 00:02:19,960 have to register a description or a name of your company. This is 40 00:02:19,960 --> 00:02:22,840 one of the only sites that allows you to search keywords to match 41 00:02:22,840 --> 00:02:26,260 company names to autonomous system numbers. So here you have 42 00:02:26,260 --> 00:02:28,300 Tesla Motors and you can see they're searching for a company. 43 00:02:28,320 --> 00:02:30,820 They're starting registered IP space on the right-hand side there. 44 00:02:30,920 --> 00:02:36,340 That 209-133-709-024, Tesla Motors Inc. Now what's awesome about 45 00:02:36,340 --> 00:02:39,980 keyword searching for this type of data is basically they might 46 00:02:39,980 --> 00:02:42,520 have registered another autonomous system number under a 47 00:02:42,520 --> 00:02:45,980 different entity name. And so here you can also see on the 48 00:02:45,980 --> 00:02:48,860 left-hand side that searching for just Tesla also came back with 49 00:02:48,860 --> 00:02:52,160 Tesla Engineering Group. So they might have a different autonomous 50 00:02:52,160 --> 00:02:58,180 system that I want to enumerate for a wide scope bounty. So 51 00:02:58,320 --> 00:03:01,220 then there's always your verbatim registries, right? Aaron and Wright. 52 00:03:01,320 --> 00:03:05,620 These have Whois data, reverse Whois data on anybody. They both have 53 00:03:05,620 --> 00:03:08,280 web services that will allow you to do keyword searches on things 54 00:03:08,280 --> 00:03:11,660 like Twitch or Tesla or whoever. This will start giving you back IP 55 00:03:11,660 --> 00:03:15,620 space that you can start adding to basically your list of things 56 00:03:15,620 --> 00:03:18,200 that you're going to hack. All of this goes around building a list 57 00:03:18,200 --> 00:03:21,160 of things you want to hack in your red team engagement or your 58 00:03:21,160 --> 00:03:26,680 bug bounty hunting. So someone said Shodan earlier. Shodan also 59 00:03:26,680 --> 00:03:28,300 allows you to search by the organization of the organization of the 60 00:03:28,320 --> 00:03:31,820 organization tag. So here you can say org colon Tesla plus 61 00:03:31,820 --> 00:03:34,660 motors. You can also search just by keyword Tesla, but you'll get 62 00:03:34,660 --> 00:03:37,720 a lot more results. This will start giving you everything that 63 00:03:37,720 --> 00:03:39,780 Shodan is giving you. What Shodan is, it's an Internet 64 00:03:39,780 --> 00:03:43,660 spider that goes a little bit deeper and has indexes and is 65 00:03:43,660 --> 00:03:46,840 available to hackers. It will basically profile technology, 66 00:03:47,520 --> 00:03:51,160 stack, IP information, certificate information, a little 67 00:03:51,160 --> 00:03:53,640 bit deeper than any regular spider goes. And it keeps it in 68 00:03:53,640 --> 00:03:56,880 this large database that you can query for almost free and even 69 00:03:56,880 --> 00:03:58,300 the paid version is really not that expensive. And then you can 70 00:03:59,080 --> 00:04:02,100 search for other things. So here you can search Tesla Motors in 71 00:04:02,100 --> 00:04:04,360 this instance and find out that there's a whole bunch of systems 72 00:04:04,360 --> 00:04:08,480 already out there. You can also search for title. This parses out 73 00:04:08,480 --> 00:04:10,960 title which can be really useful because if you're looking for a 74 00:04:10,960 --> 00:04:13,680 specific type of device or technology that they might have on their 75 00:04:13,680 --> 00:04:17,000 network that's vulnerable, you'll see it right away in the Shodan 76 00:04:17,000 --> 00:04:23,120 search results. So this is a little stopping place. And I actually 77 00:04:23,120 --> 00:04:26,260 don't really show this very much because it's not really hacking, 78 00:04:26,380 --> 00:04:28,300 but it's super useful for me when I'm doing this kind of thing. So 79 00:04:28,320 --> 00:04:31,820 I'm doing this large base recon on a site like Twitch. So I 80 00:04:31,820 --> 00:04:35,480 organize all my testing inside of mind maps. And you could do 81 00:04:35,480 --> 00:04:37,480 this inside of an Excel spreadsheet or OneNote or 82 00:04:37,480 --> 00:04:41,560 something like that. But I use Xmind. And I thought I'd just 83 00:04:41,560 --> 00:04:46,120 kind of show you how this works out. So here I've started a 84 00:04:46,120 --> 00:04:50,320 campaign or a bounty hunt against Twitch, right? So the 85 00:04:50,320 --> 00:04:52,880 top level node in my mind map just says that it's Twitch the 86 00:04:52,880 --> 00:04:56,300 company, right? Because actually I know that Twitch has a lot of 87 00:04:56,300 --> 00:04:58,300 domains and they're not all named Twitch.tv. So I'm going to 88 00:04:58,320 --> 00:05:01,520 discover that in the tool that we just looked at and some other 89 00:05:01,520 --> 00:05:04,340 tools we're going to look at. So I'm just going to start filling 90 00:05:04,340 --> 00:05:09,560 this out as we're going along, right? So if I go look for, you 91 00:05:09,560 --> 00:05:12,740 know, Twitch's IP space, I'll add a tree here and I'll just say 92 00:05:12,740 --> 00:05:17,900 IP space here. And then I'll keep, oh, that's not spelled 93 00:05:17,900 --> 00:05:24,080 right. Good job. And I'll keep that range here. I can go look 94 00:05:24,080 --> 00:05:27,120 for it in a second. And then I'll start adding domains in the 95 00:05:27,120 --> 00:05:27,800 top level node. 96 00:05:28,320 --> 00:05:30,540 Now, this doesn't look like much when you start it. But by the 97 00:05:30,540 --> 00:05:33,040 end of this, you will have a lot of data that you can start 98 00:05:33,040 --> 00:05:36,300 working with in this tree. What this ends up looking like is 99 00:05:36,300 --> 00:05:46,800 something like this. There it is. What it ends up is looking 100 00:05:46,800 --> 00:05:50,000 like something like this, where I have nodes of a top level 101 00:05:50,000 --> 00:05:53,580 domain that's in scope, Twitch.tv in the upper right-hand 102 00:05:53,580 --> 00:05:57,000 side. And now I have lists of subdomains and outputs of tools. 103 00:05:57,240 --> 00:05:58,300 And this is how I organize my subdomains and outputs of tools. 104 00:05:58,320 --> 00:06:01,360 I organize my information. And basically, how do you eat an 105 00:06:01,360 --> 00:06:03,340 elephant with all of these sites that you're finding, all these 106 00:06:03,340 --> 00:06:05,740 subdomains? Well, one byte at a time. Right? Like, I test each 107 00:06:05,740 --> 00:06:10,000 site individually, one site at a time, once I find them. I do an 108 00:06:10,000 --> 00:06:12,460 abbreviated methodology for web hacking on each one of these 109 00:06:12,460 --> 00:06:15,260 sites once I know that they're real and they're owned by Twitch. 110 00:06:15,900 --> 00:06:18,240 And then I just go through things like content discovery, 111 00:06:18,480 --> 00:06:21,960 like dynamic parameter discovery, fuzzing, basic cross 112 00:06:21,960 --> 00:06:24,400 site scripting checks, basic SQL injection checks, default 113 00:06:24,400 --> 00:06:28,300 passwords, all that kind of stuff. And then I mark them by, 114 00:06:28,320 --> 00:06:31,520 by progress. So if it's green, I'm done with it. I've made a 115 00:06:31,520 --> 00:06:35,800 first pass over that domain. And if a, or actually, if it's green, 116 00:06:35,880 --> 00:06:39,560 it didn't have a vulnerability. A check mark is based if I 117 00:06:39,560 --> 00:06:42,600 finished the testing on the site or not. So here we have a red 118 00:06:42,600 --> 00:06:45,040 entry on the bottom that has no check mark and is red. It means I 119 00:06:45,040 --> 00:06:47,020 found a vulnerability. I'm probably still testing on it. 120 00:06:47,640 --> 00:06:50,420 Orange is like, I've put it off till later. Something about 121 00:06:50,420 --> 00:06:52,940 that site has caused me to say, I don't want to do this right 122 00:06:52,940 --> 00:06:55,280 now. I'm going to put off this work till later because maybe 123 00:06:55,280 --> 00:06:58,300 this subdomain has some special technology that I just don't want 124 00:06:58,320 --> 00:07:01,220 to dive into right at this second. And I do this for every 125 00:07:01,220 --> 00:07:04,240 top level domain. So down here, you can see that Twitch actually 126 00:07:04,240 --> 00:07:08,820 owns Justin's hot TV, CurseForge. They also own, own 127 00:07:08,820 --> 00:07:11,980 Curse, Twitch app, and Curse app. Those are all top level 128 00:07:11,980 --> 00:07:14,800 domains they own. And I'm going to do this same recon methodology 129 00:07:14,800 --> 00:07:19,960 for each one of those top level domains. All right. So 130 00:07:19,960 --> 00:07:23,740 discovering new targets. Let's see here. Here we go. Yeah, so 131 00:07:23,740 --> 00:07:27,500 show DOM was the last thing. So now, now that I have some IP 132 00:07:27,500 --> 00:07:28,300 space, right? Show DOM is the last thing. So now, now that I 133 00:07:28,320 --> 00:07:30,760 show DOM is giving me some information, I have maybe the 134 00:07:30,760 --> 00:07:34,960 main IP space stuff from just Twitch.tv, which I know is their 135 00:07:34,960 --> 00:07:38,120 main site. And then, you know, I have some other information 136 00:07:38,120 --> 00:07:41,660 that maybe I got other places. Now I want to see if maybe they 137 00:07:41,660 --> 00:07:45,500 have some different kinds of brands, not just Twitch.tv and 138 00:07:45,500 --> 00:07:48,180 maybe not just having their IP ranges. I want to find out if 139 00:07:48,180 --> 00:07:51,180 Twitch has acquired anyone really recently. I want to see 140 00:07:51,180 --> 00:07:53,540 where they're linking to off their main site. So there's a 141 00:07:53,540 --> 00:07:55,920 lot of good tools to do this. And I want to do some tracker 142 00:07:55,920 --> 00:07:58,580 analysis of their ad and analytics, because this will 143 00:07:58,580 --> 00:08:01,220 reveal other places where they're using those ad and 144 00:08:01,220 --> 00:08:03,880 analytics. And I can add those, because they're probably related 145 00:08:03,880 --> 00:08:08,180 to Twitch. So acquisitions is pretty simple. This hasn't 146 00:08:08,180 --> 00:08:10,480 changed much in the last year. Crunchbase is still the number 147 00:08:10,480 --> 00:08:13,040 one place to go to find acquisition data. A lot of day 148 00:08:13,040 --> 00:08:16,700 traders use Crunchbase to figure out information on trading for 149 00:08:16,700 --> 00:08:20,840 or investing in companies, startups, whatever. It also has 150 00:08:20,840 --> 00:08:22,900 a lot of news. But the subsection that says 151 00:08:22,900 --> 00:08:25,660 acquisitions, you can drill down into any company and see, 152 00:08:25,920 --> 00:08:28,960 pretty concretely, who they've acquired. And it's updated 153 00:08:28,960 --> 00:08:32,200 really, really frequently. So here you can see in the last few 154 00:08:32,200 --> 00:08:36,420 years, Tesla has acquired Gromit Engineering, SolarCity, and 155 00:08:36,420 --> 00:08:39,440 Riviera Tool. Now, when you take over an organization like 156 00:08:39,440 --> 00:08:41,680 this, if you're a big parent organization, you probably 157 00:08:41,680 --> 00:08:44,380 decommission all of their IP space and probably their 158 00:08:44,380 --> 00:08:47,800 servers. You dead link all of their DNS entries or remove them 159 00:08:47,800 --> 00:08:51,480 all together. You nuke all their CNAMs. But really, that 160 00:08:51,480 --> 00:08:53,940 doesn't actually happen 100%. They probably still have some 161 00:08:53,940 --> 00:08:55,900 cloud infrastructure out there that they forgot was up and 162 00:08:55,920 --> 00:08:58,400 running. They have probably customer data leaked some 163 00:08:58,400 --> 00:09:01,580 places. This happens all the time. So if you're a wide scope 164 00:09:01,580 --> 00:09:04,880 program like Tesla, who says, we care about all security 165 00:09:04,880 --> 00:09:08,340 vulnerabilities on our bounty, I look at these, too. I look at 166 00:09:08,340 --> 00:09:11,440 SolarCity. I look at, you know, Riviera Tool to see if these 167 00:09:11,440 --> 00:09:15,100 domains, when the websites used to exist, you know, reveal some 168 00:09:15,100 --> 00:09:20,460 type of sites that maybe have vulnerabilities in them. So 169 00:09:20,460 --> 00:09:23,640 link discovery is this idea of finding out what the main site 170 00:09:23,640 --> 00:09:25,900 is linking to. And there's often a lot of, you know, there's a 171 00:09:25,920 --> 00:09:29,020 lot of links that are outgoing from a website or even incoming. 172 00:09:30,200 --> 00:09:33,340 And you can do this recursive link discovery in a tool called 173 00:09:33,340 --> 00:09:36,100 Burp Suite. How many of you used Burp Suite before? Very 174 00:09:36,100 --> 00:09:39,580 good. All right. So we're going to do this real quick. And we'll 175 00:09:39,580 --> 00:09:43,000 try it on Twitch, see if it works, if the demo gods will love 176 00:09:43,000 --> 00:09:52,180 me. I'm going to boot up my Burp testing profile here and put 177 00:09:52,180 --> 00:09:53,060 Burp on the right. 178 00:09:56,760 --> 00:09:59,800 When I started this morning, my license had expired. I had to 179 00:09:59,800 --> 00:10:04,060 buy a new license. I was like, oh, this is painful. All right. 180 00:10:04,800 --> 00:10:11,160 So now we have Burp. And our browser on the left. And let's 181 00:10:11,160 --> 00:10:14,660 just, let's do some things before we start. So the first 182 00:10:14,660 --> 00:10:19,140 thing we want to do is make sure that spider in Burp is not 183 00:10:19,140 --> 00:10:21,540 passively spidering as I'm browsing. I don't want to do 184 00:10:21,540 --> 00:10:24,120 that. I just want to instrument a certain thing right now. So 185 00:10:24,120 --> 00:10:25,900 I'm going to disable passive spidering as you browse. And I 186 00:10:26,640 --> 00:10:30,460 want to say max link depth for this exercise is one in Burp. 187 00:10:30,560 --> 00:10:35,200 And max parameters that I want to crawl is 25. And then I'm 188 00:10:35,200 --> 00:10:40,200 going to say when it sees a form, a login form, usually Burp 189 00:10:40,200 --> 00:10:42,260 prompts for guidance. This is super annoying if you've ever 190 00:10:42,260 --> 00:10:45,960 used Burp before. So you can either say don't submit login 191 00:10:45,960 --> 00:10:48,400 forms or you can say automatically submit these 192 00:10:48,400 --> 00:10:52,320 credentials. I usually for this exercise choose don't submit 193 00:10:52,320 --> 00:10:55,880 login forms. Number of threads is fine. And then form 194 00:10:55,920 --> 00:10:58,700 in general, I'm just not going to submit forms for this spider. 195 00:10:59,280 --> 00:11:02,720 So I've set up my Burp spider settings here. And now I'm going 196 00:11:02,720 --> 00:11:04,860 to set up some scope. So if I go to the target tab and I go to 197 00:11:04,860 --> 00:11:09,100 scope, really what I want to check out first is adding 198 00:11:09,100 --> 00:11:13,120 anything that I know says Twitch. Now Burp has a little 199 00:11:13,120 --> 00:11:14,940 bit of different functionality than last year that they've 200 00:11:14,940 --> 00:11:18,000 launched. So you have the verbatim ability to add a real 201 00:11:18,000 --> 00:11:21,780 domain or URL here to add in scope. And normally when you 202 00:11:21,780 --> 00:11:24,740 right click on a site and add something to scope, that's what 203 00:11:24,740 --> 00:11:25,900 it's doing. I don't want to do that. I just want to make sure 204 00:11:25,920 --> 00:11:28,920 I don't actually care about that because I don't know any 205 00:11:28,920 --> 00:11:31,520 domains except for the main one yet that I want in scope. What I 206 00:11:31,520 --> 00:11:35,400 actually want to do is basically say anything that has the 207 00:11:35,400 --> 00:11:38,920 keyword Twitch is going to be in scope for this project. So if 208 00:11:38,920 --> 00:11:41,940 you click this box right here that says use advanced scope 209 00:11:41,940 --> 00:11:45,100 control, you can say add. And you don't have to anymore supply 210 00:11:45,100 --> 00:11:50,340 a fully qualified URL. So here I can just now say Twitch. And 211 00:11:50,340 --> 00:11:52,260 just say okay. So now that becomes my scope for this 212 00:11:52,260 --> 00:11:55,900 project. I'll say yes here. Do I want to link this to the 213 00:11:55,900 --> 00:11:59,040 limit history for just that thing. Okay. So now let's go to 214 00:11:59,040 --> 00:12:16,060 Twitch.TV. All right. Make sure burps on. Oh, that was the dude 215 00:12:16,060 --> 00:12:23,140 streaming. My bad. That really confused me. All right. So we're 216 00:12:23,140 --> 00:12:25,680 now proxying Twitch through burp. You can see that intercept 217 00:12:25,900 --> 00:12:29,940 has said yo, there's traffic coming through here. So we're 218 00:12:29,940 --> 00:12:31,820 going to turn intercept off and just let everything go through. 219 00:12:32,140 --> 00:12:35,480 And then go back to our site map. All right. So already just 220 00:12:35,480 --> 00:12:38,140 by visiting the main page, we have some subdomains that are hot 221 00:12:38,140 --> 00:12:40,540 linked off of the main page. And the idea here of this link 222 00:12:40,540 --> 00:12:43,720 discovery idea is we're going to iteratively now spider everything 223 00:12:43,720 --> 00:12:48,500 we find to find more subdomains. So first let's just choose GKL 224 00:12:48,500 --> 00:12:55,800 that's what Twitch will add this to basically spider this. Oh, 225 00:12:55,900 --> 00:13:00,680 there we go. Twitch.TV. We'll just spider everything. If 226 00:13:00,680 --> 00:13:04,360 possible. Yeah. Right click. Spider here. All right. Already 227 00:13:04,360 --> 00:13:07,580 the spider has started to return a whole bunch of content for 228 00:13:07,580 --> 00:13:10,620 linked stuff. Not just on Twitch.TV now but also the 229 00:13:10,620 --> 00:13:14,540 things we just chose a second ago. So now we start to get a 230 00:13:14,540 --> 00:13:19,760 pretty good map of stuff that Twitch is related to. Now 231 00:13:19,760 --> 00:13:24,080 because I am parsing on a keyword, we're also getting the 232 00:13:24,080 --> 00:13:25,880 benefit of seeing what vendors they integrate. So we're going 233 00:13:25,900 --> 00:13:26,840 to do a little bit of spidering right here. Some of these are 234 00:13:26,840 --> 00:13:31,380 not Twitch.TV domains. They're ad systems or like other things 235 00:13:31,880 --> 00:13:35,280 that have Twitch in the URL or the domain which can be pretty 236 00:13:35,280 --> 00:13:38,480 useful for us to know to gather information on the target. So 237 00:13:38,480 --> 00:13:41,220 the idea here is recursively I would start selecting this and 238 00:13:41,220 --> 00:13:44,820 keep on spidering until I built out a huge map of domains. And 239 00:13:44,820 --> 00:13:46,800 those would go on my list of things to test. I need to test 240 00:13:46,800 --> 00:13:49,080 every single one of these things. Which seems like a 241 00:13:49,080 --> 00:13:51,320 daunting task but if you abbreviate your web testing 242 00:13:51,320 --> 00:13:55,740 methodology, you can absolutely do it. I had a bounty the other 243 00:13:55,740 --> 00:13:55,880 day. I had a bounty the other day. I had a bounty the other 244 00:13:55,900 --> 00:14:02,120 day that was upwards of I think 5,000 found live hosts. And I 245 00:14:02,120 --> 00:14:05,080 spent, well this was the other day, the other month. I spent 246 00:14:05,080 --> 00:14:08,160 about a month on it and I think I made 20 grand in a month. So 247 00:14:08,160 --> 00:14:13,560 it's not bad. Okay. So you would then select all these, 248 00:14:13,620 --> 00:14:16,080 spider these. How do you take this information, add it to your 249 00:14:16,080 --> 00:14:18,560 mind map or just make it in a list so you can feed it to other 250 00:14:18,560 --> 00:14:21,420 tools? Burp actually doesn't have a copy all targets function 251 00:14:21,420 --> 00:14:25,500 which I hope they do pretty soon. But what you have to do is 252 00:14:25,500 --> 00:14:27,480 actually you have to have the pro version and you select 253 00:14:27,480 --> 00:14:31,260 everything here and you right click and you say engagement 254 00:14:31,260 --> 00:14:38,340 tools, analyze target. And analyze target builds you this 255 00:14:38,340 --> 00:14:42,060 report, PDF report of all the domains and information about 256 00:14:42,060 --> 00:14:44,620 what dynamic parameters they have. And this is, you know, burp 257 00:14:44,620 --> 00:14:47,760 usage. But if you save the report, here I won't do it right 258 00:14:47,760 --> 00:14:50,200 now, but if you save the report it gives you a PDF report. And 259 00:14:50,200 --> 00:14:53,000 this is the most effective way to just copy and paste the list 260 00:14:53,000 --> 00:14:55,400 of targets that you have on the left hand side right there. It's 261 00:14:55,400 --> 00:14:58,280 just, there just doesn't exist a function to copy all targets on 262 00:14:58,280 --> 00:15:01,720 the left hand side of burp. So, save this as a PDF, open the 263 00:15:01,720 --> 00:15:05,740 PDF, copy the table and dump it into something else. Any 264 00:15:05,740 --> 00:15:12,960 questions? No. Alright. Quite a few hosts for Twitch. What? 265 00:15:14,080 --> 00:15:19,520 Yes. Yeah, to do that you need to have the professional version 266 00:15:19,520 --> 00:15:24,380 of burp unfortunately. Yeah. That doesn't exist in free. Alright. 267 00:15:27,400 --> 00:15:32,280 Yes. Can you use what? Zap for what? Oh, zap. Not zap. Yeah. 268 00:15:33,840 --> 00:15:36,020 Good question. I don't think that they have that function 269 00:15:36,020 --> 00:15:38,600 either. But you can use that for everything in here. The same 270 00:15:38,600 --> 00:15:42,020 stuff happens with zap. Zap has a spider. In fact, zap spider 271 00:15:42,020 --> 00:15:45,540 right now might be arguably better than burp because it 272 00:15:45,540 --> 00:15:48,600 handles JavaScript really well. Although burp just released a 273 00:15:48,600 --> 00:15:50,820 blog really recently that they're updating their whole 274 00:15:50,820 --> 00:15:53,760 spider engine to just be awesome. I'm so excited about 275 00:15:53,760 --> 00:15:55,380 that. So, yeah. So, yeah. So, yeah. So, yeah. So, yeah. So, yeah. So, 276 00:15:55,380 --> 00:15:55,520 I'm so excited about that. So, yeah. So, yeah. So, yeah. So, 277 00:15:55,520 --> 00:15:58,220 the future, maybe that will change in, you know, a couple 278 00:15:58,220 --> 00:16:00,820 weeks. But zap labs absolutely work for this workflow as well. 279 00:16:00,820 --> 00:16:04,000 Or as well as, like, Charles and some of the other 280 00:16:04,000 --> 00:16:10,020 InterceptionProxies. Alright. We will. Nukes. Alright. So, 281 00:16:10,060 --> 00:16:15,440 that was a demo for link discovery. Oh, not shared. We 282 00:16:15,440 --> 00:16:22,460 won't present. Cool. Alright. So, someone said, who is data or 283 00:16:22,460 --> 00:16:25,360 reverse who has data is a method where we could start to 284 00:16:25,380 --> 00:16:29,220 to find related domains or IP space of some of our targets. 285 00:16:29,400 --> 00:16:31,360 Now this is a tool that's relatively new called DOM link. 286 00:16:32,580 --> 00:16:35,740 It's written by a guy named Vincent Yu. He does this really 287 00:16:35,740 --> 00:16:39,540 cool Twitter thing called red team tips. He has over like 200 288 00:16:39,540 --> 00:16:42,960 red team tips that he tweets out every other day or something like 289 00:16:42,960 --> 00:16:45,700 that. There's some really useful nuggets in there if you're doing 290 00:16:45,700 --> 00:16:48,220 red teaming or just bug bounty in general. But he created this 291 00:16:48,220 --> 00:16:52,600 tool that's based off of this site called Huaxi. Huaxi is a 292 00:16:52,600 --> 00:16:55,900 website that offers an API that's really cheap to access 293 00:16:55,900 --> 00:17:00,220 for and it has a free version. It has a free number of queries 294 00:17:00,220 --> 00:17:03,820 you can do to it for reverse who is data. So he created a tool 295 00:17:03,820 --> 00:17:08,680 that will recursively basically look at a couple of things for 296 00:17:08,680 --> 00:17:11,800 an organization. Mostly the most useful one is organization name. 297 00:17:12,300 --> 00:17:14,940 So I'm going to show this real quick and what this looks like. 298 00:17:15,040 --> 00:17:19,480 So this will query this Huaxi database, this tool will, with 299 00:17:19,480 --> 00:17:22,120 an API key that you sign up for it. You can do, I think, 300 00:17:22,200 --> 00:17:22,580 a hundred and twenty-five different things with it. So 301 00:17:22,600 --> 00:17:24,920 you can do a hundred and fifty queries before your free version 302 00:17:24,920 --> 00:17:29,280 is gone. And it will help you basically search for any site 303 00:17:29,280 --> 00:17:32,620 that has the registered company name of whoever registered your 304 00:17:32,620 --> 00:17:35,220 main target. So let's see if this works for Twitch. 305 00:17:55,780 --> 00:17:56,840 I'll make this bigger in a second. 306 00:18:15,760 --> 00:18:22,440 Oh, Caps Lock was on. Uber Hacker up here. 307 00:18:22,600 --> 00:18:26,660 Can't get in with Caps Lock. Okay. All right. So I'm on my test block. 308 00:18:26,780 --> 00:18:31,360 So let's see the tools and I think DOM link is where I'm putting all this stuff. 309 00:18:31,580 --> 00:18:42,660 Okay. So do a Python. DOM link. Let's see how Twitch has their, 310 00:18:42,820 --> 00:18:51,700 who is information set up. Twitch.tv-c. Okay. Let's see if this works. 311 00:18:53,080 --> 00:18:57,980 Okay. So their registrant name is Twitch Interactive Ink, which I think is 312 00:18:57,980 --> 00:19:02,400 actually correct, right? So this tool is going to ask me, do you want me to check the whole 313 00:19:02,400 --> 00:19:06,840 database for Twitch Interactive Ink and give you back what domains those are? So I'm going to 314 00:19:06,840 --> 00:19:11,320 say yes. Now this can get iteratively recursive because they might have actually registered 315 00:19:11,320 --> 00:19:16,180 under Twitch or Twitch Interactive or Twitch Engineering. Like, people register stuff very 316 00:19:16,180 --> 00:19:19,680 weirdly. There's no, in a lot of companies, there's not like a standard way that you do this 317 00:19:19,680 --> 00:19:22,580 unless you're very pattened down with how your registration works. So I'm going to go ahead and 318 00:19:22,600 --> 00:19:26,360 see if this works. So a lot of the times, it will actually alert me on a couple of these. It'll 319 00:19:26,360 --> 00:19:30,460 say, I found five with the keyword Twitch in them. Maybe we should check all of these out. 320 00:19:30,560 --> 00:19:36,600 But for right now, I'm just going to say yes. And here we go. So we have a ton of host data for 321 00:19:36,600 --> 00:19:44,780 other sites that are Twitchy. TwitchCon, obviously, their conference. So they host a domain 322 00:19:44,780 --> 00:19:50,740 for that. That's in scope. Why TwitchCon? Twitch with a three. They might be parking some of 323 00:19:50,740 --> 00:19:52,580 these. But that's okay. I don't know. I don't know. I don't know. I don't know. I don't know. I 324 00:19:52,600 --> 00:19:58,360 still want to check them out. One time when I did this, I used a keyword for a large 325 00:19:59,000 --> 00:20:02,900 manufacturer. And what I ended up finding was a domain that looked nothing like any of the other 326 00:20:02,900 --> 00:20:07,060 domains I had seen or any other brands. But they had indeed registered it with the same 327 00:20:07,060 --> 00:20:12,240 company name. Turned out that the company was hosting basically a whole bunch of new school, 328 00:20:12,420 --> 00:20:17,500 well, new school for them, portals for code repositories. Basically, JIRA, Jenkins, all 329 00:20:17,500 --> 00:20:22,440 kinds of CICD stuff. And they thought that the protection to this was that they never 330 00:20:22,600 --> 00:20:27,300 told anyone about the URL. Like it was only internal, right? Security by obscurity. So they 331 00:20:27,300 --> 00:20:30,520 thought that they didn't need to put authentication on it. So I walked in, stole all their source 332 00:20:30,520 --> 00:20:36,220 code, passwords, rooted the Jenkins server through script console. And that was really just 333 00:20:36,220 --> 00:20:40,700 right out of this tool. So this can be really useful to find targets. Twitch Amazon, TyWitch, 334 00:20:40,820 --> 00:20:46,060 yeah. So now you have this output. Now what do you do with this output? I mean, basically, it's 335 00:20:46,060 --> 00:20:52,500 as simple as copying and pasting it into the mind map. So if I go back here, I can see that I have 336 00:20:52,600 --> 00:21:01,520 this. This is where the fun starts. So each one of these should get a node if copying and pasting 337 00:21:01,520 --> 00:21:10,600 works. Yeah. Okay. Well, you get the idea. Each one of these should get a node. Twitch.tv, 338 00:21:10,720 --> 00:21:18,360 Justin.tv, TwitchCon, everyone should get a node. All right. Let's go back to the presentation. 339 00:21:21,060 --> 00:21:22,580 It's okay so far? You still have questions? All right. All right. All right. All right. All 340 00:21:22,600 --> 00:21:26,700 right. All right. All right. All right. Everything's useful? Yeah? Okay. Cool. Questions? 341 00:21:27,020 --> 00:21:35,880 Question. Yeah? It's a different database. It's a reverse WHOIS focused database, and they're 342 00:21:35,880 --> 00:21:42,100 parsing more fields in the WHOIS information than that site is. I've used both. I find this one 343 00:21:42,100 --> 00:21:49,360 to be way more effective. Yeah? Okay. So now we also want to find, maybe, we're still on this 344 00:21:49,360 --> 00:21:52,580 track of trying to find top level domains, acquisitions, other sites that we could use. We're 345 00:21:52,600 --> 00:21:56,460 are related to Twitch because they will be in scope for a 346 00:21:56,460 --> 00:22:00,720 large scope bounty. Now every company use ads and analytics 347 00:22:00,720 --> 00:22:10,740 tags, right? Yes. Yes, you can. You can do it through that same 348 00:22:10,740 --> 00:22:15,020 one. It has multiple options. You can specify you want to 349 00:22:15,020 --> 00:22:18,680 search by company keyword. You can specify register name. You 350 00:22:18,680 --> 00:22:22,160 can specify a whole bunch of stuff. So just check into the 351 00:22:22,600 --> 00:22:28,320 stuff of that one, yeah. So built with basically is this 352 00:22:28,320 --> 00:22:32,140 company that does technology profiling and analytics. 353 00:22:33,160 --> 00:22:37,220 Analytics. Basically they check out every site on the internet. 354 00:22:37,320 --> 00:22:41,620 They spider it by looking at their left over source snippets 355 00:22:41,620 --> 00:22:44,300 or text files or just default configurations of some 356 00:22:44,300 --> 00:22:49,460 frameworks. They know that your site is running fastly and you 357 00:22:49,460 --> 00:22:52,580 know is hosted you know with this X server technology and 358 00:22:52,600 --> 00:22:54,940 it's using these JavaScript frameworks. And they also know 359 00:22:54,940 --> 00:22:58,760 what analytics you're using by the format of the key that you 360 00:22:58,760 --> 00:23:01,620 embed in the web page. Now we can use this to our advantage 361 00:23:01,620 --> 00:23:04,600 because if you're a company like Twitch you have a new relic key 362 00:23:04,600 --> 00:23:08,200 and you have a Google analytics key or some of these other keys. 363 00:23:08,680 --> 00:23:12,020 Now luckily for us they allow us to look at these relationships 364 00:23:12,020 --> 00:23:15,220 between sites. So here I've drilled down into Twitch's and 365 00:23:15,220 --> 00:23:18,080 those are their analytics keys on the middle pane right there. 366 00:23:18,200 --> 00:23:21,440 I can click on any of those and see where else their analytics 367 00:23:21,440 --> 00:23:22,580 keys showed up on the site. So I can click on any of those and see 368 00:23:22,600 --> 00:23:24,660 on the internet what other sites are in the built with database. 369 00:23:25,200 --> 00:23:28,440 So this allows me to find brand new stuff that I might not have 370 00:23:28,440 --> 00:23:32,920 seen before like Binny.tv and you know Booth the Bun. These 371 00:23:32,920 --> 00:23:37,380 are all streamers that actually Twitch has promoted so much that 372 00:23:37,380 --> 00:23:41,120 they now have their own Twitch hosted sites. And so these might 373 00:23:41,120 --> 00:23:43,760 be in scope for the bounty. They might be custom code. You 374 00:23:43,760 --> 00:23:49,340 never know. So this is really advanced. So basically to do 375 00:23:49,340 --> 00:23:52,580 this you use the built with database. So you're going to 376 00:23:53,220 --> 00:23:56,920 go to build with site and just do a search on their site or you 377 00:23:56,920 --> 00:24:01,220 can use the Chrome extension which I can show you now. So in 378 00:24:01,220 --> 00:24:06,360 my browser up here if I go to Twitch again or actually I'll do 379 00:24:06,360 --> 00:24:11,360 it in my testing profile actually. No that's not my 380 00:24:11,360 --> 00:24:16,220 testing profile. Did I close it? Yeah I closed it. There it is. 381 00:24:16,420 --> 00:24:19,680 Okay. So now that I'm at Twitch built with the extension is 382 00:24:19,680 --> 00:24:21,800 installed. It's just in the Chrome store. You can click it. 383 00:24:25,140 --> 00:24:31,140 Maybe Burp's messing it up real quick. Oh there it is. Okay cool. 384 00:24:31,220 --> 00:24:33,420 Just takes a little longer because it's been proxied. So 385 00:24:33,420 --> 00:24:38,440 here you can see that I get some tech information and this is 386 00:24:38,440 --> 00:24:41,000 useful in hacking anyway to find out the stack they're using, what 387 00:24:41,000 --> 00:24:43,760 JavaScript frameworks they're using. You can drill down into 388 00:24:43,760 --> 00:24:52,340 this. This is also very useful in other parts of the methodology 389 00:24:52,580 --> 00:24:55,280 knowing what they run. Because you're going to look for O days in 390 00:24:55,280 --> 00:24:58,400 frameworks they use or whatever. So this is useful. But then if you 391 00:24:58,400 --> 00:25:05,400 go to the second tab up here. Yeah question. Wappalyzer doesn't 392 00:25:05,400 --> 00:25:08,320 do any of the analytics tracking. It just does technology 393 00:25:08,320 --> 00:25:13,660 profiling. So it'll do like, it'll do just as good of a job if 394 00:25:13,660 --> 00:25:22,560 not, if not a better job than built with. But it's yeah it's limited on the other functions. So. 395 00:25:25,320 --> 00:25:28,540 Let's try on the website. Yeah another question. Yeah. 396 00:25:32,900 --> 00:25:36,140 So that's the problem right. I would have scaled it if I could. The problem with built with it is 397 00:25:36,140 --> 00:25:41,400 it's a pay tool. They really want you to pay for it. So actually it looks like they just 398 00:25:41,400 --> 00:25:45,260 updated it right when I was doing this presentation. So I used to work right inside 399 00:25:45,260 --> 00:25:48,500 the bookmarklet and now it looks like I have to login with the free account to get the 400 00:25:48,500 --> 00:25:52,440 relationship information or maybe use the search on the website. They have an API for that. They'll 401 00:25:52,440 --> 00:25:52,560 the website. They have an APM and they did that because they did a lot of work with them and they 402 00:25:52,560 --> 00:25:57,720 it's expensive, it's really expensive to use the API. But I don't know of anyone else doing 403 00:25:57,720 --> 00:26:02,180 this analytics tracking, the analytics code tracking across multiple domains, so kind of 404 00:26:02,180 --> 00:26:05,940 stuck with it right now if I want to use this method. If anybody else knows of anything cool 405 00:26:05,940 --> 00:26:14,400 like that, I would love to know. Let's try it on the main site. That's not 406 00:26:24,600 --> 00:26:29,540 working. All right, here we go. All right, so relationship of twitch.tv, I can see that 407 00:26:29,540 --> 00:26:33,560 here's their UA code right here, their Google analytics code. If I click on that, now I get the 408 00:26:33,560 --> 00:26:42,300 domain information. Let me make this a little bit bigger. So here on the left-hand side I can 409 00:26:42,300 --> 00:26:46,840 see related domains. I also get a heat map over here of like how much they're related, 410 00:26:47,000 --> 00:26:50,080 although I'll be honest, I don't really know how to read this graph really well yet, but I 411 00:26:50,440 --> 00:26:52,300 use the data from the table most often. 412 00:26:52,560 --> 00:26:56,500 So star of the tree, you know, this is kind of the same stuff we were looking at before. Some 413 00:26:56,500 --> 00:27:02,220 guild sites, faceless.tv. This happens a lot actually is what happened with this kind of 414 00:27:02,220 --> 00:27:06,980 linked analysis. If they're going to do a beta product and they haven't even let anybody know 415 00:27:06,980 --> 00:27:10,400 about it, a lot of times I can look at this data and know that they're doing that data product. 416 00:27:10,580 --> 00:27:15,020 Like I knew way before some video games had even launched or gone into beta that twitch had 417 00:27:15,020 --> 00:27:18,560 already partnered with them and got sites ready for them and already integrated the analytics 418 00:27:18,560 --> 00:27:22,520 code into the page, and I ended up like knowing beforehand. Not really useful for a 419 00:27:22,560 --> 00:27:28,220 hunter, but exciting for a gamer. So yeah. All right. Yeah. 420 00:27:34,120 --> 00:27:39,300 You don't. You have to visit them. The indicators, I wouldn't say of compromise, but the 421 00:27:39,300 --> 00:27:44,220 indicators of ownership are usually the site has a privacy policy that links back to twitch or a 422 00:27:44,220 --> 00:27:48,660 trademark that links back to twitch in the footer. That's how I usually know that these are 423 00:27:48,660 --> 00:27:51,160 related. Yes. 424 00:27:56,420 --> 00:28:06,160 Yeah. Absolutely. Yep. You can use DNS registration information. You can go back to the who 425 00:28:06,160 --> 00:28:11,060 is information too and just verify that these ones match, you know, who is look up and stuff like 426 00:28:11,060 --> 00:28:16,220 this. Yeah, absolutely. Sometimes I'm reckless enough that I don't do that. But, you know, it 427 00:28:16,220 --> 00:28:21,120 just depends. Yeah, yeah. Yeah. All right. Go back to presentation mode. 428 00:28:22,560 --> 00:28:29,180 All right. So that's tracker analysis basically. So other things that you can just do are the 429 00:28:29,180 --> 00:28:34,320 things we just talked about. So trademarks exist across many sites, right? You have to embed your 430 00:28:34,320 --> 00:28:39,480 trademark and privacy policy in any site that you launch for business nowadays. They protect you 431 00:28:39,480 --> 00:28:48,320 legally. So searching for things like Tesla C 2016, Tesla C 2015, Tesla C 2017, and then in URL 432 00:28:48,320 --> 00:28:52,540 colon Tesla is a quick Google dork to try to find some sites that are related to your website. So, you're 433 00:28:52,560 --> 00:29:03,460 going to have to look at your site and see if it's related to Tesla. Yes. I don't look at that 434 00:29:03,460 --> 00:29:10,140 honestly. When I'm doing bounty hunting stuff, I don't care as much. So, I mean, that's a horrible 435 00:29:10,140 --> 00:29:17,780 answer. But, yeah, I just like. Yeah. Yeah. I would report it. Like, I mean, I have had 436 00:29:17,780 --> 00:29:22,360 instances before where, like, I found a site, it has the privacy policy, but I can see it's obviously 437 00:29:22,360 --> 00:29:28,640 not managed by the company. It's a third party. It's vulnerable to something. Like, I picked up 438 00:29:28,640 --> 00:29:32,500 right away, it has, like, some kind of search functionality or reflected, like, text and it turns 439 00:29:32,500 --> 00:29:38,160 out to be vulnerable to cross-site scripting. You know, bug bounty situation, I just ping the 440 00:29:38,160 --> 00:29:41,360 customer and I say, I found this site. It should be in scope because you have a wide scope 441 00:29:41,360 --> 00:29:45,200 program, but also might be in scope because I don't know if you own it. They have your trademark 442 00:29:45,200 --> 00:29:49,460 on it. I just say those words. A lot of times they'll be like, thank you. We'll contact the owner 443 00:29:49,460 --> 00:29:52,340 of the service. We think we knew who it is. And they'll usually award more than that. So, you know, 444 00:29:52,340 --> 00:29:54,860 it's a good thing that they're giving me a bounty for just having found something that they had no 445 00:29:54,860 --> 00:30:04,240 idea was up or had lost track of. Okay. So now we've done IPs and brands and, like, related sites. 446 00:30:04,380 --> 00:30:08,700 So now we're going to get into discovering subdomains. So we talked about subdomain 447 00:30:08,700 --> 00:30:13,500 enumeration, right? Like, finding, now that we have Tesla.com or Twitch.tv, those are top-level 448 00:30:13,500 --> 00:30:18,800 domains. Now we want to start finding subdomains of those sites. And those can individually map 449 00:30:18,800 --> 00:30:22,320 to IPs and be their own applications, which all are in scope for both of those sites. So I'm 450 00:30:22,320 --> 00:30:22,440 going to start with a subdomain enumeration. So what I'm going to focus on is the idea of 451 00:30:22,440 --> 00:30:27,000 bounty hunting and red teaming. So really, there's two methods to enumerate subdomains. One is 452 00:30:27,000 --> 00:30:31,940 subdomain scraping. And the other is subdomain brute forcing. Now, subdomain scraping is the 453 00:30:31,940 --> 00:30:39,320 idea of taking search engines, databases, census, Baidu, DNS databases, SSL certificate databases, 454 00:30:40,120 --> 00:30:49,000 even virus total, wayback machine. There's about 65 total sites around the Internet that harvest large 455 00:30:49,000 --> 00:30:52,300 sets of data about domains or maybe even thousands of them. And so we're going to start with those sites. 456 00:30:52,300 --> 00:30:55,360 maybe they're not really made for that. They're made for other things but allow us to do 457 00:30:55,360 --> 00:31:01,280 searches to find references to domains. And they all in some way or another offer access to an 458 00:31:01,280 --> 00:31:08,020 API or can be scraped pretty easily by some Python to return. So this is relatively new 459 00:31:08,020 --> 00:31:12,860 actually. We weren't doing a ton of this in pen testing until like the last couple years 460 00:31:12,860 --> 00:31:17,540 actually. Nobody was really looking at scraped information off the Internet to identify 461 00:31:18,020 --> 00:31:23,380 subdomains and maybe assets of a company in a red team engagement. But now it's all the rage. 462 00:31:23,480 --> 00:31:28,020 This is actually one of the best methods to find subdomains and secret sauce of your clients or 463 00:31:28,020 --> 00:31:33,920 your bug bounty targets. So there's a ton of sources. What happens is really there's been two 464 00:31:33,920 --> 00:31:38,880 advents. One was a tool called sublister which was one that everybody used for a really long 465 00:31:38,880 --> 00:31:43,840 time. And it was maintained for a while and then kind of fell off, wasn't really maintained. 466 00:31:44,040 --> 00:31:47,520 And then two authors really recently released two tools. One of them was called sublist 467 00:31:47,540 --> 00:31:53,160 that are epically good. And so they each have different sources and they each have different 468 00:31:53,160 --> 00:31:59,780 features and functions. So I can't decide which one I want to use in my methodology if I would be 469 00:31:59,780 --> 00:32:04,520 asked to use one tool. So I just script them both together. When I started that scan at the 470 00:32:04,520 --> 00:32:10,900 beginning of the presentation, that's just some bash in the background running concurrently. This 471 00:32:10,900 --> 00:32:15,160 tool amass and the next tool I'm going to talk about is sub finder. And that's the reason the 472 00:32:15,160 --> 00:32:17,520 tool takes so long is because it's scraping all these sites right now. So I'm going to talk about a 473 00:32:17,520 --> 00:32:21,540 little bit more about this tool right now. So this is a run of amass against Netflix who also has a 474 00:32:21,540 --> 00:32:27,240 bounty, public bounty. And what it does it goes out to I think between amass and sub finder 65 475 00:32:27,240 --> 00:32:34,660 sources I think. And it also offers some cool stuff like permutation scanning. So first thing 476 00:32:34,660 --> 00:32:38,920 it'll do is it'll scrape all those sources for references to Netflix.com. And then it'll tell you 477 00:32:39,380 --> 00:32:47,500 on this page I found media.netflix.com and geo.netflix.com and exout104.netflix.com. And 478 00:32:47,520 --> 00:32:53,080 I have no idea what that is. And so it'll give you back a list of now targets. And you can see in 479 00:32:53,080 --> 00:32:58,240 this methodology for a big company, you're starting to gather hundreds of targets that you can go 480 00:32:58,240 --> 00:33:02,560 after. Which for a bug bounty hunter is good, right? You can hack the main site or you can 481 00:33:02,560 --> 00:33:07,300 focus on these other sites. There's really no limit to the kind of stuff you can find. A lot of my 482 00:33:07,300 --> 00:33:11,840 buddies are on the Walmart red team and they use the same methodology, this recon methodology to 483 00:33:11,840 --> 00:33:15,560 find stuff that's just been left out there. Especially when they acquire a new company. They do 484 00:33:15,560 --> 00:33:17,500 the same stuff. Same enumeration. So I'm going to go ahead and show you a little bit more of this. 485 00:33:18,760 --> 00:33:23,440 So the other helpers that this tool has is it includes some reverse DNS stuff but also has 486 00:33:23,440 --> 00:33:28,800 what's called permutation scanning. So you see here the second result here was media.netflix.com 487 00:33:28,800 --> 00:33:34,160 on the right hand side from this tool. And that's great. So what it'll do is it'll add common 488 00:33:34,160 --> 00:33:42,280 prefixes to that subdomain like 1-media.com or user or dev or prod or whatever media.com. And 489 00:33:42,280 --> 00:33:46,740 then it'll try dash. And it will append key words and a dash and a dot to try to find additional 490 00:33:46,740 --> 00:33:52,240 hosts that are related to that subdomain and see if they resolve. And if it does resolve, add it to 491 00:33:52,240 --> 00:33:58,460 the list. And so this is called permutation scanning in subdomain enumeration. And so AMAS includes 492 00:33:58,460 --> 00:34:07,480 a function to do this. So the other one is subfinder written by Iceman. Awesome hacker name. 493 00:34:07,580 --> 00:34:14,420 I love it. And this one has a multi-resolver bruteforcer built in. So if you want to do brute 494 00:34:14,420 --> 00:34:16,720 forcing and subdomain scraping via the same tool, you can do that. And then you can also do a lot of 495 00:34:16,720 --> 00:34:17,920 other things. So for example, if you're using a subdomain in a particular tool, you can use 496 00:34:17,920 --> 00:34:24,300 subfinder. And it's pretty efficient. It also can output in JSON. So you can feed some of this 497 00:34:24,300 --> 00:34:30,020 stuff to other tools. Especially if you're using something like Aquatone, subfinder supports now 498 00:34:30,020 --> 00:34:35,480 Aquatone output. So if you wanted to use subfinder for the discovery instead of Aquatone, which is a 499 00:34:35,480 --> 00:34:41,200 framework for OSINT that finds the same kind of stuff, you can basically take the output of this, 500 00:34:41,280 --> 00:34:46,540 put it into Aquatone and then use Aquatone for the later phases of what he calls a domain flyover. 501 00:34:46,540 --> 00:34:52,160 but really it's just sub domain analysis. So I used to have a 502 00:34:52,160 --> 00:34:55,440 fancy table saying like what was better about each tool when it 503 00:34:55,440 --> 00:34:58,000 was sub lister and some other ones like enumall which is a 504 00:34:58,000 --> 00:35:00,880 tool I wrote. I completely deprecated my own tool. I just 505 00:35:00,880 --> 00:35:05,380 want to use what works. Aqua tone, sub lister and anything 506 00:35:05,380 --> 00:35:08,720 else for scraping. But it doesn't matter anymore. Sub 507 00:35:08,720 --> 00:35:10,980 finder, amass are the two tools you want to use. They're the 508 00:35:10,980 --> 00:35:13,120 best in breed right now and they will be for quite a while. 509 00:35:13,240 --> 00:35:15,540 They handle the most sources and they're the most effective. 510 00:35:19,940 --> 00:35:23,400 Okay. So that's sub domain scraping. Now you have sub 511 00:35:23,400 --> 00:35:27,540 domain brute forcing. How am I doing on time? I have five 512 00:35:27,540 --> 00:35:32,000 minutes? Oh, God. Okay. Sub domain brute forcing is the idea 513 00:35:32,000 --> 00:35:34,500 that you just try to resolve a whole bunch of random stuff like 514 00:35:34,500 --> 00:35:38,940 admin.twitch.tv.com or twitch.tv and media.twitch.tv. 515 00:35:39,160 --> 00:35:42,780 And if you get a resolve, it means that site exists or some 516 00:35:42,780 --> 00:35:45,520 kind of DNS redirect, right? And if you get a resolve, it 517 00:35:45,540 --> 00:35:47,520 means that site exists. This is time consuming. Brute forcing 518 00:35:47,520 --> 00:35:51,200 anything, passwords or DNS entries is time consuming. And 519 00:35:51,200 --> 00:35:53,700 pen testing used to take a long time. There are newer tools 520 00:35:53,700 --> 00:35:55,580 nowadays and the one we're going to talk about is mass 521 00:35:55,580 --> 00:35:59,960 scan. Mass scan or mass DNS, sorry. Mass DNS is the one we're 522 00:35:59,960 --> 00:36:02,720 going to talk about. Mass DNS used to take what used to take a 523 00:36:03,140 --> 00:36:07,560 day to do or maybe a week to do with a large list of words to 524 00:36:07,560 --> 00:36:11,540 try to brute force sub domains. I just cut that time down into a 525 00:36:11,540 --> 00:36:14,360 minute and 24 seconds. And how it did this is it's written in C, 526 00:36:15,860 --> 00:36:18,840 and then it uses what's called multi-resolvers. Basically, 527 00:36:19,860 --> 00:36:23,100 instead of using one DNS resolver to do that resolution, 528 00:36:23,500 --> 00:36:27,060 it cuts it into groups of ten resolvers and then distributes 529 00:36:27,060 --> 00:36:29,800 your word list across ten resolvers and then brings it all 530 00:36:29,800 --> 00:36:32,960 back to you in the same tool. So it drastically cuts down the 531 00:36:32,960 --> 00:36:36,560 time to do this type of brute force. A one million line sub 532 00:36:36,560 --> 00:36:39,300 domain dictionary runs in one minute and 24 seconds. That's 533 00:36:39,300 --> 00:36:42,240 unheard of. So this is kind of what everyone's using right now. 534 00:36:43,800 --> 00:36:45,520 So what about those word lists? Well, there's a bunch of them. 535 00:36:45,540 --> 00:36:48,660 This is, well, this is every, on the right, every tool that I've 536 00:36:48,660 --> 00:36:51,860 ever known in my pen testing career, bug hunting career, that 537 00:36:51,860 --> 00:36:55,900 ever existed for sub domain brute forcing. Fierce, a lot of people 538 00:36:55,900 --> 00:36:58,980 used Fierce for a long time. Knock, like a whole bunch of 539 00:36:58,980 --> 00:37:01,140 tools came out for sub domain brute forcing over the last ten 540 00:37:01,140 --> 00:37:03,400 years. They all had different word lists and then individual 541 00:37:03,400 --> 00:37:06,140 projects came out with word lists to try to do sub domain brute 542 00:37:06,140 --> 00:37:09,800 forcing. I basically catted and unique them into this one list 543 00:37:09,800 --> 00:37:12,860 called all.txt and this is what I use with mass DNS. This is 544 00:37:12,860 --> 00:37:15,520 what I feed mass DNS with. All right. So I'm going to talk a 545 00:37:16,920 --> 00:37:21,060 little bit about common speak. Okay, I'm fine. I said I could 546 00:37:21,060 --> 00:37:25,040 stay a little while. Okay. So there's some other newer kind of 547 00:37:25,040 --> 00:37:28,780 tools or kind of newer projects out there. One is called common 548 00:37:28,780 --> 00:37:32,120 speak. What common speak is is they used BigQuery on a whole 549 00:37:32,120 --> 00:37:36,080 bunch of sites to parse out their sub domain structure and 550 00:37:36,080 --> 00:37:41,080 their URL structure. Now the sub domain data is awesome. Like it 551 00:37:41,080 --> 00:37:45,520 actually really gives you key words and terms to look up sub 552 00:37:45,540 --> 00:37:50,060 domain data that is pretty new, right? They went out and they 553 00:37:50,060 --> 00:37:53,920 analyzed hacker news and HTTP archive and stack overflow and 554 00:37:54,540 --> 00:37:57,440 basically if you think about it, they're just spidering these 555 00:37:57,440 --> 00:38:00,100 sites and every time they see a URL mentioned or a domain 556 00:38:00,100 --> 00:38:03,340 mentioned, they capture the sub domain and add it to a list and 557 00:38:03,340 --> 00:38:05,900 then do some analytics on it and they say, all right, new school 558 00:38:05,900 --> 00:38:08,360 companies are probably using these names for their sub 559 00:38:08,360 --> 00:38:12,360 domains. So if it totally became fashionable to name your sub 560 00:38:12,360 --> 00:38:15,220 domains after characters in Harry Potter, if Harry Potter made a 561 00:38:15,540 --> 00:38:19,260 resurgence, doing a BigQuery result against one of these sites 562 00:38:19,260 --> 00:38:21,680 might tell you that that's become fashionable again. This is how 563 00:38:21,680 --> 00:38:24,460 people name their sub domains, which is almost like language 564 00:38:24,460 --> 00:38:28,540 analysis added to sub domain enumeration. They also tried to 565 00:38:28,540 --> 00:38:32,020 do the same thing with URL data and how URLs are structured, like 566 00:38:32,020 --> 00:38:35,500 their URL path. This has been less useful for me, but I'm still 567 00:38:35,500 --> 00:38:37,840 waiting for the author to like sell me his dream on like why 568 00:38:37,840 --> 00:38:40,640 this is super useful because when I looked at it, it's very 569 00:38:40,640 --> 00:38:43,460 application specific, right? Everybody has a different URL 570 00:38:43,460 --> 00:38:45,520 path. There's not many common occurrences. I don't have a lot 571 00:38:45,540 --> 00:38:47,560 of information about what I see unless you're using a purchase 572 00:38:47,560 --> 00:38:50,740 software or a license software or something like that. But the 573 00:38:50,740 --> 00:38:54,120 sub domain data is awesome. I've integrated it into the all.txt 574 00:38:54,120 --> 00:38:56,260 file, so it's in there now. So you really, you could just use 575 00:38:56,260 --> 00:39:02,480 the all.txt file. Any questions? No? All right. So other ways to 576 00:39:02,480 --> 00:39:08,440 find sub domain data. So if you have, question? No, he's taking a 577 00:39:08,440 --> 00:39:15,000 picture. All right. So if you have, if you have DNS, sorry, if 578 00:39:15,540 --> 00:39:19,780 you have DNSSEC enabled, there's this idea of how DNSSEC links to 579 00:39:19,780 --> 00:39:24,100 the next sub domain set up for your organization. And I'll be 580 00:39:24,100 --> 00:39:26,480 honest. I don't know exactly how this works. I'm not a DNSSEC 581 00:39:26,480 --> 00:39:29,240 expert. Maybe someone in this room knows this better. But I 582 00:39:29,240 --> 00:39:31,300 know that they do link and reference to each other when you 583 00:39:31,300 --> 00:39:33,740 set up DNSSEC. So there's this idea of what's called NSEC 584 00:39:33,740 --> 00:39:37,200 walking. And there's three tools for this. LDNSutils, NSEC 585 00:39:37,200 --> 00:39:41,000 walker, and NSEC map. And what they do is they basically 586 00:39:41,000 --> 00:39:44,100 iteratively go through every domain that you hand it, the 587 00:39:44,100 --> 00:39:45,520 first one, and look for the next right-hand side of the next 588 00:39:45,540 --> 00:39:49,680 reference one in the NSEC chain. And basically what happens when 589 00:39:49,680 --> 00:39:52,060 you run one of these tools is you get kind of an old-school 590 00:39:52,060 --> 00:39:55,700 looking DNS zone transfer, which is amazing because nobody lets 591 00:39:55,700 --> 00:39:57,700 you do that anymore. And if they let you do that, a lot of 592 00:39:57,700 --> 00:40:00,960 this would be, you know, moot. Like, if I had a zone transfer, 593 00:40:01,060 --> 00:40:04,580 great. Like, give me all that. So if they have DNSSEC enabled, 594 00:40:04,900 --> 00:40:08,220 they can, you can use one of these tools. There's a whole 595 00:40:08,220 --> 00:40:12,100 presentation about it that Bharath Kumar, he did at the 596 00:40:12,100 --> 00:40:14,920 bug crowd conference level up two years ago where he walked 597 00:40:14,920 --> 00:40:17,640 through doing all of this. It's called esoteric subdomain 598 00:40:17,640 --> 00:40:20,460 enumeration techniques, which was excellent. I really loved it. 599 00:40:20,940 --> 00:40:23,840 Other ways that you can search for domains is searching GitHub 600 00:40:24,280 --> 00:40:29,320 or GitLab or, you know, sources, you know, like that. And you can 601 00:40:29,320 --> 00:40:34,700 also just do some Google door games. All right. So now we've 602 00:40:34,700 --> 00:40:38,200 got a giant list of targets in our scope or our, you know, 603 00:40:38,240 --> 00:40:42,720 campaign for red team or bug bounty, you know, thing. So what 604 00:40:42,720 --> 00:40:44,900 do we do now? Well, it's very general. Like in Pentest, you 605 00:40:44,920 --> 00:40:49,060 do port scanning. Except for a long time, we were using Nmap, 606 00:40:49,220 --> 00:40:53,340 which nothing against Nmap, but it's slow. It's really slow. And 607 00:40:53,340 --> 00:40:56,000 it's a great tool. And I use it in the methodology, but just in 608 00:40:56,000 --> 00:40:59,860 a different place. So things like Zmap and mass scan are 609 00:40:59,860 --> 00:41:05,100 infinitely faster to just do a general port scan. So here, mass 610 00:41:05,100 --> 00:41:10,500 scan to do a full port scan of a large target's ASN takes about 611 00:41:10,500 --> 00:41:14,680 11 minutes to finish. And it's on 65,000 hosts. Right? That's super 612 00:41:14,680 --> 00:41:18,240 fast for a port scan. You know, I'm running this on a mid-tier 613 00:41:18,240 --> 00:41:21,740 digital ocean box, so like also not the most bandwidth that I'm 614 00:41:21,740 --> 00:41:25,800 working with. But Nmap would have taken a week. Right? I 615 00:41:25,800 --> 00:41:28,640 remember when I was doing Pentesting full time when I was 616 00:41:28,640 --> 00:41:32,660 like just a scrub, we would kick off this really ugly Python 617 00:41:32,660 --> 00:41:35,940 script. And it would have to kick off Nmap at the beginning 618 00:41:35,940 --> 00:41:38,400 of the script for a large company's domain. And then we'd 619 00:41:38,400 --> 00:41:41,300 come back four days later and it would have finally completed. 620 00:41:41,660 --> 00:41:44,660 Now, Nmap has gotten a lot of tuning to, you know, the 621 00:41:44,680 --> 00:41:47,040 port to get faster. There has been a lot of tuning. But mass 622 00:41:47,040 --> 00:41:49,980 scan still blows it out of the water. So what I do is I do the 623 00:41:49,980 --> 00:41:53,080 initial port scanning with mass scan. The fast port scanning of 624 00:41:53,080 --> 00:41:56,340 the whole IP or of the IP with every port. Right? The full 625 00:41:56,340 --> 00:42:02,340 range of 1 to 65,535. And then if that tells me a port is open, 626 00:42:02,520 --> 00:42:06,020 then I feed that to Nmap. And Nmap only gets the ports I know 627 00:42:06,020 --> 00:42:08,320 I'm open. And then I use Nmap because it's stronger in other 628 00:42:08,320 --> 00:42:10,720 areas. It allows you to do version scanning. It allows you 629 00:42:10,720 --> 00:42:14,520 to add Nmap scripting engine checks. And so I'll feed the mass 630 00:42:14,680 --> 00:42:17,380 scan output to Nmap. And as you can see, this is a methodology 631 00:42:17,380 --> 00:42:20,020 that can obviously be automated. Right? You can script all this 632 00:42:20,020 --> 00:42:28,340 together. Yes? So zero is about four? Yes. Absolutely. Yeah. 633 00:42:28,860 --> 00:42:32,280 Yeah. That's actually a typo. So, yeah. Thank you. Yes? 634 00:42:36,800 --> 00:42:39,840 Yes. Sometimes it does come back with false positives that are 635 00:42:39,840 --> 00:42:43,680 asynchronous. Because it's asynchronous, really I don't 636 00:42:43,680 --> 00:42:44,660 have a great way around that. So I'm going to go ahead and do a 637 00:42:44,680 --> 00:42:48,660 test on that right now. So, like, when I get back that data of 638 00:42:48,660 --> 00:42:53,300 port data, what it will look like in my automation is that it 639 00:42:53,300 --> 00:42:57,520 looks like every port is open on a box and with a mass scan. And 640 00:42:57,520 --> 00:43:00,880 it actually, like, since I'm logging the port scan to a flat 641 00:43:00,880 --> 00:43:04,560 file, that flat file ends up being, like, a huge amount of 642 00:43:04,560 --> 00:43:07,300 megabytes. And it slows down my tool. I'm still trying to figure 643 00:43:07,300 --> 00:43:12,560 out a way to, like, not do that. So it's in my issues list. But, 644 00:43:13,060 --> 00:43:14,660 yeah. I mean, it happens less often. I mean, it's not a big deal. 645 00:43:14,660 --> 00:43:17,560 Nowadays. Like, I think that if you tune mass scan really well, 646 00:43:17,600 --> 00:43:20,800 you can get around some of it. So, yeah. Yes? 647 00:43:21,160 --> 00:43:22,740 Some of the . 648 00:43:25,600 --> 00:43:30,760 Yes. This is true. Okay. So the question was a lot of places 649 00:43:31,180 --> 00:43:35,000 blacklist you when you start doing scanning. Right? This is a 650 00:43:35,000 --> 00:43:38,400 running joke. I don't know if you've heard it before. Like, what 651 00:43:38,400 --> 00:43:44,640 happens here is a lot of cloud-based WAFs, Akamai and CloudFlare and some other ones, when you start doing scanning, the 652 00:43:44,640 --> 00:43:47,620 thing is, when you start getting into port scanning or when you start requesting a lot of web 653 00:43:47,620 --> 00:43:52,720 requests against a host or you even send one iota of attack traffic to the site, they'll put you on 654 00:43:52,720 --> 00:43:56,560 this global blacklist, which will blacklist your whole house. And then your wife, my wife, will 655 00:43:56,560 --> 00:44:01,620 come to me and be like, why can't I get to Amazon? Why can't I get to United? Literally, she 656 00:44:01,620 --> 00:44:07,000 was trying to go to a funeral for her mom's mom, and she couldn't register a plane ticket 657 00:44:07,000 --> 00:44:14,540 because I had blacklisted our house, our IP, on this global blacklist. So this is a running thing. I test over a VPN. 658 00:44:14,640 --> 00:44:20,860 All the time now. And I make sure to have a VPN that has a quick proxy switch function. So I use 659 00:44:20,860 --> 00:44:25,540 IPVanish because IPVanish has a whole bunch of functions that I like, like the checkbox that 660 00:44:25,540 --> 00:44:30,220 won't let you connect to the Internet unless you have the VPN enabled. And it also has a button 661 00:44:30,220 --> 00:44:34,380 that just says quickly change IP. So once I get blacklisted from one, I'll just switch to another. 662 00:44:34,620 --> 00:44:42,520 But I don't test over my home network anymore. So, VPN. Yeah. Questions? Okay. All right. So now 663 00:44:42,520 --> 00:44:44,620 you've got back some port scan data. I mean, you've got a lot of port scan data. You've got a lot of 664 00:44:44,620 --> 00:44:47,020 port scan data. So immediately you're going to start to notice things that are interesting here. 665 00:44:47,080 --> 00:44:51,140 Obviously you're going to notice the 443s and the 80s, which are what we're going to test for web 666 00:44:51,140 --> 00:44:56,640 testing. But you're also going to start to notice remote administration protocols and database 667 00:44:56,640 --> 00:45:02,200 servers and things like that. All of these can be brute forced with passwordless. And so this is 668 00:45:02,200 --> 00:45:06,560 the part that gets, you know, you've got to make sure you have permission at this point. So when 669 00:45:06,560 --> 00:45:13,420 you do the mass scan and you get the output back, then you serve it to NMAP. And NMAP, with NMAP, 670 00:45:13,420 --> 00:45:14,600 you do the slash OGP. And then you get the output back. And then you get the output back. And then 671 00:45:14,620 --> 00:45:19,560 you get the flag to get back the greppable output. What you can do with the greppable output of a 672 00:45:19,560 --> 00:45:25,120 service scan from NMAP is feed it to this tool called brute spray. And brute spray is pretty cool. 673 00:45:25,340 --> 00:45:30,540 It takes the NMAP GMAP file or GNMAP file and it will parse it for all remote administration 674 00:45:30,540 --> 00:45:37,600 protocols. And using I think it's Medusa's, the core technology it's using under, it will brute 675 00:45:37,600 --> 00:45:43,380 force everything in that GMMAP file for credentials. And it will do it concurrently, which is kind of 676 00:45:43,380 --> 00:45:43,660 useful. 677 00:45:44,620 --> 00:45:49,640 So here I've specified a password list. It comes with the default user and password list. 678 00:45:49,740 --> 00:45:54,120 This is honestly enough for me. I'm not trying to hardcore brute force into stuff. Like that's 679 00:45:54,120 --> 00:45:59,940 usually not even scope for the bug bounty. In Red Team it is. So maybe you want to use a more 680 00:45:59,940 --> 00:46:03,880 advanced user name and password file list here. A lot exist out there. Seclist is probably one of 681 00:46:03,880 --> 00:46:10,380 the best ones that you could find for password and user name lists. But I'll just use the default 682 00:46:10,380 --> 00:46:14,600 one here. And I'll run this after the mass scan and NMAP finishes. And then I'm going to run this 683 00:46:14,600 --> 00:46:20,460 one. And it does this. So it locates the file and you can see that inside of my GNMAP file it 684 00:46:20,460 --> 00:46:32,260 identified nine FTP services, eight SMTP, actually nine SMTP, eight SSH hosts, one Telnet and one 685 00:46:33,160 --> 00:46:38,000 MySQL. And it will brute force all of these for common user names and passwords and alert me when 686 00:46:38,000 --> 00:46:44,580 it finds it. So then I'm going to run this. And I'm going to run this. And I'm going to run this. 687 00:46:44,600 --> 00:46:49,180 And then I have now started to look at remote administration protocols. But now I have all of 688 00:46:49,180 --> 00:46:54,220 this data for websites. 443 and 80. These are actually what I spend a majority of my time 689 00:46:54,220 --> 00:46:59,820 testing on a bug bounty is websites. But I have so many now. I have hundreds of domains for a 690 00:46:59,820 --> 00:47:06,700 large scope company. Like what's the largest company you could ever think of? Accenture and 691 00:47:06,700 --> 00:47:12,260 Microsoft. Right? You do this analysis for Accenture and Microsoft, you're getting back like I 692 00:47:12,260 --> 00:47:14,580 would say, well, I know from Microsoft. It's in the middle of the world. It's in the middle of the 693 00:47:14,600 --> 00:47:18,880 world. It's in the thousands of live hosts that you're looking at. Right? And I don't know how 694 00:47:18,880 --> 00:47:23,940 many of you have ever done a campaign against a thousand hosts. It's a lot of work. And to really 695 00:47:23,940 --> 00:47:29,180 know where to start, you could start at the top of the list looking at those hosts. But also you 696 00:47:29,180 --> 00:47:34,000 could do this method of kind of visual identification. So what you do is you use a tool called 697 00:47:34,000 --> 00:47:38,180 eyewitness. There's other tools that do this. Aquatone does this as well. There's another tool 698 00:47:38,180 --> 00:47:42,460 called HDP screenshot. And there's another tool that I just identified that somebody told me 699 00:47:42,460 --> 00:47:44,580 outside in the recon village table. And it's called HDP screenshot. And there's another tool that I 700 00:47:44,600 --> 00:47:47,880 have some examples about that's even better for this. But I haven't tried it yet. So it's at the 701 00:47:47,880 --> 00:47:52,480 end of the presentation. The idea is you find some tool that visits all your URLs or domains and 702 00:47:52,480 --> 00:47:56,580 takes a screenshot. That's all it does. Takes a screenshot, dumps it in a folder. Now you can 703 00:47:56,580 --> 00:48:00,660 open up that folder with large thumbnails enabled or whatever and just look through and kind of 704 00:48:00,660 --> 00:48:05,680 eyeball, like, yeah, that redirected to the main site. I don't care about that. This redirected to 705 00:48:05,680 --> 00:48:10,480 a help site. Kind of don't care about this. Oh, this looks like an admin back end login. Really 706 00:48:10,480 --> 00:48:14,460 care about that. Right? And so you visually start identifying things that you care about. 707 00:48:14,600 --> 00:48:18,560 Out of this large list. And that helps you prioritize what you test first so you get kind of 708 00:48:18,560 --> 00:48:24,760 return on your time. What eyewitness did that I liked a lot is you can feed it just a list of 709 00:48:24,760 --> 00:48:32,380 domains and not whether it's HTTP or HTTPS. And so this tool, eyewitness in specific, would try 710 00:48:32,380 --> 00:48:37,380 both for me. I didn't have to recreate multiple lists with HTTP and HTTPS and then feed it to the 711 00:48:37,380 --> 00:48:41,540 tool. The tool did it for me. But it's also kind of slow. These sometimes are prone to error, 712 00:48:41,600 --> 00:48:44,580 these tools, taking screenshots because they're using things like phantom.jl. And then you can 713 00:48:44,600 --> 00:48:49,360 do the same thing with HTTP and HTTPS, which is just kind of a garbage fire sometimes. So, yeah, 714 00:48:49,500 --> 00:48:54,080 you just have to take it with a grain of salt that maybe you'll get some false negatives in this 715 00:48:54,080 --> 00:48:59,520 idea. I probably still recommend, like, when I'm doing this against a smaller target, if I have 716 00:48:59,520 --> 00:49:04,680 less than 100 hosts that I found, I'm just loading all that in a browser and just visiting the pages 717 00:49:04,680 --> 00:49:10,120 myself using some Chrome plug-ins. If it's over 100 hosts, then I'll do something like this and 718 00:49:10,120 --> 00:49:14,580 go try to automatically do the screenshot method. All right. All right. All right. All right. 719 00:49:16,820 --> 00:49:29,420 Yes. Yes, it is. In eyewitness, they have that function where you can dynamically add a set of 720 00:49:29,420 --> 00:49:33,320 ports to the end of the domain. Yeah. Which I actually don't think a lot of the other tools that 721 00:49:33,320 --> 00:49:40,780 are trying to do this have supported yet. So, yeah. Yeah, like if they were running an HTTPS 722 00:49:40,780 --> 00:49:44,580 service on another port, right? Yeah. Okay. Okay. All right. All right. All right. All right. All 723 00:49:44,600 --> 00:49:48,840 right. All right. So this one, this one is kind of new and is actually, like, really simple. But 724 00:49:48,840 --> 00:49:55,000 who here has used Wayback Machine? Oh, yes. Okay. It's one of my favorite sites. Archive.org and 725 00:49:55,000 --> 00:49:59,580 Wayback Machine are awesome. If you've never used them before, what they are is a website that 726 00:49:59,580 --> 00:50:04,480 takes periodic snapshots of most sites on the internet that they can find, and then they will 727 00:50:04,480 --> 00:50:10,740 take these snapshots and show you the front page or maybe several pages on that site with a date and 728 00:50:10,740 --> 00:50:14,580 time stamp, and they keep the image up there. And so what you can do is if you want to have a lot of 729 00:50:14,580 --> 00:50:17,280 do is when you start going to these sites, what you're going 730 00:50:17,280 --> 00:50:19,820 to notice is a lot of them are like infrastructure that's not 731 00:50:19,820 --> 00:50:22,620 serving a real web page. There's no application. It's really 732 00:50:22,620 --> 00:50:25,020 either an API or some kind of infrastructure that just needs to 733 00:50:25,020 --> 00:50:27,480 be hosted but it's hosting other ports and a web server for no 734 00:50:27,480 --> 00:50:30,280 apparent reason. So you'll notice that when you're going 735 00:50:30,280 --> 00:50:33,580 through your testing, you'll get like a lot of blank pages or 736 00:50:33,580 --> 00:50:36,360 like stuff that looks like it's been nuked but once was there, 737 00:50:36,480 --> 00:50:39,600 like a lot of content. So what you can do is you can go and 738 00:50:39,600 --> 00:50:42,680 look in the web archive history and see was there once sensitive 739 00:50:42,680 --> 00:50:47,400 content there. This is actually how a buddy of mine, Brett, like 740 00:50:47,400 --> 00:50:50,340 I had done this and been successful in a couple cases but 741 00:50:50,340 --> 00:50:53,400 a buddy of mine, Brett, who's a bug bounty hunter was like it was 742 00:50:53,400 --> 00:50:56,200 kind of nice to see that he's found some really high impact 743 00:50:56,200 --> 00:50:59,360 vulnerabilities using this methodology. So you know when 744 00:50:59,360 --> 00:51:01,920 you do this, how do you automate it, right? Well there's some 745 00:51:01,920 --> 00:51:04,600 tools to do it. There's one called Back Unifier and another 746 00:51:04,600 --> 00:51:08,080 one called Recon Cap that supports scraping the links to 747 00:51:08,080 --> 00:51:11,980 the image of the history of the site that you're looking way 748 00:51:11,980 --> 00:51:12,460 back into. 749 00:51:12,680 --> 00:51:16,160 And so these kind of get integrated into your 750 00:51:16,160 --> 00:51:18,740 methodology. When you see sites that have little content on them 751 00:51:18,740 --> 00:51:21,340 or look like they used to be sensitive but have since been 752 00:51:21,340 --> 00:51:24,840 fixed, you go to their way back enumeration and then bingo, 753 00:51:24,920 --> 00:51:27,860 it's like a configuration page that has like a private API key 754 00:51:27,860 --> 00:51:30,840 that's still being used and they thought that removing the web 755 00:51:30,840 --> 00:51:34,480 page was the solution but actually the content was cached 756 00:51:34,480 --> 00:51:42,660 on the Internet. All right. So we did way back in the 757 00:51:42,680 --> 00:51:45,420 enumeration, we did visual identification. All right. So 758 00:51:45,420 --> 00:51:47,840 now for each one of these sites, right, I probably have a node in 759 00:51:47,840 --> 00:51:50,300 my mind map for all of them and I just start going down the list 760 00:51:50,300 --> 00:51:54,200 and this is what I do. First thing is I identify the platform 761 00:51:54,200 --> 00:51:57,460 with built with, right, the current plug in. I have a Python 762 00:51:57,460 --> 00:52:00,400 script that I'm going to release. I just have one bug to 763 00:52:00,400 --> 00:52:04,320 fix because they changed the API all the time and I need to now 764 00:52:04,320 --> 00:52:07,580 change it to use a free account. But I have a Python script I 765 00:52:07,580 --> 00:52:09,660 built that will scrape built with and give you the technology 766 00:52:09,660 --> 00:52:12,460 profile back for your site so you can integrate it into your own 767 00:52:12,460 --> 00:52:15,180 tools. I'll release that afterwards and maybe tweet about 768 00:52:15,180 --> 00:52:19,200 it on my Twitter. Or you can use Wappalyzer which is somebody 769 00:52:19,200 --> 00:52:22,060 mentioned. There's another one called WhatWeb which is also a 770 00:52:22,060 --> 00:52:24,900 technology profiling script. There's a whole bunch of them. 771 00:52:25,020 --> 00:52:27,600 So they're all pretty good. At this point I want to see what my 772 00:52:27,600 --> 00:52:29,800 target runs, my target application. What does it run? 773 00:52:29,980 --> 00:52:33,800 Like ASP.net? Are we looking at PHP? What JavaScript frameworks? 774 00:52:34,260 --> 00:52:36,540 Like I want to start getting that information so I know, 775 00:52:37,000 --> 00:52:40,240 well, ASP.net has request validation so cross site 776 00:52:40,240 --> 00:52:42,440 scripting is not really going to be super successful. I'm going to 777 00:52:42,460 --> 00:52:43,240 look at PHP and see what it does. So it's super successful 778 00:52:43,240 --> 00:52:46,420 for many, many times unless I'm looking at a custom piece of 779 00:52:46,420 --> 00:52:50,200 code or something like that. PHP, you know, very prone to 780 00:52:50,200 --> 00:52:52,700 path traversal attacks or command injection and stuff like 781 00:52:52,700 --> 00:52:54,420 that, old school vulnerabilities. So I got to put 782 00:52:54,420 --> 00:52:57,240 my 1990s hat on and be like, all right, I'm ready to attack 783 00:52:57,240 --> 00:53:02,860 PHP. So this gives me that information, the built with, and 784 00:53:02,860 --> 00:53:05,580 then also there's another one called retire.js which is super 785 00:53:05,580 --> 00:53:08,800 cool, which will give you the full version length of all their 786 00:53:08,800 --> 00:53:12,360 JavaScript libraries which is easily cross referenceable, 787 00:53:12,460 --> 00:53:14,560 with has there been any vulnerabilities since the 788 00:53:14,560 --> 00:53:18,240 version they're using. So immediately I know if they're 789 00:53:18,240 --> 00:53:21,500 using outdated JavaScript libraries and if there's cross 790 00:53:21,500 --> 00:53:23,920 site scripting vulnerabilities in those or anything else. 791 00:53:24,340 --> 00:53:27,940 There's also a newer-ish plug-in which is called a vuln 792 00:53:27,940 --> 00:53:32,320 scanner, burp vulner scanner, and you load it into burp and it 793 00:53:32,320 --> 00:53:35,380 basically does the same thing that retire.js does but except 794 00:53:35,380 --> 00:53:38,520 for the server stack. So if you think like Nmap gives you, or 795 00:53:38,520 --> 00:53:40,720 Nmap not, if you think like Nessus, when you do a Nessus 796 00:53:40,720 --> 00:53:42,440 scan, it comes back and it says, this is the same thing 797 00:53:42,460 --> 00:53:45,120 as this server software, this version, because I know by the 798 00:53:45,120 --> 00:53:48,360 header or identified that there was still an install file left or 799 00:53:48,360 --> 00:53:51,920 something, I know it's this version and that version had a 800 00:53:51,920 --> 00:53:54,520 vulnerability in it. This does this through burp. So you set 801 00:53:54,520 --> 00:53:57,560 this up here and every time you visit a new site, this looks at 802 00:53:57,560 --> 00:54:00,720 those key indicators and says, yeah, this is old. It probably 803 00:54:00,720 --> 00:54:03,760 has a CVE associated to it. You should probably go check to see 804 00:54:03,760 --> 00:54:10,340 if that's exploitable. All right. So I'm on a main site. I 805 00:54:10,340 --> 00:54:12,440 technology profiled it. You know, I'm on a main site. I 806 00:54:12,460 --> 00:54:15,700 kind of know what I'm going up against. I've maybe found some 807 00:54:15,700 --> 00:54:19,620 CVEs that I have to identify. The next big hurdle is parsing 808 00:54:19,620 --> 00:54:23,580 JavaScript. So sites that are, well, every site nowadays is 809 00:54:23,580 --> 00:54:27,100 using heavy JavaScript, right? And dynamic spiders and even 810 00:54:27,100 --> 00:54:30,080 burp in its current incarnation is just not good at traversing 811 00:54:30,080 --> 00:54:35,200 JavaScript. No technology is really great at it. So to be 812 00:54:35,200 --> 00:54:38,000 great at this, I have to add separate tools to my methodology. 813 00:54:38,600 --> 00:54:41,860 So Zap is actually really good for this. Zap's Ajax spider, 814 00:54:42,460 --> 00:54:45,200 is like a headless browser that will execute a whole bunch of 815 00:54:45,200 --> 00:54:49,920 functions on a page and basically return, you know, how 816 00:54:49,920 --> 00:54:52,580 you instrument an application that's heavy JavaScript and 817 00:54:52,580 --> 00:54:55,520 allow you to find parameters and even things like DOM based 818 00:54:55,520 --> 00:55:00,100 cross-site scripting very easily. So Ajax spider is pretty 819 00:55:00,100 --> 00:55:03,540 cool. The other one is called link finder, which is a 820 00:55:03,540 --> 00:55:08,560 standalone tool that you feed a URL or a list of URLs and it will 821 00:55:08,560 --> 00:55:12,240 go in and pull down anything that it sees in the source code of 822 00:55:12,240 --> 00:55:16,720 all the pages of a spider for full URLs, absolute referenced 823 00:55:16,720 --> 00:55:21,700 URLs or dotted URLs, relative URLs with at least one slash or 824 00:55:21,700 --> 00:55:24,940 just references to files. And it will go through all of the 825 00:55:24,940 --> 00:55:27,900 JavaScript files on a site and parse these out for you and 826 00:55:27,900 --> 00:55:31,180 build them into links so that you can visit them inside of 827 00:55:31,180 --> 00:55:33,900 either your browser or just directly through burp repeater 828 00:55:33,900 --> 00:55:37,320 or something like that. This has been really successful with 829 00:55:37,320 --> 00:55:40,460 things like API functions that are maybe loaded on a page in a 830 00:55:40,460 --> 00:55:42,220 large piece of JavaScript on how to implement these things. So 831 00:55:42,220 --> 00:55:44,200 you can implement the API, but since you're there just using one 832 00:55:44,200 --> 00:55:47,540 function, you're only executing one one hundredth of what the API 833 00:55:47,540 --> 00:55:50,680 can do. Well, now you get the paths for all of the API and how 834 00:55:50,680 --> 00:55:53,180 you instrument them. And if they haven't basically set up access 835 00:55:53,180 --> 00:55:56,540 control, having this mapping and knowing how to work that API 836 00:55:56,540 --> 00:56:00,380 without a document is absolutely glorious. You can find 837 00:56:00,380 --> 00:56:02,900 vulnerabilities. Even these things reference configuration 838 00:56:02,900 --> 00:56:06,480 files sometimes. Like a lot of times we were missing out on a 839 00:56:06,480 --> 00:56:09,040 lot of this information in JavaScript files. Now we're not 840 00:56:09,040 --> 00:56:11,540 as much anymore because we have helper tools like link finder. 841 00:56:12,540 --> 00:56:17,760 Very similar is JS parser. Actually written by Ben who was 842 00:56:17,760 --> 00:56:20,480 in the room earlier. I don't know if he ever got in, which is sad. 843 00:56:21,440 --> 00:56:26,060 But he was here. He helped write this. It does the same thing. 844 00:56:26,220 --> 00:56:32,300 Parses out paths that are referenced in JavaScript. So how 845 00:56:32,300 --> 00:56:35,720 do you feed these tools those pages? It's pretty simple. You 846 00:56:35,720 --> 00:56:39,100 go to your top level target in burp sitemap. You go to 847 00:56:39,100 --> 00:56:41,440 engagement tools. Again you have to have the pro engagement tools. 848 00:56:42,220 --> 00:56:45,780 Find scripts. And then you copy the selected URLs that have 849 00:56:45,780 --> 00:56:48,820 scripts on them. And then you feed JS parser link finder that 850 00:56:48,820 --> 00:56:52,240 list. And it will automatically go and do its magic and find 851 00:56:52,240 --> 00:56:59,120 URLs that you need to add. All right. So now we've parsed 852 00:56:59,120 --> 00:57:01,760 JavaScript. We have a good map of the application, what we're 853 00:57:01,760 --> 00:57:06,700 doing, et cetera. Okay. So now we want to do content discovery. 854 00:57:06,880 --> 00:57:11,620 The idea of content discovery or directory brute forcing. Who has 855 00:57:12,220 --> 00:57:16,020 done that before? Anybody? Directory brute forcing. No one's 856 00:57:16,020 --> 00:57:19,540 used der buster before? Or anything? Okay. There we go. All 857 00:57:19,540 --> 00:57:22,740 right. I was worried there for a second. But the idea here is you 858 00:57:22,740 --> 00:57:26,880 have twitch.tv, right? And you've spider twitch.tv and used 859 00:57:26,880 --> 00:57:30,020 it as a user. And you know all these paths and functions that 860 00:57:30,020 --> 00:57:34,160 it's executing. But that's not the whole story. Absolutely there 861 00:57:34,160 --> 00:57:37,160 are back end URLs that are used by service staff like admins. 862 00:57:37,360 --> 00:57:41,200 There are usually configuration pages installed by frameworks or 863 00:57:42,520 --> 00:57:46,480 there's just a whole bunch of stuff behind the scenes. Now how 864 00:57:46,480 --> 00:57:50,280 do I know about that when I look at a site? I do directory brute 865 00:57:50,280 --> 00:57:52,980 forcing with something like der buster. Now der buster is super 866 00:57:52,980 --> 00:57:56,680 old school. Nobody uses der buster anymore. We have now 867 00:57:56,680 --> 00:57:59,500 moved on to some command line tools that have instrumented the 868 00:57:59,500 --> 00:58:02,960 same thing that der buster does but much faster, like go buster. 869 00:58:03,600 --> 00:58:07,260 Go buster is one of my go tos. Another one is der search, which 870 00:58:07,260 --> 00:58:09,960 I've been using more lately. And the reason you would use one 871 00:58:09,960 --> 00:58:12,200 of these tools over the other is the amount of information you're 872 00:58:12,220 --> 00:58:15,900 getting back and control of the directory brute forcing. Five 873 00:58:15,900 --> 00:58:19,460 minutes. Okay. Got it. And so these tools will allow you to go 874 00:58:19,460 --> 00:58:21,760 through a large list of directories. The best one right 875 00:58:21,760 --> 00:58:25,760 now is robots disallowed written by Daniel over here. He went out 876 00:58:25,760 --> 00:58:28,660 and spidered all of the robots.txt files in a large Alexa 877 00:58:28,660 --> 00:58:32,680 list, right? Or the top Alexa whatever. And then built it into 878 00:58:32,680 --> 00:58:35,920 a list for us to use because if you think about a robots.txt 879 00:58:35,920 --> 00:58:39,900 file, it's what developers don't want you to find, right? So now 880 00:58:39,900 --> 00:58:42,200 we go to every place they don't want to find. And then we go to 881 00:58:42,220 --> 00:58:43,140 the place they don't want us to find. They want us to look at 882 00:58:43,140 --> 00:58:46,400 stuff. And we look at stuff. And that's what a hacker does. So 883 00:58:46,400 --> 00:58:52,900 go buster and robots disallowed. Pretty win. So this is another 884 00:58:52,900 --> 00:58:56,220 list that's pretty good for this. I took robots disallowed and 885 00:58:56,220 --> 00:58:58,720 again every tool that I ever found to do directory brute 886 00:58:58,720 --> 00:59:02,480 forcing and I catted it into one list. It's pretty shit but it's 887 00:59:02,480 --> 00:59:06,280 still pretty good. It works for me. It's a large list so this 888 00:59:06,280 --> 00:59:09,860 will take a long time to run on a target. The other idea is that 889 00:59:09,860 --> 00:59:12,120 now we have a whole bunch of functions maybe that are linked 890 00:59:12,220 --> 00:59:15,380 in JavaScript or we got from other places. But we don't know 891 00:59:15,380 --> 00:59:19,120 what parameters they take to actually action the function. So 892 00:59:19,120 --> 00:59:21,500 you can brute force parameter names as well once you find a 893 00:59:21,500 --> 00:59:23,980 function that seems juicy. And I only ever do this when a 894 00:59:23,980 --> 00:59:27,960 parameter seems really juicy like, you know, like admin 895 00:59:27,960 --> 00:59:30,960 equals whatever, you know, transfer data, you know, 896 00:59:30,960 --> 00:59:34,480 depreciate user, like whatever. If the keyword seems juicy, I'll 897 00:59:34,480 --> 00:59:37,400 do this kind of analysis. Otherwise, this is another time 898 00:59:37,400 --> 00:59:40,740 consuming step. Brute forcing anything is time consuming. So 899 00:59:42,220 --> 00:59:45,080 I've got a list of the most common parameters on the 900 00:59:45,080 --> 00:59:48,260 internet that's integrated into a tool inside of burp called 901 00:59:48,260 --> 00:59:51,660 backslash powered scanner. It's the top parameters that appeared 902 00:59:51,660 --> 00:59:56,360 on websites from the Alexa list. And you can feed this to a tool 903 00:59:56,360 --> 01:00:00,760 called parameth which will try to, first of all, try to find 904 01:00:00,760 --> 01:00:06,380 commonly known parameters on a URL or on a script or on a rest 905 01:00:06,380 --> 01:00:09,660 path. And then it will feed it this list and try to brute force 906 01:00:09,660 --> 01:00:12,200 some if it can't elicit what they are verbatim. So I've got a 907 01:00:12,220 --> 01:00:13,960 list of the most common parameters. So this also works 908 01:00:13,960 --> 01:00:17,360 really well. This list is backslash powered scanner list 909 01:00:17,360 --> 01:00:21,520 called params. It's in the folder on port swiggers github. 910 01:00:21,740 --> 01:00:24,700 It also is really useful for API fuzzing. So if you're up 911 01:00:24,700 --> 01:00:27,760 against a rest path, like you find an API and it's a rest 912 01:00:27,760 --> 01:00:31,160 based API, this list is really good for trying to find rest 913 01:00:31,160 --> 01:00:34,280 based API functions when you're doing a black box web audit. 914 01:00:36,020 --> 01:00:38,940 All right. We're almost done, I swear. All right. So the other 915 01:00:38,940 --> 01:00:41,840 one is this idea of auxiliary testing, like just some random 916 01:00:42,220 --> 01:00:45,620 things I wanted to add in here. A lot of people are committing 917 01:00:45,620 --> 01:00:49,240 bad stuff to github. A lot of times. They do it. They just, on 918 01:00:49,240 --> 01:00:52,020 accident, they commit passwords, they commit config 919 01:00:52,020 --> 01:00:56,920 files, private keys, a whole bunch of stuff. So basically 920 01:00:56,920 --> 01:01:00,580 what I do in my script when I kicked off the one earlier is 921 01:01:00,580 --> 01:01:03,080 the first thing it does is it builds a set of links that are 922 01:01:03,080 --> 01:01:06,760 searches to github. So here you can see I have a word here, 923 01:01:06,820 --> 01:01:09,360 password, which is actually the one you hit on the most with 924 01:01:09,360 --> 01:01:12,180 this kind of analysis. And I build a link here. I say github 925 01:01:12,220 --> 01:01:17,860 dot com slash search queue. And then my domain is this dollar 926 01:01:17,860 --> 01:01:21,220 sign one here, right? That's the domain. So in this case it would 927 01:01:21,220 --> 01:01:24,680 probably be twitch.com and then plus password. And that's the 928 01:01:24,680 --> 01:01:27,480 search. And if I click on this out of my console, it will take 929 01:01:27,480 --> 01:01:29,780 me to github. I have to be logged in. And it will do a 930 01:01:29,780 --> 01:01:32,220 search on all github projects for any code that has been 931 01:01:32,220 --> 01:01:36,900 committed that has twitch.tv in it and password equals. And I 932 01:01:36,900 --> 01:01:40,440 will find invariably a lot of these. This seems dumb and 933 01:01:40,440 --> 01:01:42,200 simple. It happens all the time. So I'm going to go ahead and do 934 01:01:42,220 --> 01:01:42,580 a search. I'm going to go ahead and do a search. And I'm going 935 01:01:42,580 --> 01:01:43,140 to have a link right here. And I can see that it's woth a lot of 936 01:01:43,140 --> 01:01:46,560 money in bounties and it's indicative of a lot of risk to 937 01:01:46,560 --> 01:01:49,920 your organization. It just happens. People go spin up 938 01:01:49,920 --> 01:01:52,240 custom code projects. They forget. They commit it to their 939 01:01:52,240 --> 01:01:55,640 own repo. Then they even remove it. But the reference is still 940 01:01:55,640 --> 01:01:58,800 there in the history. So this is a big thing that happens all the 941 01:01:58,800 --> 01:02:02,760 time. So I build these links dynamically while the subdomain 942 01:02:02,760 --> 01:02:04,980 scraper and brute force are running in the background, which 943 01:02:04,980 --> 01:02:07,640 takes a long time, I am manually going to each one of 944 01:02:07,640 --> 01:02:10,720 these github searches and trying to find out if they have 945 01:02:10,720 --> 01:02:12,200 committed stuff. So I'm trying to scan and see if they have 946 01:02:12,200 --> 01:02:17,360 stack my activities so that I'm never wasting time. Something 947 01:02:17,360 --> 01:02:19,640 new I've started to do is favicon analysis, so the 948 01:02:19,640 --> 01:02:23,060 favicons that are associated to your little tab and it shows you 949 01:02:23,060 --> 01:02:26,860 like, hey, this is the Adobe favicon or whatever. I pull that 950 01:02:26,860 --> 01:02:28,960 down from the main website, which I already know usually 951 01:02:28,960 --> 01:02:32,220 when starting one of these. I hash it and then I pull down 952 01:02:32,220 --> 01:02:35,800 every one I see on every site that's in that port scan, that's 953 01:02:35,800 --> 01:02:40,840 in the reference subdomains and I see if the favicon matches and 954 01:02:40,840 --> 01:02:44,380 then I know that for sure that is probably owned by that site 955 01:02:44,380 --> 01:02:47,000 and it might be something indicative that I need to test. 956 01:02:47,220 --> 01:02:51,500 So favicon analysis and that methodology is pretty new. I 957 01:02:52,020 --> 01:02:53,980 confirmed this with a friend of mine who's pretty good at recon. 958 01:02:54,220 --> 01:02:57,540 This has actually worked out for him as well. So found a couple 959 01:02:57,540 --> 01:03:01,100 of reference IP ranges in the cloud that he didn't know for 960 01:03:01,100 --> 01:03:04,420 sure were targets but then because he could verify via the 961 01:03:04,420 --> 01:03:07,920 favicon that they were, was able to get permission to hack them 962 01:03:07,920 --> 01:03:10,820 when nobody else had ever seen them and found a couple of 963 01:03:10,840 --> 01:03:15,040 bounties on that. So super cool. This is the last one I told you 964 01:03:15,040 --> 01:03:16,420 about that I actually found out at the table out there, go 965 01:03:16,420 --> 01:03:20,820 grabber. So the idea of HTTP screenshot or any of those 966 01:03:20,820 --> 01:03:25,100 screenshot tools. This is a new one. What I like here is that 967 01:03:25,100 --> 01:03:27,540 it's faster. It's written in go probably. So it's probably 968 01:03:27,540 --> 01:03:31,200 faster. And I'm going to try this when I get home. I heard 969 01:03:31,200 --> 01:03:33,660 it's pretty good. So I don't really have any data on this. 970 01:03:33,760 --> 01:03:36,760 But if you want to go institute something quick, you can try 971 01:03:36,760 --> 01:03:39,720 this when you get home. So if we go back, this is the total 972 01:03:39,720 --> 01:03:40,820 methodology. So if you go back, this is the total methodology. 973 01:03:40,840 --> 01:03:46,080 Wrapped up in kind of bubbles and a cat. The tools that I use 974 01:03:46,080 --> 01:03:48,920 with it. And this is iterating all the time. Like this is 975 01:03:48,920 --> 01:03:51,420 always changing. Every couple months something happens where I 976 01:03:51,420 --> 01:03:55,520 change up my methodology. I'll wait until all the cameras go 977 01:03:55,520 --> 01:04:08,260 down I guess. Yes. What? No. What is that? Maybe. Okay. 978 01:04:11,000 --> 01:04:13,940 Yeah. Absolutely. I don't have any experience with that. I would 979 01:04:13,940 --> 01:04:15,760 love to add it to my methodology. Yeah. Let's talk. 980 01:04:15,900 --> 01:04:20,100 Absolutely. Okay. So that's most of it. Let's look at the 981 01:04:20,100 --> 01:04:24,920 automation that ran. Okay. So here is holy crap. All right. 982 01:04:25,160 --> 01:04:29,900 That was a lot of stuff. So this is my automation. It's just 983 01:04:29,900 --> 01:04:32,980 glomy bash scripting. It's nothing special. Right? So I 984 01:04:32,980 --> 01:04:36,640 started on twitch.tv at the top. Right? First it says it's 985 01:04:36,640 --> 01:04:40,100 running AMAS sub finder and mass DNS on twitch.tv. So it's going 986 01:04:40,100 --> 01:04:40,820 to take a while. But it's going to take a while. It's going to 987 01:04:40,840 --> 01:04:42,160 take a while. Then what it gives me is the crunch base 988 01:04:42,160 --> 01:04:44,500 links for acquisitions for twitch. So I'll take this and 989 01:04:44,500 --> 01:04:47,660 paste it in my browser. Crunch base uses distill so I can't 990 01:04:47,660 --> 01:04:49,700 automatically pull this down into the command line. I 991 01:04:49,700 --> 01:04:51,700 actually have to go visit the page as a human because distill 992 01:04:51,700 --> 01:04:54,720 is a really good bot protection. So I just build the 993 01:04:54,720 --> 01:04:57,600 link here. I go check it out. I see who they've acquired. I add 994 01:04:57,600 --> 01:05:01,540 them to my mind map. And then I also want to see if there's any 995 01:05:01,540 --> 01:05:04,820 like kind of directory structure that twitch.tv maybe uses or 996 01:05:04,820 --> 01:05:07,280 it's referenced very highly in Google search results. So this 997 01:05:07,280 --> 01:05:10,820 is a Python Google script or a Google search result. So this is 998 01:05:10,820 --> 01:05:14,080 a Google browser basically. So I can't remember the name of it. 999 01:05:14,200 --> 01:05:18,080 But I institute this basically command line browser to pull 1000 01:05:18,080 --> 01:05:21,940 back Google queries. And then it gives me links that are 1001 01:05:21,940 --> 01:05:24,220 referenced on Google for twitch.tv. So I start looking at 1002 01:05:24,220 --> 01:05:26,520 these things and seeing if there's any strong correlations 1003 01:05:26,520 --> 01:05:30,040 of sites I should test. Then it builds my GitHub list for me. 1004 01:05:30,140 --> 01:05:34,000 Right? So passwords, I'll just grab this and copy it or open in 1005 01:05:34,000 --> 01:05:40,320 the browser. So really hope nothing shows up. So I'm going 1006 01:05:40,820 --> 01:05:47,240 to take a look at this. So somebody has a project here which 1007 01:05:47,240 --> 01:05:51,300 has a JSON config file with maybe credentials in it. Here's a bot 1008 01:05:51,300 --> 01:05:55,080 dot config for probably scraping twitch. Probably not run by one 1009 01:05:55,080 --> 01:05:57,900 of their own employees. Here's a conf file that doesn't actually 1010 01:05:57,900 --> 01:06:01,460 specify a password. Here's somebody who's put a variable in 1011 01:06:01,460 --> 01:06:08,460 for a password. User and pass. That's really secure. OAuth. So 1012 01:06:08,460 --> 01:06:10,800 this is going to use OAuth. Yeah. So I'm going to go ahead and 1013 01:06:10,820 --> 01:06:13,260 I'll look through multiple pages here. When you're looking through 1014 01:06:13,260 --> 01:06:17,660 the GitHub output, you can choose best match or recently indexed. 1015 01:06:17,680 --> 01:06:21,260 Recently indexed will give you, you know, a good view of like if 1016 01:06:21,260 --> 01:06:25,000 anybody's done something like really recently, they may have 1017 01:06:25,540 --> 01:06:29,040 forgot to pull it out. So I will use both. I will look at 1018 01:06:29,040 --> 01:06:32,160 both sorting views of this data. And I will do this for all of 1019 01:06:33,740 --> 01:06:37,860 these. Password, ID RSA, pass WD. There's a long list of these 1020 01:06:37,860 --> 01:06:40,380 that I took from another tool. I can't remember the name. Do you 1021 01:06:40,820 --> 01:06:43,520 understand what the name of that tool is? Yeah. It's some other 1022 01:06:43,520 --> 01:06:48,200 GitHub like dorking tool. But it does all, it does some of the 1023 01:06:48,200 --> 01:06:50,800 analysis automatically. But it was for a different use case. So 1024 01:06:50,800 --> 01:06:54,560 I took that and put it into building these links. Then the 1025 01:06:54,560 --> 01:06:57,340 scraper and brute force stuff finished processing. And I want 1026 01:06:57,340 --> 01:07:00,980 to make sure that these sites exist and are not just references 1027 01:07:00,980 --> 01:07:04,340 or taken down, right? Because it's scraping, it's taking 1028 01:07:04,340 --> 01:07:07,480 information off the Internet. You don't know if that site may be 1029 01:07:07,480 --> 01:07:10,480 taken down, right? So I built my own script to resolve everything. 1030 01:07:10,820 --> 01:07:15,280 Not super fancy. And it resolved IP. So a lot of IP or a lot of 1031 01:07:15,280 --> 01:07:24,640 domains were found. A lot. What? What is it? Oh, okay. I got to 1032 01:07:24,640 --> 01:07:27,400 go. So anyway, you can do this at home. This is not fancy 1033 01:07:27,400 --> 01:07:32,440 scripting. I get the list of IPs to analyze. I get the links for 1034 01:07:32,440 --> 01:07:35,200 the sites. I load them in the browser and I test them doing 1035 01:07:35,200 --> 01:07:37,700 web hunting. That's it. Thank you very much. 1036 01:07:40,820 --> 01:07:40,960 Thank you.