1 00:00:00,830 --> 00:00:07,170 Okay, so now is the time for the second last talk for today. 2 00:00:08,770 --> 00:00:11,950 And we've got some interference from our neighbors. 3 00:00:11,990 --> 00:00:14,770 So we'll have to bear with it, cope with it, unfortunately. 4 00:00:16,150 --> 00:00:19,450 So we've got this time Jasper Insinger. 5 00:00:19,850 --> 00:00:23,610 Jasper is a security researcher at Hadrian Security. 6 00:00:24,110 --> 00:00:29,690 He has given multiple presentations in the past and has been present in Black Hat multiple times. 7 00:00:29,690 --> 00:00:31,710 He was in Black Hat yesterday as well, I'm assuming. 8 00:00:31,710 --> 00:00:32,310 Yes. 9 00:00:32,310 --> 00:00:33,190 Nice. 10 00:00:33,950 --> 00:00:40,070 The topic that he will be covering is pushing the limits of mass DNS scanning. 11 00:00:40,550 --> 00:00:47,710 Now, Jasper and his team developed an ultra-fast open-source DNS scanner named as SanicDNS. 12 00:00:47,710 --> 00:00:57,130 Using multiple parallelization techniques, the result in a scanner is that it has two orders of magnitude. 13 00:00:57,130 --> 00:00:59,310 The result is twice faster. 14 00:00:59,310 --> 00:01:02,870 It has two orders of magnitude faster than other popular tools. 15 00:01:03,270 --> 00:01:10,050 Jasper will take us under the hood of the code and share the techniques that have been used in identifying such kind of a result. 16 00:01:10,550 --> 00:01:21,010 With SanicDNS, it is possible to identify DNS misconfigurations, conduct name server takeover scans, and do a lot more fun stuff, which Jasper will let us know about. 17 00:01:21,010 --> 00:01:22,830 So please give it up for Jasper. 18 00:01:25,210 --> 00:01:26,650 All right, thank you. 19 00:01:29,920 --> 00:01:31,520 Okay, let's get into it. 20 00:01:31,840 --> 00:01:33,280 So thanks for inviting me. 21 00:01:33,280 --> 00:01:37,320 So I've also talked about exactly this subject two years back. 22 00:01:37,600 --> 00:01:42,500 And back then, the tool was like half-finished, very shitty, not usable at all. 23 00:01:42,500 --> 00:01:53,400 But in the last two years, I've been able to actually polish it up, make it a lot nicer, and also especially make sure that everyone in the security community can go and use it. 24 00:01:54,320 --> 00:01:55,620 So who am I? 25 00:01:55,620 --> 00:01:56,720 I'm Jasper. 26 00:01:57,500 --> 00:02:00,100 My background is in electrical engineering. 27 00:02:00,220 --> 00:02:03,020 So I studied back in the Netherlands, Dutch guy. 28 00:02:03,240 --> 00:02:07,240 And I primarily just love C++ and building fast things. 29 00:02:07,600 --> 00:02:12,120 That has kind of been my main thing in life that I just absolutely love. 30 00:02:12,120 --> 00:02:14,560 The background in embedded systems. 31 00:02:14,920 --> 00:02:23,160 Currently, I'm working as a security researcher at Hadrian, where I work primarily on DNS scanning, and also just building random hacking tools. 32 00:02:23,160 --> 00:02:24,800 Whatever works. 33 00:02:25,680 --> 00:02:27,120 All right, quick outline. 34 00:02:27,300 --> 00:02:32,100 So first, I'm going to start with why do we actually want to scan DNS? 35 00:02:33,040 --> 00:02:35,440 Because, like, why? 36 00:02:35,800 --> 00:02:41,860 Also, after that, we're just going to go into how you can actually build a brute-forcer where you can actually reach these lightning speeds. 37 00:02:42,360 --> 00:02:44,480 Tell a bit about the tool itself. 38 00:02:45,300 --> 00:02:51,720 Also, of course, I'm going to do a recap of how you can use the tool and also why you would want to use this tool. 39 00:02:51,720 --> 00:02:56,400 And also, a mandatory scanning responsibly. 40 00:02:56,720 --> 00:03:00,460 And I think there's also quite some future work that can still be done. 41 00:03:01,660 --> 00:03:02,640 So, DNS. 42 00:03:02,640 --> 00:03:03,700 Why scan it? 43 00:03:04,180 --> 00:03:06,340 DNS is like the backbone of the Internet. 44 00:03:06,340 --> 00:03:08,160 Like, a very nice spine here. 45 00:03:09,180 --> 00:03:15,140 And HTTP, FTP, SSH, they all kind of need DNS to work nicely. 46 00:03:15,140 --> 00:03:17,720 Because you don't want to be typing in IP addresses. 47 00:03:18,400 --> 00:03:21,660 And DNS is in this way critical to the Internet. 48 00:03:21,660 --> 00:03:22,940 It's been around for a long time. 49 00:03:23,540 --> 00:03:27,360 And it's just super, super relevant for almost anything you want to do online. 50 00:03:28,560 --> 00:03:32,700 So, DNS is very relevant for hackers because of this. 51 00:03:32,920 --> 00:03:38,880 Because the step zero for any hacker should be to map out the attack service of the target they're trying to hack. 52 00:03:39,320 --> 00:03:43,660 And one way that this can be done is by DNS brute-forcing. 53 00:03:43,940 --> 00:03:48,960 And this is basically trying millions and millions of subdomains for a given root domain. 54 00:03:48,960 --> 00:03:54,580 And the larger the word list, they have a higher chance of finding interesting stuff. 55 00:03:54,800 --> 00:04:01,320 But the downside is that if you have a super large word list, then it's also going to take a lot of time for a scan to complete. 56 00:04:01,320 --> 00:04:02,800 Which you don't really want. 57 00:04:03,360 --> 00:04:06,000 Which brings us to scanning fast. 58 00:04:07,140 --> 00:04:11,100 So, large attack service, lots of things to scan. 59 00:04:11,480 --> 00:04:14,900 And currently mass DNS is the fastest tool for DNS scanning. 60 00:04:14,900 --> 00:04:17,480 You have ZDNS, which also comes quite close. 61 00:04:17,480 --> 00:04:29,360 But one thing that I noticed is that ZMap or some other fast port scanning tools can actually reach orders of magnitudes higher in packet rates than mass DNS can. 62 00:04:29,360 --> 00:04:39,500 So, for example, you can reach millions and millions of packets with ZMap while mass DNS only does like 50k, maybe 100k if you're very lucky. 63 00:04:41,080 --> 00:04:46,460 So, why is mass DNS so slow in comparison to these port scanning tools? 64 00:04:47,440 --> 00:04:51,720 So, I made this very nice schematic representation of how mass DNS scans. 65 00:04:52,020 --> 00:05:00,620 So, we have mass DNS, we have the Linux kernel, and you have your network interface cards which connects your actual OS to the worldwide internet. 66 00:05:01,920 --> 00:05:06,780 So, mass DNS goes around and says, yo, Linux kernel, can you send this packet for me? 67 00:05:07,040 --> 00:05:10,160 Linux says, alright, I can do that for you. 68 00:05:11,000 --> 00:05:16,540 It asks the NIC to send the packet, the NIC sends the packet, and it goes to the internet. 69 00:05:16,820 --> 00:05:22,140 And the same thing has to happen the other way around when the answer is received. 70 00:05:22,420 --> 00:05:28,300 NIC receives the answer, goes to the kernel, goes to mass DNS, but there's a lot of overhead. 71 00:05:29,020 --> 00:05:40,340 So, Linux networking is super chill to use for if you're, I don't know, doing anything with web browsing, emails, just any regular internet traffic, but it is just not very, very fast. 72 00:05:40,720 --> 00:05:43,000 So, how do we fix this? 73 00:05:43,000 --> 00:05:48,280 That brings us to the next part, which is the kernel bypass networking. 74 00:05:49,420 --> 00:05:55,100 So, the mass DNS situation is kind of like this, but a bit more professional schema. 75 00:05:55,180 --> 00:06:05,000 Hardware talks to the device driver, device driver puts the packet into the network stack, and through the network stack, the packet goes to the application. 76 00:06:06,140 --> 00:06:10,460 So, how do we make it faster if the Linux is actually slow? 77 00:06:10,460 --> 00:06:12,400 Solution, skip the kernel. 78 00:06:12,880 --> 00:06:17,840 So, what you can do is, like, I'm using the Data Plane Development Kit. 79 00:06:18,380 --> 00:06:27,220 Usually, you would use the Data Plane Development Kit if you're a researcher, and you're working on data centers, and you're working on hyper-fast interlinks, or whatever. 80 00:06:27,980 --> 00:06:31,420 It allows you to access the NIC directly from your application. 81 00:06:32,500 --> 00:06:38,940 And port scanners actually use a similar principle to really speed up their scanning speed. 82 00:06:39,380 --> 00:06:41,780 So, the advantages, it's a little faster. 83 00:06:42,020 --> 00:06:44,480 Disadvantage, it's super hard to use. 84 00:06:44,560 --> 00:06:48,000 It cost me, like, a month to even send a single packet and receive a reply. 85 00:06:48,600 --> 00:06:50,480 It is quite cumbersome. 86 00:06:51,580 --> 00:06:58,680 But, what if there was a DNS scanner that was written with this kernel bypass mechanism, and loads of other tricks, by the way. 87 00:06:58,680 --> 00:07:00,760 So, it goes way deeper than that. 88 00:07:01,040 --> 00:07:04,200 That you can install in 10 seconds, written in C++. 89 00:07:04,420 --> 00:07:06,820 So, introducing SonicDNS today. 90 00:07:06,820 --> 00:07:09,660 With exactly that purpose. 91 00:07:11,160 --> 00:07:14,040 So, how fast can we go? 92 00:07:14,340 --> 00:07:17,880 So, this benchmark is very much lab-tested. 93 00:07:18,140 --> 00:07:22,860 So, I use a self-written resolver, which only returns NX domain responses. 94 00:07:23,100 --> 00:07:26,620 And I use, like, a 9 gigabit input file with domains. 95 00:07:27,180 --> 00:07:31,180 And, using this method, I can reach, like, over 7.5 million packets per second. 96 00:07:31,180 --> 00:07:38,980 Which is, like, quite a bit faster than messaging in S3, which can maybe, like, 50k, 100k per second, if you're really lucky. 97 00:07:40,540 --> 00:07:41,960 So, it's super nice. 98 00:07:41,960 --> 00:07:48,920 And can we, like, connect this to the internet right now and expect to brute force anything with 7.5 million packets per second now? 99 00:07:50,580 --> 00:07:52,560 Well, unfortunately not. 100 00:07:52,920 --> 00:07:57,260 So, today I'm also gonna tell you a bit , like, why that is, and how we can circumvent that. 101 00:07:58,320 --> 00:08:04,260 So, there are some limits towards, like, actually scanning the internet really, really, really, really fast. 102 00:08:04,460 --> 00:08:09,300 So, you want to be this guy scanning with your minigun, just hitting those DNS resolvers. 103 00:08:09,520 --> 00:08:13,120 But, that's unfortunately not always how it works. 104 00:08:13,620 --> 00:08:16,820 So, first limit is the resolvers. 105 00:08:16,820 --> 00:08:19,860 Second limit is, like, bad network interfaces. 106 00:08:20,040 --> 00:08:23,080 And third limit is packet switching limits. 107 00:08:23,080 --> 00:08:26,240 I'll take you through these in individual slides. 108 00:08:26,940 --> 00:08:30,500 First of all, the recursive resolvers. 109 00:08:30,500 --> 00:08:39,240 So, recursive resolvers such as 1.1.1.1 will actually take care of the actual resolving part and walking the DNS tree for you. 110 00:08:39,580 --> 00:08:43,020 But these resolvers actually start rate limiting quite fast. 111 00:08:43,240 --> 00:08:47,980 So, in order to scan fast, you need lots of good resolvers and spread the load. 112 00:08:48,260 --> 00:08:51,700 But still, these resolvers remain a very, very tricky subject. 113 00:08:51,700 --> 00:08:55,120 They start rate limiting, they start giving back bullshit responses. 114 00:08:55,860 --> 00:09:08,040 So, like, having a really, really good, like, a word list with resolvers is actually critical towards getting good results with MyDNS and also with MassDNS. 115 00:09:09,440 --> 00:09:14,200 So, I personally use the fresh resolvers and Trickist repos for that. 116 00:09:14,200 --> 00:09:16,460 They have some pretty nice resolvers in there. 117 00:09:16,980 --> 00:09:22,380 But, like, experiment and if you find a resolver list that's even better, please pop me a message. 118 00:09:22,380 --> 00:09:24,300 I'd be very interested to hear. 119 00:09:25,500 --> 00:09:28,580 Like, limit two bad network interfaces. 120 00:09:28,900 --> 00:09:33,240 So, what you probably all have is your VPS, which you use for scanning. 121 00:09:34,040 --> 00:09:35,180 And they're super convenient. 122 00:09:35,180 --> 00:09:40,540 You can go to DigitalOcean, Skillway, Linode and pay a couple of dollars a month. 123 00:09:40,540 --> 00:09:42,600 Sometimes a bit more if you want a beefy one. 124 00:09:43,760 --> 00:09:48,520 Super nice, but these VPSs have virtualized network interfaces. 125 00:09:48,980 --> 00:09:59,080 So, in the image here on the right, you can actually see that these VPSs run on one larger server that's actually the bare metal server. 126 00:09:59,700 --> 00:10:11,320 And the downside is that the actual physical network card is connected to this bare metal server and these VPSs communicate to the internet with virtualized network interfaces. 127 00:10:11,640 --> 00:10:24,780 And the big downside with these virtualized network interfaces is that they're just not so fast as your dedicated super fast network card that these servers usually have. 128 00:10:26,020 --> 00:10:30,120 Which brings us to the third limit to fast DNS scanning. 129 00:10:30,480 --> 00:10:32,240 Packet switching speeds. 130 00:10:32,680 --> 00:10:37,240 So , some of you might already have a 10 gigabit internet connection at home. 131 00:10:38,140 --> 00:10:47,060 Can you actually go and scan DNS with 10 gigabit now, which is in outgoing packets around 10 million packets per second? 132 00:10:47,560 --> 00:10:49,140 Unfortunately not. 133 00:10:49,400 --> 00:10:56,620 And that is mainly because consumer routers cannot handle the packet routing speeds necessary for these DNS packets. 134 00:10:57,020 --> 00:11:07,920 So, usually what you do when you have your 10 gigabit internet system is you use it to download a large file or use it to transfer large files. 135 00:11:07,920 --> 00:11:09,860 That's, I think, the main use case. 136 00:11:10,460 --> 00:11:17,720 And what the internet does with these large files is they cut the large files up into pretty big chunks. 137 00:11:17,880 --> 00:11:21,880 And your router can actually process those really big chunks quite well. 138 00:11:22,060 --> 00:11:27,760 But if you give your router very, very small packets then it just becomes totally overwhelmed. 139 00:11:27,760 --> 00:11:30,640 I definitely had my home router crash with this once. 140 00:11:30,700 --> 00:11:33,060 Then I didn't use it anymore from home. 141 00:11:33,060 --> 00:11:35,360 And also my internet at home is quite shit. 142 00:11:35,360 --> 00:11:37,400 So, that doesn't help. 143 00:11:37,760 --> 00:11:43,500 But anyway, also that is like a serious limit that you will also encounter in data centers. 144 00:11:43,580 --> 00:11:46,300 And it's actually really, really hard to get around this one. 145 00:11:47,300 --> 00:11:48,380 Alright. 146 00:11:48,460 --> 00:11:50,840 Then, also very, very important. 147 00:11:50,840 --> 00:11:52,700 What is in this for you guys? 148 00:11:53,540 --> 00:11:56,840 Because I already thinking, I don't have a dedicated server. 149 00:11:56,840 --> 00:11:59,820 I don't have a super crazy network card. 150 00:11:59,820 --> 00:12:02,000 I hate C++, because who doesn't? 151 00:12:02,120 --> 00:12:05,040 And this is my $5 a month VPS. 152 00:12:05,400 --> 00:12:07,720 So, what do I do now? 153 00:12:07,900 --> 00:12:10,060 Can I use this tool? 154 00:12:10,860 --> 00:12:12,360 Well, I have good news. 155 00:12:12,360 --> 00:12:18,040 This tool can actually bring a lot for you, especially if you have a shitty VPS. 156 00:12:18,500 --> 00:12:26,320 Because static DNS is like a lot more efficient in well, basically anything than ZDNS or mass DNS. 157 00:12:26,420 --> 00:12:28,740 Also, when you're a very shitty VPS. 158 00:12:29,240 --> 00:12:36,180 So, with static DNS, you can go around like if you're lucky, it has a good day and the internet has a good day. 159 00:12:36,180 --> 00:12:42,360 You can go around like scan 100K domains a second, just from the super, super simple VPS. 160 00:12:42,360 --> 00:12:46,540 And with mass DNS, usually I get like 1 or 2K domains a second. 161 00:12:46,540 --> 00:12:50,480 I put the max here I ever saw, which is 5K domains a second. 162 00:12:51,020 --> 00:12:53,700 And what brings this for you? 163 00:12:53,700 --> 00:13:01,040 So, for example, if you look at the zonefiles.io screenshot, they have like 266 million domains in there. 164 00:13:01,780 --> 00:13:12,280 Which sounds like quite a lot, but what this tool allows you to do is actually scan every root domain out there on the internet, with your shitty $5 VPS, in under an hour. 165 00:13:12,500 --> 00:13:14,440 So, that's pretty sick. 166 00:13:14,500 --> 00:13:18,500 And you can put that in a database and do, for example, reverse IP lookups. 167 00:13:18,500 --> 00:13:20,980 So, that's actually what I use this tool most for. 168 00:13:21,000 --> 00:13:27,240 I scan 2 billion DNS records, put them in a database so I can do reverse IP lookups, reverse MX lookups. 169 00:13:27,240 --> 00:13:29,800 So, that's my personal use case for this tool. 170 00:13:31,100 --> 00:13:32,660 So, demo time. 171 00:13:32,660 --> 00:13:34,860 So, let's hope the live demo doesn't break. 172 00:13:36,700 --> 00:13:37,580 Alright. 173 00:13:37,580 --> 00:13:38,380 Perfect. 174 00:13:38,380 --> 00:13:44,640 So, what I'm gonna do is I'm gonna create a... let's see if this page still works. 175 00:13:45,100 --> 00:13:45,820 Yes. 176 00:13:46,520 --> 00:13:47,560 Yes. 177 00:13:47,760 --> 00:13:51,300 Alright, I'm gonna make a new VPS. 178 00:13:51,400 --> 00:13:53,900 This is how you show the installation process. 179 00:13:54,120 --> 00:13:55,600 Pro XS. 180 00:13:55,600 --> 00:13:57,300 So, it's not very big. 181 00:13:57,300 --> 00:13:59,600 It's like the lowest tier you can get here. 182 00:14:00,320 --> 00:14:01,720 $0.05 an hour. 183 00:14:01,720 --> 00:14:03,080 So, expensive. 184 00:14:04,140 --> 00:14:06,260 Create it, wait for a bit. 185 00:14:06,600 --> 00:14:07,980 It actually goes quite fast. 186 00:14:07,980 --> 00:14:09,500 I tested it a lot of times. 187 00:14:12,720 --> 00:14:15,380 Alright, let's wait for it to start for a bit. 188 00:14:18,840 --> 00:14:20,000 Alright, running. 189 00:14:23,810 --> 00:14:25,550 Try SSH into it. 190 00:14:27,950 --> 00:14:30,990 Yeah, it usually takes a couple of tries on the first time. 191 00:14:35,010 --> 00:14:36,210 Give it a minute. 192 00:14:39,330 --> 00:14:40,970 Gotta take a picture of the guys. 193 00:14:40,970 --> 00:14:43,350 Lots of people have come over. 194 00:14:43,430 --> 00:14:44,370 Alright, there we go. 195 00:14:44,830 --> 00:14:46,750 So, now we can actually go connect to the VPS. 196 00:14:48,510 --> 00:14:50,530 So, totally blank VPS. 197 00:14:50,530 --> 00:14:51,530 Nothing on there. 198 00:14:54,750 --> 00:14:55,570 One password. 199 00:14:57,470 --> 00:15:00,250 Alright, so, nothing on there. 200 00:15:00,250 --> 00:15:01,090 Totally new. 201 00:15:01,870 --> 00:15:05,930 First need to install jq, because otherwise it doesn't work. 202 00:15:06,370 --> 00:15:08,370 Can you guys in the back read it, by the way? 203 00:15:08,370 --> 00:15:10,010 Otherwise I can also make it a bit bigger. 204 00:15:11,450 --> 00:15:12,770 Alright, perfect. 205 00:15:15,050 --> 00:15:15,930 Oh, bigger. 206 00:15:15,930 --> 00:15:18,830 I thought I saw the thumbs up. 207 00:15:21,090 --> 00:15:22,190 This okay? 208 00:15:23,470 --> 00:15:24,450 Yes, nice. 209 00:15:24,450 --> 00:15:25,470 Love to hear it. 210 00:15:25,670 --> 00:15:27,710 Alright, then we go to the SonicDNS repo. 211 00:15:27,710 --> 00:15:29,990 I have a single line install script. 212 00:15:32,230 --> 00:15:34,010 There we go, that's it. 213 00:15:37,470 --> 00:15:44,450 Now, so, actually, because of the way this works, it needs some, like, more specific kernel thingies, such as huge pages. 214 00:15:45,130 --> 00:15:46,770 So, it makes it run faster. 215 00:15:46,790 --> 00:15:48,210 I mean, who doesn't want that? 216 00:15:48,930 --> 00:15:51,610 Also, I'm going to download the majestic-million.txt. 217 00:15:52,250 --> 00:15:55,190 That is just a million domains that we can go resolve right now. 218 00:15:56,290 --> 00:15:57,710 And I think, actually, that's it. 219 00:15:58,330 --> 00:16:00,150 Then, let's try to copy this. 220 00:16:01,850 --> 00:16:05,430 Let's put a timeout at, like, one second or something. 221 00:16:07,470 --> 00:16:11,730 We're gonna, like, have 300,000. 222 00:16:12,090 --> 00:16:15,750 So, now we can, like, resolve 300,000 domains at the same time. 223 00:16:16,190 --> 00:16:18,750 All very efficient, so you can, like, run it on anything. 224 00:16:19,650 --> 00:16:22,810 Let's just start with, like, 80,000 packets per second. 225 00:16:23,830 --> 00:16:24,990 Let's hope it works. 226 00:16:26,770 --> 00:16:27,790 There we go. 227 00:16:28,850 --> 00:16:41,610 I mean, you can see that it's kind of, like, doing weird stuff, because, like, the SSH connection is not working too well when, like, you're resolving this fast, because you're, like, hammering that network interface, like, really hard. 228 00:16:42,070 --> 00:16:42,510 But... 229 00:16:43,110 --> 00:16:45,350 Last time also takes a bit longer. 230 00:16:47,250 --> 00:16:48,430 But there we go. 231 00:16:48,430 --> 00:16:49,610 22 seconds. 232 00:16:49,710 --> 00:16:51,010 One million domains later. 233 00:16:52,050 --> 00:16:56,890 So, like, this is really, really nice, and you can try it for yourself with mass DNS. 234 00:16:57,050 --> 00:17:00,470 I'm not gonna go through the installation process myself right now. 235 00:17:00,930 --> 00:17:12,190 But, like, most I've gotten was, like, 3k packets per second, like, sustained brute forcing with exactly the same resolvers and stuff, exactly the same VPS. 236 00:17:12,690 --> 00:17:14,110 So, nothing different there. 237 00:17:14,490 --> 00:17:16,990 It's just, like, really, really, really efficient. 238 00:17:16,990 --> 00:17:20,710 So, also, when you have a small VPS, it'll run a lot faster. 239 00:17:22,230 --> 00:17:32,770 So, what you can do if you want to resolve even more, like, these things are 5 cents an hour, you just get 10 of them, and then you resolve and get, like, 800,000, or, like, it's pretty well scalable. 240 00:17:32,770 --> 00:17:34,230 You just get more VPSs. 241 00:17:36,330 --> 00:17:40,290 So, brings us to the next slide, which is scanning responsibly. 242 00:17:41,190 --> 00:17:48,230 So, this is kind of a schematic representation of static DNS versus your average Python-based resolver of most companies. 243 00:17:48,310 --> 00:17:51,990 At least, I don't know what they actually use, but we wouldn't be surprised if they use Python. 244 00:17:52,090 --> 00:17:53,390 It's not a fair match. 245 00:17:54,210 --> 00:18:00,170 So, this tool can actually resolve way, way, way faster than most things are made to handle. 246 00:18:00,610 --> 00:18:02,530 So, don't break stuff, please. 247 00:18:03,270 --> 00:18:12,630 Static DNS is really, really nice for internet-wide DNS research, or, I mean, that's also why I'm putting it online, so I hope you guys can find more use cases. 248 00:18:12,730 --> 00:18:14,510 But if used correctly. 249 00:18:15,070 --> 00:18:18,630 If you don't use it correctly, then don't do that. 250 00:18:18,630 --> 00:18:19,470 It's not good. 251 00:18:22,230 --> 00:18:25,730 So, DNS servers are just not made for this type of traffic. 252 00:18:26,290 --> 00:18:32,310 And also, one thing is be nice to authoritative DNS servers, which I will explain in a bit. 253 00:18:32,710 --> 00:18:42,950 So, for example, a very common use case, I think a lot of you guys are doing this, you have a couple of programs you want to go brute-force, and you have a word list that you're going to use for the inputs. 254 00:18:43,930 --> 00:18:57,910 So , the left thing is what you shouldn't do, where, for example, you want to brute-force github, apple .com, and google.com, where you first go and resolve everything for github, then everything for apple, and then last, everything for google. 255 00:18:58,530 --> 00:19:11,410 This is really bad, because that'll make sure that first, all the load gets redirected to github, then all the load goes to apple, and then all the load goes to google, and you made them all very, very pissed. 256 00:19:11,770 --> 00:19:15,130 So, what you can better do is actually mix it all up. 257 00:19:15,510 --> 00:19:21,610 That's also what I do myself, or if I have to do like 2 billion very, very big DNS resolvings. 258 00:19:22,050 --> 00:19:24,070 So, I just jumble it all up. 259 00:19:24,530 --> 00:19:32,110 You just round-trim it between the github, apple, google, github, apple, google, apple, github, google, I don't know, I messed the order up there. 260 00:19:33,170 --> 00:19:41,890 But in this way, you're making sure that you're spreading the load over the authoritative DNS resolvers of github, apple, and google, and that you're not making anyone angry. 261 00:19:42,710 --> 00:19:45,270 The tool I use myself is Terashift. 262 00:19:45,390 --> 00:19:46,490 Very, very nice tool. 263 00:19:46,490 --> 00:19:54,390 It can take a 50 gigabyte input file and shuffle all the lines and this will make sure that you're not going to make anyone angry. 264 00:19:55,070 --> 00:20:01,370 Also, if you do the thing on the right, then you'll be able to go a lot faster because everything starts rate limiting a lot less fast. 265 00:20:02,550 --> 00:20:05,670 So, I think that was the majority of it. 266 00:20:05,790 --> 00:20:08,030 Now some future work that I still want to do. 267 00:20:08,370 --> 00:20:12,970 So, one very relevant thing is wildcard detection, of course. 268 00:20:13,290 --> 00:20:18,010 So, we can resolve really fast, but wildcards, they'll still pop up all over the place. 269 00:20:19,650 --> 00:20:32,990 Also, one thing that I think would be very nice, implementing IPv6, so we can actually rotate the IPs that we're using because there are 128 bits worth of IPv6 addresses, which is way too much. 270 00:20:33,170 --> 00:20:43,210 So, it's very easy to get your hand on, like, a block of a gazillion IPv6 addresses and you can just rotate through all of them, which will evade rate limiting, which is, of course, what we want. 271 00:20:43,490 --> 00:20:49,850 Another thing that I want to combine the IPv6 stuff with is recursive resolving in the tool itself. 272 00:20:50,530 --> 00:20:59,450 Like, right now, you need recursive resolvers to actually go and, like, ask for these IP addresses, but it is actually pretty doable to also implement this yourself. 273 00:20:59,710 --> 00:21:12,070 And I think if you combine that with IPv6 and the wildcard detection, then you have, like, a DNS scanning tool where you can actually go and make a live map of the entire internet in real time. 274 00:21:12,070 --> 00:21:14,370 And I think that is, of course, really nice. 275 00:21:14,370 --> 00:21:16,370 So, that's what I personally want. 276 00:21:17,830 --> 00:21:19,230 But I think that's it. 277 00:21:19,230 --> 00:21:20,750 So, that kind of wraps it up. 278 00:21:20,750 --> 00:21:22,150 Output is all JSON, by the way. 279 00:21:22,150 --> 00:21:23,470 So, JSON line by line. 280 00:21:23,470 --> 00:21:25,070 I mean, go check it out. 281 00:21:25,690 --> 00:21:31,910 You can find the repo link on github.com slash Hedion security slash static DNS. 282 00:21:32,370 --> 00:21:35,510 I also included some basic documentation of how it works. 283 00:21:35,770 --> 00:21:39,670 Not finished completely, but I hope to get to that next week. 284 00:21:39,670 --> 00:21:47,710 And if you have any ideas, questions, recommendations, feel free to, like, make a GitHub issue or send me a message at github.com. 285 00:21:48,990 --> 00:21:50,470 So, just contact me on X. 286 00:21:50,470 --> 00:21:52,670 And thanks a lot, guys, for being here. 287 00:21:56,590 --> 00:21:57,510 All right. 288 00:21:58,210 --> 00:21:59,410 Any questions? 289 00:22:04,410 --> 00:22:05,210 Nothing? 290 00:22:05,750 --> 00:22:06,670 All good. 291 00:22:08,550 --> 00:22:10,170 Lots of information, I know. 292 00:22:12,350 --> 00:22:12,710 Yes. 293 00:22:12,710 --> 00:22:12,890 All right. 294 00:22:12,890 --> 00:22:13,470 Thanks, guys.