1 00:00:00,000 --> 00:00:04,060 My name is Fyodor from Insecure.org and the MMAP project. 2 00:00:04,460 --> 00:00:08,920 I'd like to thank you all for coming and of course DEF CON for inviting me. 3 00:00:09,360 --> 00:00:15,400 I'm a big supporter of community conferences like DEF CON where people can go if they have 4 00:00:15,400 --> 00:00:20,740 a passion for the technology, amateur hobbyists who might really love this stuff but don't 5 00:00:20,740 --> 00:00:23,940 have a company that will pay thousands of dollars for a ticket. 6 00:00:23,940 --> 00:00:30,800 For example, the DEF CON admissions form has a question saying, hey, is your willingness 7 00:00:30,800 --> 00:00:33,980 to speak contingent on whether Black Hat accepts you? 8 00:00:34,260 --> 00:00:35,520 And I was like, hell no. 9 00:00:35,780 --> 00:00:40,620 This talk was prepared for DEF CON and if anything, the contingencies are the other 10 00:00:40,620 --> 00:00:41,160 way around. 11 00:00:41,560 --> 00:00:42,900 So thanks. 12 00:00:49,060 --> 00:00:50,760 Anyway, I'm very glad to be here. 13 00:00:50,940 --> 00:00:53,120 And I first want to warn all of you. 14 00:00:53,120 --> 00:01:01,000 That this talk is not about cross-site scripting attacks on social networks or hijacking Twitter 15 00:01:01,000 --> 00:01:02,580 feeds or anything like that. 16 00:01:03,020 --> 00:01:06,080 It's about port scanning and more port scanning. 17 00:01:06,400 --> 00:01:11,140 And if you don't like port scanning, the next 50 minutes are going to be your worst nightmare. 18 00:01:12,260 --> 00:01:16,900 Because for me to talk about something else would be sort of like Dan Kaminski doing a 19 00:01:16,900 --> 00:01:19,220 talk which doesn't involve DNS in some way. 20 00:01:20,820 --> 00:01:21,720 I mean, sure. 21 00:01:22,180 --> 00:01:22,740 I'm not sure. 22 00:01:22,740 --> 00:01:29,580 I may throw in some OS detection or NMAP scripting engine action, just as Dan may take his DNS 23 00:01:29,580 --> 00:01:33,340 and use it to tunnel YouTube in order to rickroll some poor schmuck. 24 00:01:34,900 --> 00:01:38,760 But in both cases, we're just expanding on our core topics. 25 00:01:39,360 --> 00:01:43,920 And my topic, as you can see from the title slide, is about Internet scanning. 26 00:01:44,260 --> 00:01:48,820 I spent a lot of time this summer scanning tens of millions of posts on the Internet 27 00:01:49,360 --> 00:01:50,120 collecting data. 28 00:01:50,400 --> 00:01:52,720 And when I tell people that, they're often like, what? 29 00:01:52,740 --> 00:01:52,940 Why? 30 00:01:54,600 --> 00:01:58,820 And to me, I think scanning is its own reward. 31 00:01:59,100 --> 00:02:01,740 And you don't really need any particular reason. 32 00:02:02,320 --> 00:02:07,240 But in this case, I did have some concrete goals for the project. 33 00:02:08,360 --> 00:02:13,500 One of them is collecting empirical data that I can use to enhance NMAP and add cool new 34 00:02:13,500 --> 00:02:13,880 features. 35 00:02:14,060 --> 00:02:17,100 And I'm going to talk about some of those features in this presentation. 36 00:02:17,820 --> 00:02:22,720 The second is I want to show how you can use that data for knowledgeable people to make 37 00:02:22,740 --> 00:02:24,080 your scans more effective. 38 00:02:26,100 --> 00:02:30,320 Basically, there are a lot of people who make assumptions on how networks are structured 39 00:02:30,320 --> 00:02:34,820 and populated and use those to decide what sort of scans are going to work best. 40 00:02:35,220 --> 00:02:39,000 But these assumptions are often based on, hey, how would I set it up? 41 00:02:39,140 --> 00:02:42,320 And they're not always reflective of other networks. 42 00:02:42,740 --> 00:02:47,460 So when you can find empirical data that meets what you need, then that often works best. 43 00:02:47,740 --> 00:02:52,720 And if you can't find the data, a goal of this talk is to help show you how you can do scans like this. 44 00:02:52,740 --> 00:02:54,640 And potentially collect it. 45 00:02:55,180 --> 00:02:59,400 I also wanted to detect and resolve NMAP bugs and performance issues. 46 00:02:59,720 --> 00:03:04,760 The idea is that when you scan tens of millions of hosts, you're basically putting NMAP through 47 00:03:05,720 --> 00:03:07,500 a lot of different situations. 48 00:03:07,680 --> 00:03:12,540 Pretty much any networking situation you can imagine and see how NMAP reacts to it. 49 00:03:12,860 --> 00:03:14,680 And, you know, I fixed a crash bug. 50 00:03:14,920 --> 00:03:15,960 I fixed a deadlock bug. 51 00:03:16,380 --> 00:03:19,560 There were a number of cases where I was like, this is going too slow. 52 00:03:19,680 --> 00:03:21,280 There's got to be a way to speed it up. 53 00:03:21,280 --> 00:03:27,540 And so then I looked through and try and figure out why it's slow and improve that. 54 00:03:28,280 --> 00:03:33,620 I also want to demonstrate techniques that can be good for routine scans, 55 00:03:33,860 --> 00:03:37,160 as well as the wide-scale scanning that you may do. 56 00:03:39,460 --> 00:03:43,360 The idea is that if a scan works well for 25 million hosts, 57 00:03:43,580 --> 00:03:48,940 then surely it'll probably work well for you for just 25,000 or whatever you might be doing. 58 00:03:48,940 --> 00:03:53,160 Now let's look at the challenges to launching such a scan. 59 00:03:53,740 --> 00:03:57,000 First of all, I want to mention that instead of doing one humongous scan, 60 00:03:57,300 --> 00:04:01,040 I did a lot of smaller but still large targeted scans, 61 00:04:01,400 --> 00:04:06,420 each of which were designed to, you know, collect a certain piece of data which would be useful. 62 00:04:07,140 --> 00:04:10,900 And the question is, how should you figure out what IPs to scan? 63 00:04:11,160 --> 00:04:12,320 I have a lot of options. 64 00:04:12,640 --> 00:04:17,500 You could take BGP and look at what networks are routable and use those. 65 00:04:17,820 --> 00:04:18,920 DNS zone for that. 66 00:04:18,940 --> 00:04:19,280 Files. 67 00:04:19,460 --> 00:04:22,260 Registry allocations like ARIN and RIPE. 68 00:04:22,460 --> 00:04:27,740 But in the end, I decided to use NMAP's own random IP generation script feature. 69 00:04:28,600 --> 00:04:30,300 Here we take NMAP. 70 00:04:30,360 --> 00:04:34,420 We say generate 25,200,000 IPs. 71 00:04:34,580 --> 00:04:40,980 And in this case, I did the extra 200,000 because of potential duplicates. 72 00:04:41,260 --> 00:04:42,560 We say do a list scan. 73 00:04:42,820 --> 00:04:47,220 So don't actually scan the machines, just list them out for me because I'll scan them later. 74 00:04:48,580 --> 00:04:52,960 Hyphen N, you know, don't do reverse DNS because that would take a long time and we don't need the data. 75 00:04:53,260 --> 00:04:55,720 I use grep and awk to grab the IPs. 76 00:04:55,800 --> 00:04:59,540 I sort them, remove the duplicates, grab the first 25,000,000. 77 00:04:59,620 --> 00:05:04,740 And then I have a 25,000,000 IP list that I can use for the scans. 78 00:05:05,180 --> 00:05:09,620 So that's sort of the type of way I use generated the random numbers. 79 00:05:10,080 --> 00:05:15,440 But once you have what targets you want to scan, the next question is what sort of source you're going to use. 80 00:05:15,440 --> 00:05:19,400 And here I had a lot of ideas, some crazier than others. 81 00:05:19,800 --> 00:05:22,380 The first one was P2P scanning. 82 00:05:22,660 --> 00:05:25,800 I was going to distribute a client, which would be called NMAPster. 83 00:05:26,140 --> 00:05:35,260 And people would download it and it would scan for them and let them know and upload the results for collection. 84 00:05:35,760 --> 00:05:42,160 But I decided that a key goal of this was to make NMAP faster and more efficient for people's normal day-to-day scans. 85 00:05:42,500 --> 00:05:45,420 And so I decided it was better to focus on NMAP. 86 00:05:45,440 --> 00:05:52,840 Just using NMAP itself rather than building custom software for this project that may get around performance issues and the like. 87 00:05:53,580 --> 00:05:55,520 Another big concern was a legal one. 88 00:05:55,840 --> 00:05:59,720 I knew that when you're scanning this many hosts, it's going to raise a few eyebrows. 89 00:06:00,280 --> 00:06:03,340 And I certainly don't want to get kicked off my ISP again. 90 00:06:05,280 --> 00:06:08,180 And, you know, being arrested would be much worse. 91 00:06:08,380 --> 00:06:11,200 So I thought, how can I do this but not collect too much heat? 92 00:06:11,500 --> 00:06:15,420 And so the solution I decided on was to go through my neighbor's open source. 93 00:06:15,440 --> 00:06:16,500 And that was the open wireless access point. 94 00:06:23,040 --> 00:06:25,440 No, I'm just kidding about that. 95 00:06:25,560 --> 00:06:28,180 I decided it would be completely unethical and inappropriate. 96 00:06:28,700 --> 00:06:31,260 And she didn't have enough bandwidth to make it reliable. 97 00:06:32,680 --> 00:06:39,580 So I decided to use an ISP I use for collocation and do the scans from there. 98 00:06:39,700 --> 00:06:41,300 I thought maybe it would go under the radar. 99 00:06:41,560 --> 00:06:42,440 But it didn't. 100 00:06:42,780 --> 00:06:43,820 . . . 101 00:06:43,820 --> 00:06:49,960 Within like 15 minutes of the first scan, they were contacting me frantically saying, what the hell are you up to? 102 00:06:50,440 --> 00:06:55,200 They thought maybe I was infected by one of the most virulent Internet worms they'd ever seen. 103 00:06:55,960 --> 00:06:58,100 They said, your machine is going crazy. 104 00:06:58,140 --> 00:07:01,320 It's probing thousands of machines per second all over the Internet. 105 00:07:01,560 --> 00:07:03,400 They were talking about shutting me down. 106 00:07:03,760 --> 00:07:06,640 And I was like, oh, no, this is no good. 107 00:07:08,020 --> 00:07:09,860 But then I said, hey, you know, don't worry. 108 00:07:09,940 --> 00:07:10,560 I'm not affected. 109 00:07:10,880 --> 00:07:12,100 I'm doing this on purpose. 110 00:07:13,860 --> 00:07:16,900 And that didn't help either, in my case at all. 111 00:07:17,500 --> 00:07:22,100 Basically, they figured I must be some sort of spammer, or worse, if that's even possible. 112 00:07:24,220 --> 00:07:26,840 So then I was like, uh-oh. 113 00:07:26,920 --> 00:07:27,960 I'm totally busted. 114 00:07:28,200 --> 00:07:36,760 I'm going to have to cancel the project, stop the scans, write a whole new talk on the cross-site scripting vulnerabilities, and get that instead. 115 00:07:37,540 --> 00:07:40,540 Fortunately, though, it turned out that they were Nmap users. 116 00:07:40,880 --> 00:07:42,100 So I said, hey. 117 00:07:42,220 --> 00:07:42,820 . . 118 00:07:42,820 --> 00:07:45,140 My plan is to make Nmap more efficient and effective. 119 00:07:45,560 --> 00:07:47,280 And they're like, oh, then, carry on. 120 00:07:49,580 --> 00:07:51,920 So I was real happy about that. 121 00:07:52,100 --> 00:07:55,880 I had to slow it down quite a bit so it didn't melt their switches anymore. 122 00:07:56,780 --> 00:07:58,600 But other than that, they were cool. 123 00:07:59,500 --> 00:08:03,120 Unfortunately, the U.S. Department of Defense was not quite so accommodating. 124 00:08:04,600 --> 00:08:06,520 They didn't like my scans at all. 125 00:08:06,640 --> 00:08:09,840 They said, hey, you're scanning sensitive military installations. 126 00:08:10,140 --> 00:08:10,920 This has got to stop. 127 00:08:10,920 --> 00:08:18,160 And I thought, hey, you know, I'd be happy to use Nmap's exclude file option to skip those networks. 128 00:08:21,120 --> 00:08:25,860 But they wouldn't even give me the networks because that's sensitive military information, too. 129 00:08:26,180 --> 00:08:27,740 So whatever. 130 00:08:31,300 --> 00:08:34,340 The next issue, I mean, it has been making me a little nervous now. 131 00:08:34,400 --> 00:08:35,200 They are the military. 132 00:08:35,200 --> 00:08:36,560 When planes fly overhead. 133 00:08:37,760 --> 00:08:40,100 But nothing too bad so far. 134 00:08:40,920 --> 00:08:42,880 The next issue were firewalls. 135 00:08:42,880 --> 00:08:46,880 For many of these scans, just pure Internet results was all I needed. 136 00:08:47,240 --> 00:08:52,040 But for other ones, it would be nice to get a view behind companies' firewalls. 137 00:08:52,040 --> 00:08:57,140 And because they often have, you know, different ports open, the network looks a lot different behind there. 138 00:08:57,680 --> 00:09:02,320 And I'm happy to say that I was able to get through a number of these firewalls. 139 00:09:02,440 --> 00:09:05,820 Not through some sort of advanced fragmentation attack. 140 00:09:06,120 --> 00:09:09,620 But I used a technique known as asking them for the data. 141 00:09:10,100 --> 00:09:10,620 . 142 00:09:10,620 --> 00:09:12,120 Which works pretty well. 143 00:09:12,480 --> 00:09:13,800 At least with some of them. 144 00:09:13,980 --> 00:09:18,460 But there are a lot of big companies who scan their networks every day with Nmap. 145 00:09:18,660 --> 00:09:22,160 And we're happy to contribute some data to make it work better. 146 00:09:23,640 --> 00:09:25,780 Another challenge is performance and accuracy. 147 00:09:26,420 --> 00:09:30,320 And this was different than many other types of the challenges. 148 00:09:30,440 --> 00:09:33,580 Because I wasn't trying to find a quick hack workaround type of thing. 149 00:09:33,960 --> 00:09:37,240 Instead, this was a key goal was to improve Nmap's performance. 150 00:09:37,720 --> 00:09:40,360 And so I took this as a challenge. 151 00:09:40,620 --> 00:09:41,760 To see where I could improve. 152 00:09:42,180 --> 00:09:44,960 But even so, it could be disheartening at times. 153 00:09:45,300 --> 00:09:49,520 Like I did a UDP scan with 65,000 ports. 154 00:09:49,860 --> 00:09:53,380 And I told it to scan 2,048 hosts in a group. 155 00:09:53,620 --> 00:09:56,060 And you can see here it's taken four days. 156 00:09:56,280 --> 00:09:57,940 It's on the first 2,048. 157 00:09:58,200 --> 00:10:00,920 And I have negative 688 hours remaining. 158 00:10:02,320 --> 00:10:09,180 When your time estimate leads to integer overflow and goes negative, that's never an encouraging sign. 159 00:10:10,620 --> 00:10:13,500 This particular scan is still running right now. 160 00:10:13,700 --> 00:10:15,700 And maybe for a while. 161 00:10:15,900 --> 00:10:17,220 DEF CON 2009. 162 00:10:17,280 --> 00:10:19,220 I'll let you know how that one's going. 163 00:10:19,700 --> 00:10:23,780 But fortunately, some of our other scans finished a lot earlier. 164 00:10:24,940 --> 00:10:29,600 So that's sort of the introduction to the different scans we were doing and why. 165 00:10:29,940 --> 00:10:34,600 So now let's get to some more practical advice that can be concrete details. 166 00:10:34,680 --> 00:10:37,580 And let you know how you can use this to help your scans. 167 00:10:37,860 --> 00:10:40,500 And a good first place to start is host discovery. 168 00:10:40,620 --> 00:10:45,940 Because the first thing you want to do in network reconnaissance generally is host discovery. 169 00:10:46,200 --> 00:10:51,440 Where you scan the network and try and figure out which hosts are actually available on the network. 170 00:10:52,200 --> 00:10:57,900 So that you don't waste a huge amount of time scanning IPs that have no host listening on them at all. 171 00:10:58,560 --> 00:11:01,760 But a challenge there is deciding what methods to use for discovery. 172 00:11:02,100 --> 00:11:08,520 There was a time when pretty much all the hosts would respond to an ICMP echo request or ping packet. 173 00:11:08,520 --> 00:11:12,280 Unfortunately, that time was a decade ago. 174 00:11:12,940 --> 00:11:17,400 So now a lot more companies block those ping packets. 175 00:11:17,680 --> 00:11:19,380 And you need something more effective. 176 00:11:20,160 --> 00:11:24,620 Now Nmap by default will also send an ACK packet to port 80. 177 00:11:24,800 --> 00:11:26,560 Which helps in eliciting responses. 178 00:11:27,140 --> 00:11:34,280 But even with that, I don't think it's comprehensive enough if you're scanning the internet or even some sorts of internal scans. 179 00:11:38,720 --> 00:11:41,800 So let's look at some of the different methods that you can use. 180 00:11:43,120 --> 00:11:45,460 TCP, we have two types of probes. 181 00:11:45,460 --> 00:11:47,680 We have the SYN probe and we have the ACK probe. 182 00:11:47,960 --> 00:11:51,120 And they're both useful against different types of firewalls. 183 00:11:51,260 --> 00:11:56,940 The SYN probe is likely to get through stateful firewalls when they're configured to allow incoming connections. 184 00:11:57,360 --> 00:12:01,600 Because they'll say, hey, this is a SYN packet, it's initiating the connection, let it through. 185 00:12:01,920 --> 00:12:08,460 But those same firewalls, if you send an ACK packet, they say, hey, this doesn't correspond to any existing connections. 186 00:12:08,520 --> 00:12:10,960 It's not acknowledging any legitimate data. 187 00:12:11,160 --> 00:12:13,240 So they'll just drop it and it'll be ineffective. 188 00:12:14,100 --> 00:12:17,460 However, against stateless firewalls, you have the opposite problem. 189 00:12:18,020 --> 00:12:21,140 They may try to block incoming packets to certain ports. 190 00:12:21,460 --> 00:12:27,320 And they look at the SYN flag to detect that it's an incoming packet and they'll drop it. 191 00:12:27,640 --> 00:12:32,700 However, you send the ACK packet against those ones and they have no way to know. 192 00:12:32,840 --> 00:12:36,240 They have no state to say whether there's an established connection there or not. 193 00:12:36,400 --> 00:12:37,760 So they have to let it through. 194 00:12:38,540 --> 00:12:41,100 So I have a quick example we can do. 195 00:12:44,260 --> 00:12:47,880 Basically, let's say we're going to do nmap, do a ping scan. 196 00:12:48,540 --> 00:12:51,160 We're going to do a SYN probe to port 80. 197 00:12:51,460 --> 00:12:52,680 No reverse DNS. 198 00:12:53,040 --> 00:12:55,420 And this time we'll just use syn.com. 199 00:12:56,080 --> 00:12:59,160 And it responds pretty quickly and says the host is up. 200 00:12:59,280 --> 00:13:01,360 So we got a SYN ACK or a reset back. 201 00:13:02,360 --> 00:13:06,920 Now we'll do the same one with an ACK probe against the same host. 202 00:13:06,920 --> 00:13:08,820 And it takes a bit longer. 203 00:13:09,280 --> 00:13:12,580 And eventually it times out and says no response was received. 204 00:13:12,900 --> 00:13:19,440 And so you want to think to yourself, hey, is their firewall a stateful firewall or is it a stateless firewall? 205 00:13:20,280 --> 00:13:26,120 And if you think about it for a minute, you'll hopefully come to the conclusion that it's a stateful firewall. 206 00:13:26,560 --> 00:13:33,000 Because it allowed the SYN packet in, but the ACK packet, it was able to detect, hey, that's bogus. 207 00:13:33,100 --> 00:13:34,520 I'm going to block that sucker. 208 00:13:38,340 --> 00:13:44,020 So now let's say we've seen the SYN probes and the ACK probes. 209 00:13:44,020 --> 00:13:46,020 And the question is which one do you want to use? 210 00:13:46,200 --> 00:13:52,540 Because the SYN probes work against some hosts with the stateful firewalls, but the ACK work against others. 211 00:13:52,800 --> 00:13:56,060 And the answer is that, hey, this is not an either-or situation. 212 00:13:56,500 --> 00:14:03,460 You should use both probes against various ports to have a maximum chance that at least one of them will get through 213 00:14:03,460 --> 00:14:06,600 and generate a response that proves that the host is online. 214 00:14:07,240 --> 00:14:09,780 So then the next question is what ports should I use? 215 00:14:09,960 --> 00:14:15,580 You have 65,000 options there, and you often don't know which ones are going to work best. 216 00:14:16,560 --> 00:14:21,820 So here I did some of that empirical data stuff, and I scanned hundreds of thousands of machines, 217 00:14:22,000 --> 00:14:28,840 and I detected the ones that had a heavy firewall, the ones that blocked the vast majority of the ports. 218 00:14:29,080 --> 00:14:33,900 Because the ones without a firewall, those don't matter because you're going to be able to detect those anyway 219 00:14:33,900 --> 00:14:35,460 with a decent discovery. 220 00:14:35,460 --> 00:14:39,860 It's the ones that block all but a few ports that are hard to find. 221 00:14:40,260 --> 00:14:44,200 And so out of those, I looked at the most commonly responsive ports. 222 00:14:44,460 --> 00:14:45,640 They don't have to be open. 223 00:14:45,800 --> 00:14:49,500 They can be closed and send a reset, and that works just as well. 224 00:14:50,040 --> 00:14:55,600 And you see here many of the normal suspects, ACP, SMTP, SSH. 225 00:14:56,480 --> 00:15:01,680 Some people look at this list and say, hey, where are the Windows ports, 135, 139? 226 00:15:01,700 --> 00:15:02,680 Those are really common. 227 00:15:02,960 --> 00:15:05,440 But remember that I was only doing this based on Windows. 228 00:15:05,460 --> 00:15:06,620 I was doing this based on heavily firewalled hosts. 229 00:15:06,960 --> 00:15:12,560 And if you go through the trouble of setting up a firewall, you better darn well block the Windows ports. 230 00:15:14,420 --> 00:15:21,600 So what I would advise is use some of these with SYN probes and then some of the other ones with ACKs. 231 00:15:22,980 --> 00:15:26,680 Next we have UDP host discovery, and that one's simpler. 232 00:15:26,900 --> 00:15:33,500 Your strategy there is you want to find closed ports because an open UDP port normally won't even respond to the probe. 233 00:15:33,500 --> 00:15:38,220 It'll just be like, well, I just got a blank packet, don't know what to do with it, just ignore it. 234 00:15:38,640 --> 00:15:44,720 Whereas closed ports will generally send a port-unreachable packet, which discloses that the host is live. 235 00:15:45,000 --> 00:15:50,300 So I pick a high-numbered closed port usually, and then sometimes I'll do 53 as well 236 00:15:50,300 --> 00:15:58,140 because DNS is so popular with UDP that sometimes people allow it into their whole parts of their network. 237 00:15:58,400 --> 00:16:00,220 And so that can be effective as well. 238 00:16:01,220 --> 00:16:03,280 There's also ICMP host discovery. 239 00:16:03,500 --> 00:16:04,900 This is one of the many methods offered by Nmap. 240 00:16:05,200 --> 00:16:12,360 And here the thing is some administrators, like say Google.com, will say we're going to explicitly allow echo requests 241 00:16:12,360 --> 00:16:19,200 because we don't consider ping packets a threat, but only hackers use netmask requests and timestamp requests, 242 00:16:19,480 --> 00:16:20,720 so we're going to block those. 243 00:16:21,500 --> 00:16:25,200 However, you also have administrators who kind of do the opposite. 244 00:16:25,400 --> 00:16:30,900 They say, oh, I don't want those evil hackers to be able to ping me, so they'll block the ping requests, 245 00:16:31,160 --> 00:16:33,480 but then they'll forget that you can do the same thing. 246 00:16:33,500 --> 00:16:40,340 So my suggestion is usually do an echo request plus one of these other two. 247 00:16:40,460 --> 00:16:42,120 It normally works pretty well. 248 00:16:42,980 --> 00:16:46,480 We also have a new feature relatively called protocol ping, 249 00:16:46,660 --> 00:16:50,140 which basically sends IP packets with various protocol headers 250 00:16:50,140 --> 00:16:56,600 and tries to expect a protocol-unreachable message if the host is live. 251 00:16:56,820 --> 00:16:58,100 And that can be useful. 252 00:16:58,320 --> 00:17:03,480 I haven't actually done the test to see which protocols are most commonly useful for this particular case. 253 00:17:03,500 --> 00:17:09,740 It's a regular type of probe, but by default we do ICMP, IGMP, and IP tunneled in IP. 254 00:17:10,980 --> 00:17:16,680 So now I've talked about a lot of different discovery techniques and which ones you might want to use, 255 00:17:16,860 --> 00:17:20,160 but your question might be, really, how valuable is this? 256 00:17:20,360 --> 00:17:25,720 It's going to take longer to scan if you add a bunch of discovery techniques, 257 00:17:25,960 --> 00:17:29,960 and so you have a legitimate question in how much of a difference will it really make. 258 00:17:30,200 --> 00:17:32,700 And again, instead of just guessing or making assumptions, 259 00:17:32,700 --> 00:17:34,400 a good thing to do is test. 260 00:17:34,860 --> 00:17:37,880 In this example, I generate 50,000 IPs, 261 00:17:38,320 --> 00:17:41,660 and then you can see I use the default ping scan, 262 00:17:42,300 --> 00:17:49,120 and it chugs along, and it finds 3,348 hosts up in about 1,600 seconds, 263 00:17:49,320 --> 00:17:51,220 which is about 27 minutes. 264 00:17:51,880 --> 00:17:55,240 And so that's a lot of machines, and it looks pretty successful. 265 00:17:55,700 --> 00:17:59,420 But then I take that exact same list of 50,000 hosts, 266 00:17:59,580 --> 00:18:02,060 and I add a bunch more discovery techniques. 267 00:18:02,060 --> 00:18:04,720 We do the echo request, the timestamp, 268 00:18:04,840 --> 00:18:06,720 syn probes to a bunch of ports, 269 00:18:06,900 --> 00:18:08,460 act probes to a bunch of ports. 270 00:18:08,620 --> 00:18:12,420 We set the source port to 53 in order to masquerade as DNS, 271 00:18:13,480 --> 00:18:14,960 and it goes through. 272 00:18:15,140 --> 00:18:18,720 And this time it finds 4,473 hosts up, 273 00:18:18,800 --> 00:18:20,600 but it does take a bit longer. 274 00:18:21,080 --> 00:18:24,280 So you have to ask yourself, you know, look at the data. 275 00:18:24,400 --> 00:18:27,640 Here it took almost three times as long, 276 00:18:27,800 --> 00:18:30,380 but we found 34% more hosts. 277 00:18:30,380 --> 00:18:33,740 And I think in most cases, if you want a comprehensive scan, 278 00:18:34,040 --> 00:18:36,360 you're going to find that to be worthwhile. 279 00:18:38,040 --> 00:18:42,320 So now I just have a plea, basically, about upgrading your NMAP. 280 00:18:43,000 --> 00:18:45,480 And part of it is I'm sick of bug reports, 281 00:18:45,760 --> 00:18:48,540 where it's like, yes, we fixed that in 2003. 282 00:18:50,420 --> 00:18:53,920 There are a lot of people who just don't seem to upgrade all that often, 283 00:18:54,020 --> 00:18:55,260 and then they complain. 284 00:18:55,540 --> 00:18:58,980 Or they'll say, hey, the problem with NMAP is it's obsolete. 285 00:18:58,980 --> 00:19:02,380 It tells you what port numbers are open, 286 00:19:02,500 --> 00:19:04,660 but you don't know what services are behind them. 287 00:19:05,080 --> 00:19:08,120 And nowadays, they'll tunnel everything over HTTP 288 00:19:08,120 --> 00:19:10,580 in order to get through firewalls or whatnot. 289 00:19:11,000 --> 00:19:14,840 And it's like, hey, we added version detection in 2003. 290 00:19:15,140 --> 00:19:16,340 You know, just upgrade. 291 00:19:17,160 --> 00:19:20,000 In addition, I made a number of improvements 292 00:19:20,000 --> 00:19:23,380 to the performance of the system recently, 293 00:19:23,620 --> 00:19:26,140 which you'll find valuable if you upgrade. 294 00:19:26,360 --> 00:19:28,960 And then the question is, what version should you upgrade? 295 00:19:28,960 --> 00:19:33,320 Version 4.68 is the latest release on our download page. 296 00:19:33,660 --> 00:19:35,020 If you want to get even newer, 297 00:19:35,180 --> 00:19:38,200 we have our subversion source code repository releases. 298 00:19:38,640 --> 00:19:40,900 And you can find information at this URL 299 00:19:40,900 --> 00:19:43,040 or just go to the web page and you can track it down. 300 00:19:43,580 --> 00:19:45,360 But for all the goods in this presentation, 301 00:19:45,880 --> 00:19:50,060 you'll want to use the BHDC08 Black Hat DEF CON release, 302 00:19:50,380 --> 00:19:51,840 which you can find at this location. 303 00:19:52,300 --> 00:19:54,460 And that contains the top ports feature 304 00:19:54,460 --> 00:19:57,340 and some of the other ones that I'm going to be talking about. 305 00:20:06,340 --> 00:20:08,040 So speaking of top ports, 306 00:20:08,280 --> 00:20:10,880 this was another one of my big scans. 307 00:20:11,240 --> 00:20:12,920 And here I wanted to determine 308 00:20:12,920 --> 00:20:16,000 the most commonly open TCP and UDP ports. 309 00:20:16,280 --> 00:20:18,880 And again, I got some data also contributed 310 00:20:18,880 --> 00:20:23,400 from organizations to look at representation of internal networks. 311 00:20:23,860 --> 00:20:25,620 And then I took that data 312 00:20:25,620 --> 00:20:28,640 and I augmented the NMAP services file. 313 00:20:28,960 --> 00:20:31,000 Which lists all the services known by NMAP. 314 00:20:31,180 --> 00:20:34,320 And that enabled me to add a number of cool features. 315 00:20:35,460 --> 00:20:37,800 First, let's talk about the default scan ports. 316 00:20:38,340 --> 00:20:43,140 In NMAP 4.68, NMAP would scan all the ports up to 1024, 317 00:20:43,920 --> 00:20:46,340 plus it would scan all the ones it has a name for. 318 00:20:46,920 --> 00:20:51,480 But the issue is that the IANA gave names to a bunch of ports 319 00:20:51,480 --> 00:20:53,280 many, many, many years ago, 320 00:20:53,400 --> 00:20:56,780 many of which aren't even used really anymore. 321 00:20:57,200 --> 00:20:58,440 And at the same time, 322 00:20:58,440 --> 00:21:00,560 there are some ports that you see open more often 323 00:21:00,560 --> 00:21:02,540 that turned out to not have names. 324 00:21:03,000 --> 00:21:04,420 So with the new NMAP, 325 00:21:04,560 --> 00:21:06,360 since it now has this frequency data, 326 00:21:06,680 --> 00:21:10,340 it's able to just scan the top 1000 ports for each protocol. 327 00:21:10,720 --> 00:21:13,560 So you get better results in many cases 328 00:21:13,560 --> 00:21:16,540 since it has all these ports that the old one didn't have 329 00:21:16,540 --> 00:21:19,400 and it doesn't waste time scanning these ports 330 00:21:19,400 --> 00:21:21,840 that don't actually respond generally. 331 00:21:22,320 --> 00:21:24,220 And at the same time, it's a lot faster 332 00:21:24,220 --> 00:21:27,080 because it's only scanning a little more than half the ports. 333 00:21:27,080 --> 00:21:29,120 So you'll find, you know, 334 00:21:29,120 --> 00:21:31,500 a little increase in your scan times from that. 335 00:21:32,380 --> 00:21:35,260 But what really makes a difference is the fast scan. 336 00:21:35,660 --> 00:21:38,740 That's the traditional hyphen capital F option of NMAP, 337 00:21:38,820 --> 00:21:40,100 which used to just say, 338 00:21:40,220 --> 00:21:41,740 scan all the ports with a name. 339 00:21:42,080 --> 00:21:44,380 But the major problem with that is, 340 00:21:44,480 --> 00:21:47,310 hey, by default we had 1700 TCP ports. 341 00:21:47,780 --> 00:21:49,320 With fast scan, we had 1200. 342 00:21:49,780 --> 00:21:51,160 You know, that's not really fast. 343 00:21:51,400 --> 00:21:52,900 That's kind of a small difference, 344 00:21:53,100 --> 00:21:54,120 but nothing dramatic. 345 00:21:54,800 --> 00:21:56,400 But that's all NMAP could do, 346 00:21:56,400 --> 00:21:58,960 because it didn't really know what ports were common. 347 00:21:59,100 --> 00:22:01,280 It only knew which ones it had a name for. 348 00:22:01,600 --> 00:22:03,220 With the new services file, 349 00:22:03,420 --> 00:22:07,440 NMAP just scans the top 100 ports for each protocol. 350 00:22:07,760 --> 00:22:11,620 And so you get usually an order of magnitude increase in speed, 351 00:22:11,820 --> 00:22:13,660 which is helpful for TCP, 352 00:22:14,020 --> 00:22:17,060 but it's even more helpful in many cases for UDP. 353 00:22:17,460 --> 00:22:19,080 Because I've seen a lot of people 354 00:22:19,080 --> 00:22:21,660 who basically don't even do their UDP scanning 355 00:22:21,660 --> 00:22:23,740 because they say, oh, it takes too long 356 00:22:23,740 --> 00:22:25,340 and it's hard to disambiguate 357 00:22:25,340 --> 00:22:27,180 the filtered versus the open ports. 358 00:22:27,440 --> 00:22:29,460 And so they just pretend it doesn't exist. 359 00:22:29,940 --> 00:22:32,580 But the attackers aren't going to pretend it doesn't exist. 360 00:22:32,860 --> 00:22:35,440 And so it's really important to figure out 361 00:22:35,440 --> 00:22:36,720 what's going on with this protocol. 362 00:22:37,460 --> 00:22:39,100 And now let's look at an example 363 00:22:39,100 --> 00:22:40,760 of the difference that this makes. 364 00:22:41,180 --> 00:22:42,600 Here I'm doing a scan. 365 00:22:42,820 --> 00:22:46,020 I say SU for UDP scan, 366 00:22:46,320 --> 00:22:47,700 V to do the version detection. 367 00:22:48,100 --> 00:22:50,460 And that's important for UDP scans 368 00:22:50,460 --> 00:22:53,440 because of that open versus filtered problem. 369 00:22:53,440 --> 00:22:55,880 Normally when NMAP gets no response, 370 00:22:56,200 --> 00:22:58,240 it doesn't know if the port's filtered or open. 371 00:22:58,460 --> 00:23:00,700 And in the case of scanme.nmap.org, 372 00:23:00,880 --> 00:23:02,740 that's the case with all of the ports. 373 00:23:02,920 --> 00:23:04,480 So it's like, great, I got a report 374 00:23:04,480 --> 00:23:06,620 that said all the ports are either open or filtered. 375 00:23:07,220 --> 00:23:08,060 That's no good. 376 00:23:08,280 --> 00:23:09,840 And so with version detection, 377 00:23:10,180 --> 00:23:13,320 NMAP has a database of probes it can send to each port 378 00:23:13,320 --> 00:23:16,100 and hopefully get a response, 379 00:23:16,360 --> 00:23:18,620 which proves without a doubt that the port is open. 380 00:23:19,160 --> 00:23:20,720 I say do a fast scan, 381 00:23:20,960 --> 00:23:23,340 use aggressive timing against this machine 382 00:23:23,440 --> 00:23:25,020 that I maintain for people to scan. 383 00:23:25,740 --> 00:23:29,200 And with 4.68, that took an hour and two minutes. 384 00:23:29,540 --> 00:23:31,100 It did find the right data, 385 00:23:31,220 --> 00:23:32,800 but that's still a long time to wait. 386 00:23:33,160 --> 00:23:35,660 With the Black Hat DEF CON release, 387 00:23:35,980 --> 00:23:38,840 that same command took six minutes and 29 seconds 388 00:23:39,300 --> 00:23:42,240 because it was only scanning the most important ports 389 00:23:42,240 --> 00:23:43,600 and it knew what those were, 390 00:23:43,760 --> 00:23:46,380 and it did find the open port. 391 00:23:47,200 --> 00:23:48,880 Then I optimized a bit more. 392 00:23:49,100 --> 00:23:52,300 I said also add the version intensity zero flag, 393 00:23:52,300 --> 00:23:56,180 which says only send these UDP probes 394 00:23:56,180 --> 00:23:59,300 for protocols that you know commonly listen on a certain port. 395 00:23:59,540 --> 00:24:01,700 So for 53, it'll only try DNS. 396 00:24:01,980 --> 00:24:03,940 For 161, only SNMP. 397 00:24:04,540 --> 00:24:08,160 And with that, that reduced the time to 13 seconds. 398 00:24:08,560 --> 00:24:11,060 So the moral of the story is, hey, 399 00:24:11,120 --> 00:24:12,220 if you know what you're doing, 400 00:24:12,360 --> 00:24:13,880 know what data you really need, 401 00:24:14,100 --> 00:24:17,160 you can optimize your scan a bit and make it a lot faster. 402 00:24:17,340 --> 00:24:19,580 In this case, we got exactly the same data, 403 00:24:19,680 --> 00:24:21,120 but instead of waiting an hour, 404 00:24:21,120 --> 00:24:24,020 we waited 13 seconds, which helps a lot. 405 00:24:25,380 --> 00:24:28,040 Two features which are kind of derivative of those 406 00:24:28,040 --> 00:24:30,700 is the top ports feature, which says, 407 00:24:30,820 --> 00:24:32,220 hey, you don't want to just have to choose 408 00:24:32,220 --> 00:24:34,000 between the default of 1,000 ports 409 00:24:34,000 --> 00:24:35,500 or a fast scan of 100. 410 00:24:35,780 --> 00:24:39,140 You can specify arbitrarily how many ports you want to scan. 411 00:24:39,720 --> 00:24:41,280 And that leads you to the question 412 00:24:41,280 --> 00:24:45,120 of what will work best to the top ports option. 413 00:24:45,780 --> 00:24:47,920 And so I used empirical data again 414 00:24:47,920 --> 00:24:50,100 to say out of all these big scans, 415 00:24:50,100 --> 00:24:52,600 how many of the open ports would I have found 416 00:24:52,600 --> 00:24:55,100 with different top ports values? 417 00:24:55,560 --> 00:24:57,560 So if you just scan the top 10 ports, 418 00:24:57,800 --> 00:25:00,240 which just goes really, really lightning fast, 419 00:25:00,600 --> 00:25:02,940 you get almost half the TCP ports. 420 00:25:03,320 --> 00:25:06,040 With 100, which is the fast scan, 421 00:25:06,300 --> 00:25:07,940 you get 73% of them. 422 00:25:08,260 --> 00:25:10,340 Whereas with 1,000, which is the default, 423 00:25:10,520 --> 00:25:11,720 you get 93%. 424 00:25:11,720 --> 00:25:14,960 So that's pretty good to get 93% of the ports, 425 00:25:15,140 --> 00:25:17,400 but you're only scanning less than 2% 426 00:25:17,400 --> 00:25:19,860 of the total 65,000 ports. 427 00:25:19,860 --> 00:25:23,560 So what I think a lot of pen testers will do is say, 428 00:25:23,640 --> 00:25:24,700 hey, I'm starting this engagement, 429 00:25:24,960 --> 00:25:26,820 but I need some data to start with. 430 00:25:27,000 --> 00:25:28,500 So they'll start a fast scan 431 00:25:28,500 --> 00:25:30,960 to scan the top 100 ports really quickly 432 00:25:30,960 --> 00:25:33,340 and get that data and start working on it. 433 00:25:33,500 --> 00:25:35,240 And while they're working on the initial data, 434 00:25:35,440 --> 00:25:37,180 they'll have their super comprehensive, 435 00:25:37,460 --> 00:25:39,620 all ports, no ping scan going. 436 00:25:40,020 --> 00:25:42,860 And then at the end of the scan of the big one, 437 00:25:43,020 --> 00:25:44,540 they can just diff the results 438 00:25:44,540 --> 00:25:46,520 and see if there were any new ports 439 00:25:46,520 --> 00:25:48,920 that the initial quick scan missed. 440 00:25:49,500 --> 00:25:51,100 Just in case you're interested, 441 00:25:51,660 --> 00:25:55,000 these are the top 10 open TCP ports I found. 442 00:25:55,280 --> 00:25:57,480 This differs from the previous chart 443 00:25:57,480 --> 00:25:59,440 because that was just responsive ports 444 00:25:59,440 --> 00:26:00,820 that could be open or closed. 445 00:26:01,500 --> 00:26:02,980 80 is the top, no surprise. 446 00:26:03,340 --> 00:26:05,400 As a security guy, it's kind of depressing 447 00:26:05,400 --> 00:26:08,020 to see Telnet open more often than SSH. 448 00:26:08,680 --> 00:26:11,080 A lot of that's switches and routers 449 00:26:11,080 --> 00:26:12,040 and various devices. 450 00:26:12,740 --> 00:26:15,720 And here, of course, you do get the Microsoft ports 451 00:26:15,720 --> 00:26:17,200 because we're looking at open. 452 00:26:19,740 --> 00:26:21,840 Similarly, I have the data for UDP. 453 00:26:22,440 --> 00:26:25,620 Microsoft kind of dominates this chart, 454 00:26:25,820 --> 00:26:27,900 although you see some of the other normal suspects 455 00:26:27,900 --> 00:26:29,520 like SNMP and NTP. 456 00:26:30,320 --> 00:26:32,400 And here's the UDP effectiveness 457 00:26:32,920 --> 00:26:35,200 of the different top ports values. 458 00:26:35,540 --> 00:26:38,460 With UDP, you get even a greater percentage open 459 00:26:38,460 --> 00:26:40,060 with a smaller value. 460 00:26:40,650 --> 00:26:48,180 So here you get 90% with the top 100 ports 461 00:26:48,180 --> 00:26:51,320 whereas before we only got 73 with TCP. 462 00:26:53,140 --> 00:26:55,700 Here's another feature that we've added recently 463 00:26:55,700 --> 00:26:58,680 that I have to admit I have mixed feelings about. 464 00:26:59,500 --> 00:27:01,920 You know, I'm kind of proud of NMAP's congestion control 465 00:27:02,560 --> 00:27:05,200 and other technologies to try and figure out 466 00:27:05,200 --> 00:27:06,880 what scan speed will work best. 467 00:27:07,260 --> 00:27:09,280 But there are a lot of people who say, 468 00:27:09,500 --> 00:27:12,520 hey, I just want to specify a certain rate 469 00:27:12,520 --> 00:27:14,060 and have you scan at that speed 470 00:27:14,060 --> 00:27:16,520 and don't worry about if there are any packet drops 471 00:27:16,520 --> 00:27:18,160 or latency issues or whatever. 472 00:27:18,180 --> 00:27:20,000 Just go at the speed I say 473 00:27:20,000 --> 00:27:22,120 so that I know exactly when it'll finish. 474 00:27:22,460 --> 00:27:24,760 And it was basically for that one reason 475 00:27:24,760 --> 00:27:28,200 that a lot of people used ScanRand and UnicornScan 476 00:27:28,200 --> 00:27:30,420 and that type of scanner. 477 00:27:30,780 --> 00:27:32,920 So finally I broke down and was like, 478 00:27:33,060 --> 00:27:35,460 hey, it's an easy feature to add 479 00:27:35,460 --> 00:27:38,740 and even I found it to be pretty useful at times. 480 00:27:38,900 --> 00:27:41,640 And in fact, I used it during most of my internet scanning. 481 00:27:42,220 --> 00:27:44,240 And then a feature that's even more new 482 00:27:45,200 --> 00:27:47,860 came about when the ISP call came. 483 00:27:48,180 --> 00:27:49,400 Saying I was melting their switches. 484 00:27:49,980 --> 00:27:51,440 And so that's a maximum rate. 485 00:27:51,620 --> 00:27:55,620 To say NMAP, don't scan more than 300 packets per second 486 00:27:56,020 --> 00:27:57,220 or whatever you specify. 487 00:27:57,780 --> 00:28:00,720 And so that made the ISP guys a bit happy. 488 00:28:01,920 --> 00:28:04,180 So here's an example of putting it all together. 489 00:28:04,620 --> 00:28:07,620 Looking at kind of a typical type of the scans 490 00:28:07,620 --> 00:28:09,600 that I was doing and what options I was using. 491 00:28:09,760 --> 00:28:12,880 I would say NMAP, I would give it the source IP address 492 00:28:12,880 --> 00:28:15,320 that I wanted to use for that particular scan. 493 00:28:15,320 --> 00:28:17,980 I would specify debugging mode. 494 00:28:18,220 --> 00:28:19,880 Although really I found I used 495 00:28:19,880 --> 00:28:22,160 the runtime interaction feature more often. 496 00:28:22,360 --> 00:28:24,400 When NMAP is running, some people don't know, 497 00:28:24,580 --> 00:28:27,740 you can press D and the debugging level will increase 498 00:28:27,740 --> 00:28:30,460 and press it a few times and you'll really be scrolling the screen 499 00:28:30,460 --> 00:28:33,600 but you'll see exactly what NMAP's doing right at that time. 500 00:28:33,880 --> 00:28:36,460 Then you can press capital D to turn it down. 501 00:28:36,600 --> 00:28:38,140 Say, hey, I'm done looking at this. 502 00:28:38,320 --> 00:28:40,220 I don't want to fill up my log files. 503 00:28:40,740 --> 00:28:41,920 Turn it off for now. 504 00:28:42,480 --> 00:28:44,880 I specified a low max scan delay 505 00:28:44,880 --> 00:28:46,800 because I didn't want to wait a long time 506 00:28:46,800 --> 00:28:48,520 for hosts that were rate limiting. 507 00:28:49,460 --> 00:28:52,960 I did the log file feature with the new feature 508 00:28:52,960 --> 00:28:56,260 that says use STRF time values 509 00:28:56,260 --> 00:28:59,060 so that it automatically puts the time and date in there. 510 00:28:59,520 --> 00:29:02,140 I give it the name of the file I want to read from. 511 00:29:02,340 --> 00:29:06,360 I say don't do more than one retry for this case 512 00:29:06,360 --> 00:29:09,300 since I really want to do a big scan and make it go fast. 513 00:29:10,180 --> 00:29:11,740 Randomize the host in the scan group. 514 00:29:12,060 --> 00:29:13,160 Do all the ports. 515 00:29:13,160 --> 00:29:15,320 Here's the host discovery options. 516 00:29:15,680 --> 00:29:18,660 I specified a reasonably big max host group 517 00:29:18,660 --> 00:29:21,080 because that's more efficient for large scans. 518 00:29:21,440 --> 00:29:25,720 Here I'm saying scan at least 175 packets per second 519 00:29:25,720 --> 00:29:27,880 but don't scan at more than 300. 520 00:29:28,320 --> 00:29:30,720 So that's sort of an example of a command 521 00:29:30,720 --> 00:29:33,780 that I sort of changed and changed and improved over time 522 00:29:33,780 --> 00:29:36,500 until I found one that worked pretty well. 523 00:29:37,680 --> 00:29:40,480 So now with the time I have left, 524 00:29:40,540 --> 00:29:43,140 I saved some to talk about some NMAPs 525 00:29:43,140 --> 00:29:46,060 because some of these are features that are new and cool 526 00:29:46,060 --> 00:29:48,680 that may not reflect exactly, 527 00:29:48,740 --> 00:29:51,080 relate to the large scale scanning, 528 00:29:51,280 --> 00:29:54,000 but they're actually too cool to leave out. 529 00:29:54,260 --> 00:29:56,320 So there are a few new features in NMAP 530 00:29:56,320 --> 00:29:57,640 that I really wanted to talk about. 531 00:29:58,060 --> 00:29:59,840 One is the NMAP scripting engine 532 00:29:59,840 --> 00:30:02,820 which is a thing that modularizes NMAP 533 00:30:02,820 --> 00:30:05,580 and lets you say, hey, I want to write a little script 534 00:30:05,580 --> 00:30:07,780 that interrogates ports in a certain way. 535 00:30:08,040 --> 00:30:10,800 In this case, we do the HTML title 536 00:30:10,800 --> 00:30:12,480 for the websites it finds. 537 00:30:13,140 --> 00:30:16,800 And there are now more than 50 scripts shipped with NMAP. 538 00:30:17,140 --> 00:30:19,240 Everything from like whoisdata 539 00:30:19,240 --> 00:30:22,700 to brute forcing, pop3, passwords. 540 00:30:23,500 --> 00:30:25,040 You know, there are all sorts of crazy things 541 00:30:25,040 --> 00:30:26,220 you can do with it. 542 00:30:26,560 --> 00:30:28,560 I do have a quick demo 543 00:30:30,020 --> 00:30:31,680 of the NMAP scripting engine. 544 00:30:32,600 --> 00:30:35,840 Let me see if I can find it. 545 00:30:37,160 --> 00:30:39,220 It's a long command, so I kind of cheated 546 00:30:39,220 --> 00:30:41,540 and put the actual command here. 547 00:30:41,540 --> 00:30:46,220 But we're saying NMAP hyphen V in verbose mode. 548 00:30:46,400 --> 00:30:46,980 Don't ping. 549 00:30:47,400 --> 00:30:50,520 Do a UDP probe for port 53. 550 00:30:50,880 --> 00:30:51,860 Aggressive timing. 551 00:30:52,100 --> 00:30:53,800 And we're going to do three scripts, 552 00:30:54,060 --> 00:30:56,180 which I thought were kind of timely 553 00:30:56,180 --> 00:30:59,720 because they relate to Dan's DNS bug 554 00:30:59,720 --> 00:31:02,200 that he'll be talking about on Sunday. 555 00:31:02,760 --> 00:31:04,520 And so one of them just checks 556 00:31:04,520 --> 00:31:07,040 if a DNS server allows recursion. 557 00:31:07,180 --> 00:31:10,560 The second one checks if it randomizes 558 00:31:10,560 --> 00:31:11,920 its source port numbers. 559 00:31:12,180 --> 00:31:13,560 And the third one checks 560 00:31:13,560 --> 00:31:17,360 if it has a transaction ID that's randomized. 561 00:31:17,640 --> 00:31:20,960 So those are the bugs that people want to fix 562 00:31:20,960 --> 00:31:22,980 in order to reduce the cache poisoning issues. 563 00:31:23,440 --> 00:31:25,500 And in this case, I'm going to run it against 564 00:31:26,640 --> 00:31:29,260 one of Black Hat's authoritative name servers 565 00:31:29,260 --> 00:31:31,640 and also one of the authoritative name servers 566 00:31:31,640 --> 00:31:33,760 for shmoo.com, the guys who put on 567 00:31:33,760 --> 00:31:35,200 the great ShmooCon conference. 568 00:31:36,040 --> 00:31:38,280 And so it does the port scan. 569 00:31:38,540 --> 00:31:40,400 Then it does the NMAP scripting engine. 570 00:31:40,560 --> 00:31:41,760 It takes it a little while, 571 00:31:41,960 --> 00:31:43,440 but then it gives you your results 572 00:31:43,440 --> 00:31:44,920 right next to the port number. 573 00:31:45,200 --> 00:31:46,940 It says that the Black Hat one 574 00:31:46,940 --> 00:31:49,420 basically refused recursion in both cases. 575 00:31:49,680 --> 00:31:53,440 So it wasn't able to interrogate them further. 576 00:31:53,980 --> 00:31:56,700 The ShmooCon, it was recursive, 577 00:31:56,700 --> 00:31:59,820 but I'm happy to report that it was great 578 00:31:59,820 --> 00:32:02,360 in source port randomization 579 00:32:02,360 --> 00:32:05,760 and it was great in transaction ID randomization. 580 00:32:06,080 --> 00:32:08,040 Now, I was going to show one of the many examples 581 00:32:08,040 --> 00:32:10,480 that fail miserably and maybe have 582 00:32:10,480 --> 00:32:12,980 a little challenge game to see who can 583 00:32:12,980 --> 00:32:14,520 poison the cache first, 584 00:32:15,740 --> 00:32:17,620 but decided maybe that wouldn't be 585 00:32:17,620 --> 00:32:19,440 the most responsible thing. 586 00:32:21,180 --> 00:32:23,760 Plus, I've got a lot more good stuff to cover. 587 00:32:25,500 --> 00:32:27,220 One of the things I'm excited about 588 00:32:27,220 --> 00:32:28,660 is the new ZenMap GUI. 589 00:32:28,800 --> 00:32:30,380 And a lot of people give me crap, 590 00:32:30,520 --> 00:32:32,040 like, what, I don't need no GUI. 591 00:32:32,120 --> 00:32:33,680 I've been using NMAP 10 years, 592 00:32:33,820 --> 00:32:37,000 and I know all of its 113 options by heart. 593 00:32:37,440 --> 00:32:39,260 And I have to admit, they have a point 594 00:32:39,260 --> 00:32:41,120 when you look at the old NMAP-FE, 595 00:32:41,340 --> 00:32:43,100 which, frankly, kind of sucked. 596 00:32:43,300 --> 00:32:45,640 It basically just displayed your NMAP output, 597 00:32:45,840 --> 00:32:47,460 and instead of typing SS, 598 00:32:47,800 --> 00:32:51,160 you press the button for SynScan. 599 00:32:51,740 --> 00:32:54,220 Whereas ZenMap is a much more powerful interface. 600 00:32:54,700 --> 00:32:56,880 And I'll give a quick demo of that. 601 00:32:57,720 --> 00:32:59,560 Basically, just like NMAP-FE, 602 00:32:59,820 --> 00:33:02,100 it could show you your normal output. 603 00:33:02,900 --> 00:33:05,040 It also has a tab that can say, 604 00:33:05,120 --> 00:33:06,960 hey, show me what each host has opened, 605 00:33:07,100 --> 00:33:08,860 or look at a service level 606 00:33:09,260 --> 00:33:11,840 and say, show me the ones with HTTP or SSH. 607 00:33:12,420 --> 00:33:14,720 And then it has a new experimental feature 608 00:33:15,300 --> 00:33:16,340 that we're adding, 609 00:33:16,480 --> 00:33:18,500 and we only have in the subversion right now, 610 00:33:19,360 --> 00:33:20,760 which basically says, hey, 611 00:33:20,860 --> 00:33:23,380 if you're going to call the dang tool NMAP, 612 00:33:23,480 --> 00:33:24,260 network mapper, 613 00:33:24,440 --> 00:33:26,560 it ought to at least draw you a map. 614 00:33:29,040 --> 00:33:29,440 Yeah. 615 00:33:38,300 --> 00:33:39,340 Thank you. 616 00:33:39,400 --> 00:33:41,720 This is certainly the best feature 617 00:33:41,720 --> 00:33:43,060 for an eye candy perspective, 618 00:33:43,320 --> 00:33:45,460 and it can be pretty neat. 619 00:33:45,560 --> 00:33:48,280 It basically takes the scan that you did, 620 00:33:48,340 --> 00:33:50,540 and it puts it in the center, the source host, 621 00:33:50,720 --> 00:33:54,340 and then in concentric circles around the center, 622 00:33:54,480 --> 00:33:56,400 it shows each hop on the network 623 00:33:56,400 --> 00:33:58,080 and the machines that you've scanned. 624 00:33:58,080 --> 00:34:00,100 And you can take one and say, 625 00:34:00,180 --> 00:34:02,080 hey, you know, show me what more data 626 00:34:02,080 --> 00:34:03,540 on this particular scan, 627 00:34:03,840 --> 00:34:05,720 show me the ports that are open. 628 00:34:05,900 --> 00:34:07,740 You can scan new machines, 629 00:34:07,900 --> 00:34:09,400 and they'll get added to the graph. 630 00:34:09,760 --> 00:34:12,560 And in terms of the biggest eye candy aspect, 631 00:34:12,860 --> 00:34:14,960 it's if you want to recenter the graph 632 00:34:14,960 --> 00:34:18,600 on a certain host that maybe makes it easier to read. 633 00:34:19,580 --> 00:34:20,100 Yes. 634 00:34:26,580 --> 00:34:29,400 So maybe once in a while that'll convince people 635 00:34:29,400 --> 00:34:33,920 to actual open the GUI and try it out. 636 00:34:34,060 --> 00:34:36,160 It also has a side benefit for me, 637 00:34:36,260 --> 00:34:38,680 which is there are a lot of Windows users out there 638 00:34:38,680 --> 00:34:42,360 who have no idea how to do a command line scan 639 00:34:42,360 --> 00:34:43,900 or what command line even means. 640 00:34:44,020 --> 00:34:45,880 I get so many mails saying, 641 00:34:46,020 --> 00:34:48,500 hey, I double clicked on NMAP.exe, 642 00:34:48,600 --> 00:34:52,120 and it put this strange black box on the screen, 643 00:34:52,260 --> 00:34:53,160 which then disappeared. 644 00:34:54,340 --> 00:34:56,180 Obviously, NMAP's totally broken. 645 00:34:58,060 --> 00:34:59,840 So maybe this'll help them. 646 00:34:59,900 --> 00:35:00,760 But on the other hand, 647 00:35:00,800 --> 00:35:03,420 maybe those people shouldn't be using NMAP at all. 648 00:35:10,000 --> 00:35:13,400 We have a second generation OS detection system, 649 00:35:13,720 --> 00:35:16,380 which basically took all the things I learned 650 00:35:16,380 --> 00:35:18,320 with the first seven years of OS detection 651 00:35:18,600 --> 00:35:21,080 and improved it, 652 00:35:21,180 --> 00:35:25,160 and we're now up to 1,500 signatures with the new system. 653 00:35:25,440 --> 00:35:28,200 So I'm hoping that'll help in terms of granularity. 654 00:35:29,960 --> 00:35:32,500 NMAP users basically can find every device 655 00:35:32,500 --> 00:35:33,700 you can possibly imagine. 656 00:35:34,100 --> 00:35:36,160 So sure, you've got your normal Windows 657 00:35:36,160 --> 00:35:38,040 and Linux versions and the like, 658 00:35:38,220 --> 00:35:41,800 but they find game consoles and PBXs 659 00:35:41,800 --> 00:35:45,880 and network power devices and all sorts of crazy things. 660 00:35:45,960 --> 00:35:47,780 It's always fun to go through the submissions. 661 00:35:47,780 --> 00:35:49,600 and see what people have. 662 00:35:50,300 --> 00:35:52,700 Version detection, you know, a lot of people, 663 00:35:52,760 --> 00:35:54,140 like I said, still don't know about it, 664 00:35:54,200 --> 00:35:57,100 but hopefully the people who go to DEF CON do. 665 00:35:57,780 --> 00:36:02,020 A feature that is sometimes not known as well as it could be 666 00:36:02,020 --> 00:36:03,160 is the reason feature. 667 00:36:03,900 --> 00:36:06,840 Basically, if NMAP tells you, say, a state is filtered, 668 00:36:07,120 --> 00:36:08,540 you don't necessarily know, 669 00:36:08,700 --> 00:36:11,880 is that because it sent me an ICMP host unreachable packet? 670 00:36:12,180 --> 00:36:13,660 Is that because it got no response? 671 00:36:14,400 --> 00:36:16,820 Well, the way to figure out what NMAP's doing more 672 00:36:16,820 --> 00:36:18,340 is use hyphen hyphen reason, 673 00:36:18,560 --> 00:36:21,720 and then you can see, hey, this one's open 674 00:36:21,720 --> 00:36:22,960 because we got a SYNAC, 675 00:36:23,060 --> 00:36:25,040 this one's closed because we got a reset, 676 00:36:25,680 --> 00:36:27,500 and that's a real good way to help understand 677 00:36:27,500 --> 00:36:28,840 what NMAP's really doing. 678 00:36:29,080 --> 00:36:31,000 And when that doesn't give you enough information, 679 00:36:31,360 --> 00:36:33,120 there's the packet trace option. 680 00:36:33,520 --> 00:36:35,200 So say in this previous scan, 681 00:36:35,420 --> 00:36:40,700 I wasn't sure whether port 25, mail, and 113, 682 00:36:40,740 --> 00:36:44,520 is it the destination host that's sending those reset packets 683 00:36:44,520 --> 00:36:45,700 and I'm actually reaching it, 684 00:36:45,700 --> 00:36:48,600 or is it a firewall sending some of them in between, 685 00:36:48,860 --> 00:36:50,480 or is it a different case for each? 686 00:36:51,060 --> 00:36:53,280 Well, by looking at the packet trace option 687 00:36:53,280 --> 00:36:55,620 from a quick scan of just those two ports 688 00:36:55,620 --> 00:36:57,180 so you don't plug your screen too much, 689 00:36:57,340 --> 00:36:59,980 you can look at things like the sequence number 690 00:36:59,980 --> 00:37:04,580 and window number, what options they use, IP ID, 691 00:37:04,860 --> 00:37:06,580 and that can often help figure out 692 00:37:06,580 --> 00:37:09,560 if it's the same host in both cases sending the packet, 693 00:37:09,780 --> 00:37:12,520 which can be useful when you're trying to understand 694 00:37:12,520 --> 00:37:15,000 the firewalls and filtering systems 695 00:37:15,000 --> 00:37:15,980 in place. 696 00:37:16,680 --> 00:37:19,400 Advanced trace route, you know, it's trace route, 697 00:37:19,580 --> 00:37:22,000 which isn't all that exciting, but at least it does it better 698 00:37:22,000 --> 00:37:25,220 because NMAP already knows what sorts of probes 699 00:37:25,220 --> 00:37:27,580 are likely to get through, and it's also faster 700 00:37:27,580 --> 00:37:28,960 because NMAP can do it in parallel. 701 00:37:29,340 --> 00:37:32,380 I made a number of performance and accuracy improvements. 702 00:37:33,280 --> 00:37:35,140 There's a whole section on the MAN page 703 00:37:35,140 --> 00:37:37,540 showing all the different options you can use 704 00:37:37,540 --> 00:37:39,080 and what might help. 705 00:37:39,600 --> 00:37:42,800 TCP and IP header options lets you specify things 706 00:37:42,800 --> 00:37:44,380 like source routing, 707 00:37:47,200 --> 00:37:48,880 the record route option, 708 00:37:49,040 --> 00:37:51,140 and some of you might be saying source routing, 709 00:37:51,280 --> 00:37:52,820 maybe that worked 15 years ago, 710 00:37:53,040 --> 00:37:55,680 but come on, there's no way that would ever work nowadays. 711 00:37:56,420 --> 00:37:59,600 But that's actually proved untrue in a number of cases. 712 00:37:59,880 --> 00:38:02,840 I was talking to a guy recently who was doing a test 713 00:38:02,840 --> 00:38:05,420 of a network, and he was, I guess, 714 00:38:05,440 --> 00:38:06,980 in their conference room or the like, 715 00:38:07,120 --> 00:38:10,560 and he was on a separate VLAN that could only contact 716 00:38:10,560 --> 00:38:14,540 a series of servers on their network, 717 00:38:14,540 --> 00:38:17,160 but he couldn't contact all the client machines 718 00:38:17,160 --> 00:38:20,760 for the company, just basically a little DMZ 719 00:38:20,760 --> 00:38:23,440 they enabled that they allowed access to 720 00:38:23,440 --> 00:38:24,380 from the conference room. 721 00:38:24,820 --> 00:38:26,960 So he basically took one of those servers 722 00:38:26,960 --> 00:38:29,020 and said, I want a loose source route 723 00:38:29,020 --> 00:38:31,860 through that server to the destination machine, 724 00:38:32,140 --> 00:38:35,000 and he was able to get around that restriction that way, 725 00:38:35,100 --> 00:38:36,140 which I thought was pretty cool. 726 00:38:37,280 --> 00:38:39,800 Another neat feature is called NCAT, 727 00:38:39,880 --> 00:38:41,160 and I shouldn't call it a feature 728 00:38:41,160 --> 00:38:42,900 because it's actually a whole new tool 729 00:38:42,900 --> 00:38:44,900 that I hope to ship with Nmap, 730 00:38:45,060 --> 00:38:47,160 and it's basically a modern interpretation 731 00:38:47,520 --> 00:38:49,920 of the Netcat that we all know and love. 732 00:38:50,380 --> 00:38:54,280 It basically supports virtually all of Netcat's 1.10 features, 733 00:38:54,440 --> 00:38:55,720 except the port scanner, 734 00:38:55,960 --> 00:38:58,260 because I have another tool I like to use for that. 735 00:38:59,980 --> 00:39:03,940 But it also supports a lot of other cool new things, 736 00:39:04,060 --> 00:39:07,600 like SSL, both for communicating between Netcat instances 737 00:39:07,600 --> 00:39:10,440 and to SSL HTTP servers. 738 00:39:10,940 --> 00:39:12,160 It supports IPv6, 739 00:39:12,840 --> 00:39:12,880 and it supports IPv4, 740 00:39:12,900 --> 00:39:15,020 and it works on Mac OS X, 741 00:39:15,240 --> 00:39:17,040 on Windows, on Linux, on Unix. 742 00:39:17,460 --> 00:39:19,240 It does connection brokering, 743 00:39:19,380 --> 00:39:22,460 so if you set up a Netcat listener in brokering mode, 744 00:39:22,680 --> 00:39:25,600 then all of your machines behind NATs 745 00:39:25,600 --> 00:39:28,320 that want to connect to that Netcat 746 00:39:28,940 --> 00:39:30,660 can do so through the broker. 747 00:39:30,840 --> 00:39:32,040 They can connect to that port 748 00:39:32,040 --> 00:39:33,360 and then talk to each other 749 00:39:33,360 --> 00:39:35,240 for command and control or whatever. 750 00:39:36,580 --> 00:39:37,460 Port redirection, 751 00:39:37,520 --> 00:39:40,340 there are a lot of different tools for doing that now 752 00:39:40,340 --> 00:39:42,100 if you look around and get a specific tool, 753 00:39:42,100 --> 00:39:44,160 but it's something I want to do often enough 754 00:39:44,160 --> 00:39:46,180 that I wanted to have it built in. 755 00:39:46,320 --> 00:39:47,660 It can do proxying, 756 00:39:47,780 --> 00:39:48,980 either as a client 757 00:39:48,980 --> 00:39:51,940 and do your stuff through a series of proxies, 758 00:39:52,000 --> 00:39:53,580 or it can act as a proxy. 759 00:39:53,680 --> 00:39:54,780 Once you get onto the machine, 760 00:39:55,020 --> 00:39:56,220 start it up as a proxy, 761 00:39:56,400 --> 00:39:58,920 and then you can proxy through it to other machines. 762 00:39:59,660 --> 00:40:00,500 Shell execution, 763 00:40:01,180 --> 00:40:02,040 access control, 764 00:40:02,280 --> 00:40:05,560 because you don't want anyone else connecting to your Netcat. 765 00:40:06,080 --> 00:40:08,080 And it's something I've wanted for a long time 766 00:40:08,080 --> 00:40:10,840 and has been in development since 2005. 767 00:40:11,460 --> 00:40:15,240 Right now, it's currently dev lead is Chris Catterjohn, 768 00:40:15,520 --> 00:40:16,940 one of the Summer of Code students, 769 00:40:17,140 --> 00:40:18,240 and I think he may be here. 770 00:40:18,320 --> 00:40:18,840 Are you here, Chris? 771 00:40:20,560 --> 00:40:22,280 Hey, let's give a hand to Chris. 772 00:40:29,360 --> 00:40:32,700 Chris has also added a lot of the other features I demoed, 773 00:40:32,700 --> 00:40:37,620 particularly the IP option ping discovery mode. 774 00:40:37,840 --> 00:40:40,220 That was his idea, and he put that in. 775 00:40:40,380 --> 00:40:40,820 Thank you. 776 00:40:40,840 --> 00:40:43,020 We have ndiff, which is a simple tool, 777 00:40:43,180 --> 00:40:45,100 but it does something that a lot of people 778 00:40:45,100 --> 00:40:46,800 have wanted for a long time, 779 00:40:46,960 --> 00:40:49,580 which is taking two scans and diffing them. 780 00:40:49,800 --> 00:40:51,460 So say I run a company network, 781 00:40:51,720 --> 00:40:53,460 I scan every day all the hosts. 782 00:40:53,700 --> 00:40:56,020 In my cron tab, I can then call ndiff 783 00:40:56,020 --> 00:40:59,460 and say, mail me the changes since yesterday. 784 00:41:04,440 --> 00:41:06,940 So any new ports became open, 785 00:41:07,080 --> 00:41:08,520 any new machines on the network, 786 00:41:08,640 --> 00:41:09,840 any machines went down. 787 00:41:09,840 --> 00:41:11,300 This will let you know. 788 00:41:11,500 --> 00:41:15,400 And we have a Python proof of concept right now in our SVN, 789 00:41:15,520 --> 00:41:17,340 and we're rewriting it in C, 790 00:41:17,540 --> 00:41:19,540 since it proved to be useful and people want it. 791 00:41:19,820 --> 00:41:21,660 The C version will work even better. 792 00:41:22,420 --> 00:41:24,540 Another thing is my MMAP book, 793 00:41:24,700 --> 00:41:26,080 which I've been working on for years, 794 00:41:26,760 --> 00:41:28,880 so long that people have been comparing it 795 00:41:28,880 --> 00:41:30,880 to Duke Nukem Forever and the like 796 00:41:30,880 --> 00:41:33,260 in the greatest vaporware. 797 00:41:33,380 --> 00:41:34,320 So I was like, dang it, 798 00:41:34,440 --> 00:41:37,280 I'm not going to go to DEF CON and Black Hat 799 00:41:37,280 --> 00:41:38,420 empty-handed again, 800 00:41:38,420 --> 00:41:40,560 especially after last year telling people, 801 00:41:40,640 --> 00:41:41,480 oh, it's almost done. 802 00:41:42,000 --> 00:41:45,040 So I worked pretty hard to get it ready, 803 00:41:45,780 --> 00:41:48,840 and I'm happy to say that I finally have it now 804 00:41:48,840 --> 00:41:50,620 and did a pre-release here. 805 00:41:56,700 --> 00:41:57,180 Thanks. 806 00:41:57,360 --> 00:42:00,540 I hope it does a good job at not just telling you 807 00:42:00,540 --> 00:42:02,220 what options there are for MMAP, 808 00:42:02,360 --> 00:42:05,480 but also how to use them effectively 809 00:42:05,480 --> 00:42:07,000 to scan your networks. 810 00:42:07,000 --> 00:42:11,180 And so I last-minute printed 170 copies 811 00:42:11,180 --> 00:42:13,940 and brought them here so I could tell people 812 00:42:13,940 --> 00:42:15,820 about them in my talk and they could go pick them up, 813 00:42:15,960 --> 00:42:17,980 but I'm afraid they were sold, like, 814 00:42:17,980 --> 00:42:19,260 after an hour this morning. 815 00:42:19,940 --> 00:42:21,420 And so they're all gone now, 816 00:42:21,580 --> 00:42:24,400 but I hope as soon as I can, 817 00:42:24,500 --> 00:42:26,140 I'm going to get it on Amazon and the like. 818 00:42:26,480 --> 00:42:29,400 And also half of it is already available online for free 819 00:42:29,400 --> 00:42:31,560 at nmap.org slash book. 820 00:42:32,020 --> 00:42:35,360 And that's also where I'll be putting the details 821 00:42:35,360 --> 00:42:36,740 of the launch. 822 00:42:36,740 --> 00:42:37,940 That's the launch of the book. 823 00:42:38,180 --> 00:42:41,520 And you can also join the nmap hackers list 824 00:42:41,520 --> 00:42:42,720 if you're not a member. 825 00:42:43,000 --> 00:42:44,760 It's a pretty low-volume list. 826 00:42:44,920 --> 00:42:46,700 I think I've sent three messages this year 827 00:42:46,700 --> 00:42:49,640 as opposed to nmap dev, which gets thousands of them. 828 00:42:49,900 --> 00:42:51,620 But nmap hackers you can join, 829 00:42:51,700 --> 00:42:54,540 and I'll send you the latest news when it's ready. 830 00:42:55,120 --> 00:42:56,740 I also wanted to do a slide 831 00:42:56,740 --> 00:42:58,620 because sometimes I get, you know, 832 00:42:58,640 --> 00:43:01,200 way more credit than I deserve for nmap 833 00:43:01,200 --> 00:43:02,720 just because I created it way back. 834 00:43:02,940 --> 00:43:05,800 But it's actually a project that's very fortunate 835 00:43:06,740 --> 00:43:08,440 to have tons and tons of contributors, 836 00:43:08,800 --> 00:43:10,820 and I couldn't do it without them. 837 00:43:11,100 --> 00:43:12,900 This is an example of just the people 838 00:43:12,900 --> 00:43:14,600 who've contributed significantly 839 00:43:14,600 --> 00:43:16,840 since version 4.50, 840 00:43:17,040 --> 00:43:18,240 which was nine months ago. 841 00:43:18,660 --> 00:43:21,140 So you can see that the nmap project 842 00:43:21,140 --> 00:43:23,200 is really lucky to have a lot of volunteers 843 00:43:23,200 --> 00:43:25,700 who help out greatly. 844 00:43:27,440 --> 00:43:29,700 Now with that out of the way, 845 00:43:29,800 --> 00:43:33,060 I think I have time for maybe two or three questions 846 00:43:33,500 --> 00:43:35,540 before we'll go to the question room 847 00:43:35,540 --> 00:43:36,380 if anyone has more. 848 00:43:36,620 --> 00:43:38,120 So who's got a question for me? 849 00:43:39,440 --> 00:43:41,920 How do you feel about Germany blocking your tool? 850 00:43:42,600 --> 00:43:45,720 Yeah, I don't feel very good about Germany and the UK 851 00:43:46,380 --> 00:43:48,260 and other countries that have put laws 852 00:43:48,260 --> 00:43:52,980 which tend to, people suggest, may ban tools like nmap 853 00:43:52,980 --> 00:43:54,340 that can be used for good things 854 00:43:54,340 --> 00:43:57,200 even though attackers might use them as well. 855 00:43:57,400 --> 00:43:58,900 And I think that's really dangerous. 856 00:43:59,180 --> 00:44:01,320 I mean, the typical analogy is banning a hammer. 857 00:44:01,620 --> 00:44:04,060 You know, by blocking it, you ensure that the good guys 858 00:44:04,060 --> 00:44:06,320 aren't able to use it to improve their networks. 859 00:44:06,780 --> 00:44:09,340 And personally, since I like to give talks 860 00:44:09,340 --> 00:44:12,100 in places like Germany and England, 861 00:44:12,960 --> 00:44:15,200 that can be a potential issue 862 00:44:15,200 --> 00:44:17,700 because I'd hate to get busted in Germany 863 00:44:17,700 --> 00:44:19,920 and these laws say things like, 864 00:44:20,000 --> 00:44:21,160 what's it designed for? 865 00:44:21,320 --> 00:44:22,080 What's the motivation? 866 00:44:22,400 --> 00:44:24,500 And so how do I convince a judge 867 00:44:24,500 --> 00:44:26,220 that my motivation was good 868 00:44:26,220 --> 00:44:29,400 when I can't even read German to read the law? 869 00:44:29,640 --> 00:44:32,320 So those are definitely a scary issue 870 00:44:32,320 --> 00:44:34,040 and things that I'm glad that 871 00:44:34,060 --> 00:44:35,700 groups are trying to fight 872 00:44:35,700 --> 00:44:37,820 even though we've had some losses there. 873 00:44:38,160 --> 00:44:39,340 Do I have another question? 874 00:44:43,240 --> 00:44:46,300 I can hardly see because of a giant bright light 875 00:44:46,300 --> 00:44:47,160 shining at me. 876 00:44:47,460 --> 00:44:49,300 The minus minus reason option. 877 00:44:49,560 --> 00:44:49,960 Oh. 878 00:44:50,080 --> 00:44:51,660 Does it add over here 879 00:44:51,660 --> 00:44:54,140 or is it just reporting what you were already scoring? 880 00:44:55,380 --> 00:44:56,160 Good point. 881 00:44:56,340 --> 00:44:57,280 The reason option, 882 00:44:57,920 --> 00:44:59,780 we sort of always have that field there 883 00:44:59,780 --> 00:45:03,020 so it won't have any performance impact at all 884 00:45:03,020 --> 00:45:03,840 to add that. 885 00:45:04,000 --> 00:45:04,820 So in many cases, 886 00:45:04,860 --> 00:45:07,520 just like hyphen V and like hyphen T4, 887 00:45:07,720 --> 00:45:09,960 it becomes one of the things I almost always use. 888 00:45:11,000 --> 00:45:11,560 All right. 889 00:45:11,620 --> 00:45:13,160 So if anyone has any other questions, 890 00:45:13,420 --> 00:45:14,960 I'm going to be in room 103 891 00:45:14,960 --> 00:45:16,580 which is just across the hall 892 00:45:16,580 --> 00:45:18,740 and I'd be happy to answer them there. 893 00:45:18,860 --> 00:45:19,540 Thank you very much.