1 00:00:00,125 --> 00:00:04,708 >> Good morning. If you're, I hope that most of you are actually still up from last 2 00:00:04,708 --> 00:00:12,167 night, otherwise you are getting up way too early. My name is Rob Graham, this is Paul McMillon 3 00:00:12,167 --> 00:00:18,917 and Dan Tentler. They are busy getting our demo working, making sure we can demo live stuff. 4 00:00:18,917 --> 00:00:26,667 We're going to talk today about scanning the entire Internet. Which really isn't a huge 5 00:00:26,667 --> 00:00:33,000 technological development, but it's something that the tools really haven't existed before. 6 00:00:33,000 --> 00:00:37,208 And they are really easy tools to create and we just haven't bothered. But we started 7 00:00:37,208 --> 00:00:41,375 creating these tools because now we can go to ISPs and get gigabit connections to the 8 00:00:41,375 --> 00:00:48,375 Internet and the Internet is pretty small, it's only 4 million addresses. So this is 9 00:00:48,375 --> 00:00:55,000 really an exciting thing to do, is to sit down on your command line using NMAP style options 10 00:00:55,000 --> 00:01:02,375 and just say I want to scan the subnet, the slash zero subnet. And you immediately start 11 00:01:02,375 --> 00:01:08,375 getting results back, just watching your screen just flow and flow and flow. Why scan the 12 00:01:11,917 --> 00:01:18,500 Internet? Well, if you are a defender, it's really actually an important thing to do. A lot 13 00:01:18,500 --> 00:01:26,000 of people have used Masscan to scan for Heartbleed on their own networks because a lot of 14 00:01:26,000 --> 00:01:29,375 scanning tools just don't support the scale. If they have hundreds of thousands of 15 00:01:29,375 --> 00:01:35,125 systems, most vulnerability scanning tools just can't handle the scale. NMAP does a much 16 00:01:35,125 --> 00:01:39,833 better job, but still, hundreds of thousands of systems, it's really slow, but Masscan, you 17 00:01:39,833 --> 00:01:45,500 just type it in and just a few minutes later, a hundred thousand systems get scanned and 18 00:01:45,500 --> 00:01:51,250 you find all your Heartbleed vulnerable systems. Or we have other really important answers 19 00:01:51,250 --> 00:01:55,917 we need to solve about the Internet right now like amplification attacks with DDOS 20 00:01:55,917 --> 00:02:00,333 that people have been using, such as the NTPs servers that have been misconfigured. To 21 00:02:00,333 --> 00:02:07,292 solve those we have to scan everything on the Internet to find them. Or when like DLINK 22 00:02:07,292 --> 00:02:11,708 announced a vulnerability in its home routers, we'll scan the Internet looking for all those 23 00:02:11,708 --> 00:02:17,583 DLINK servers to see how big of a Botnet problem does that present to us. Or like again 24 00:02:17,583 --> 00:02:22,375 with Heartbleed, scan all the SSL certificates to see how old they are and if they have been 25 00:02:22,375 --> 00:02:28,375 regenerated since the bug. There's also the offensive reason. It's the deep net and 26 00:02:33,917 --> 00:02:39,917 that's the, kind of a popular term these days of things that you can't find by Googling them. 27 00:02:45,792 --> 00:02:51,458 So with Masscan, you just scan with the banners option and you will find hackable systems 28 00:02:51,458 --> 00:02:58,667 within minutes. And for us, most of us are white hat researchers and from the offensive side, 29 00:02:58,667 --> 00:03:03,792 it's a lot of fun. It's informative. We really don't appreciate how small the 30 00:03:03,792 --> 00:03:10,875 Internet is until we have typed in slash zero and run our scan. Also, there's 65,000 ports out 31 00:03:10,875 --> 00:03:18,583 there. Pick one at random and you'll find something new that no one has ever found before, 32 00:03:18,583 --> 00:03:23,708 like a seamless control system that controls a nuclear power plant or something. The talk 33 00:03:23,708 --> 00:03:29,417 after this one, in this room, there is a home automation, I don't even know what the talk is 34 00:03:29,417 --> 00:03:35,167 about, I didn't get the exact details, but it was port 7468 or something like that, that he, 35 00:03:35,167 --> 00:03:42,167 that they scanned for and found millions of vulnerable systems. So pick a port, start scanning 36 00:03:42,167 --> 00:03:46,958 for it, see what the heck you get. Do a black hat talk or a DEFCON talk. >> Who remembers 37 00:03:46,958 --> 00:03:51,958 the iPhone port that just came out recently, the iPhone backdoor port? It's 65, 38 00:03:51,958 --> 00:03:56,042 62,000-something. I'm going to scan it right now, I just can't remember the port. Somebody 39 00:03:56,042 --> 00:04:02,792 shout it, anybody remember? No? Okay. >> We'll have to look it up. >> Worth a shot. Sorry, go 40 00:04:02,792 --> 00:04:10,250 on. >> So lots of people, so OK, so now you've excited me about scanning the whole 41 00:04:10,250 --> 00:04:17,292 Internet, I really want to like just log onto my ISP, my hosting environment, launch a VPS on 42 00:04:17,292 --> 00:04:24,250 Amazon and start scanning. What do I do? What are the things I need to know about? The first 43 00:04:24,250 --> 00:04:29,542 problem is knowing what the bandwidth limitations are. if you have a gigabit Ethernet you 44 00:04:29,542 --> 00:04:36,750 are actually only sending about 48, or 476 megabits per second of actual traffic. And that's 45 00:04:36,750 --> 00:04:42,500 because Ethernet has a pretty large overhead. And what scanning does, PCP scanning, is 46 00:04:42,500 --> 00:04:47,292 it sends out lots of small packets, probing the devices. So the per packet overhead is 47 00:04:47,292 --> 00:04:54,417 actually more than the contents of the packet. So when you do a gigabit Ethernet, what your ISP 48 00:04:54,417 --> 00:04:59,750 probably is going to charge you for is just the raw PCP overhead, which is 476 megabits 49 00:04:59,750 --> 00:05:05,750 per second. And by the way, this is a really high rate. So that comes out to 1,488,000 packets 50 00:05:10,083 --> 00:05:16,583 per second, but in practice you're gonna get a whole lot less, switches just barf at 51 00:05:16,583 --> 00:05:21,833 that. I haven't figured out why, I just know that when I connect I get between 300,000 to maybe 52 00:05:21,833 --> 00:05:27,833 800,000 packets per second. I'm not getting what Ethernet tells me I should get. Even on a well 53 00:05:27,833 --> 00:05:32,792 configured switch, that's got nothing on it but me, I don't get the full bandwidth, I don't 54 00:05:32,792 --> 00:05:40,250 know why. The billing issue is pretty interesting because different ISPs bill at different 55 00:05:40,250 --> 00:05:46,250 rates. Some ISPs don't seem to notice the small packets. This one time we got, we did this 56 00:05:48,375 --> 00:05:51,667 whole scan of the Internet and the ISP came back and said, yeah, but you have only used 57 00:05:51,667 --> 00:05:59,250 like a few megabytes total of traffic and they weren't seeing our outbound traffic. Some ISPs 58 00:05:59,250 --> 00:06:05,542 they will give you unmetered links and that's pretty awesome because you can just go to your 59 00:06:05,542 --> 00:06:11,542 heart's content. Note that there's some other subtle issues here. CCC in Germany, the Chaos 60 00:06:14,125 --> 00:06:18,375 Computer Club, they do their annual thing, last year they had a 100 gigabit connection to the 61 00:06:18,375 --> 00:06:23,542 internet, which I had other plans, but maybe this year I will go and just bring my 10 62 00:06:23,542 --> 00:06:30,292 gigabit cards with me. But there's still problems because we need, we're shoving lots of 63 00:06:30,292 --> 00:06:33,958 small packets across the wire and apparently that breaks agreements between period 64 00:06:33,958 --> 00:06:38,167 agreements. So your ISP, no matter how wonderful they are, may still get mad at you. 65 00:06:38,167 --> 00:06:44,167 There's the practical/physical infrastructure. VPSs tend not to handle the packet rate as often 66 00:06:46,875 --> 00:06:52,583 as much. It's one of the strains of IOs get strained. As I mentioned before, the Ethernet 67 00:06:52,583 --> 00:07:00,542 switches slow down quite a lot. Also be aware that just because the Ethernet switch says that it 68 00:07:00,542 --> 00:07:03,833 will accept 500,000 packets per second doesn't mean that the rest of the infrastructure and 69 00:07:03,833 --> 00:07:09,833 all the hops out to the Internet will accept those. Scanning, all the scanners randomize the port 70 00:07:12,917 --> 00:07:20,667 numbers, or the targets so that on the destination side, you probably won't drop any packets. 71 00:07:20,667 --> 00:07:25,667 The packet dropping happens on your side. So you need to scan some things and make sure, okay, 72 00:07:25,667 --> 00:07:29,333 I'm going to scan my own network across the internet, blast it with packets and make sure if I 73 00:07:29,333 --> 00:07:37,125 send 10,000 packets that I receive 10,000 packets. Most of my scans run even less than 74 00:07:37,125 --> 00:07:43,208 that. Is I will run multiple VPSs on different sites, different data centers and do a 75 00:07:43,208 --> 00:07:49,208 scan, one in Tokyo, one in Dallas, and one in Paris, and do that instead of blasting one, 76 00:07:52,375 --> 00:07:58,292 blasting out a scan from one site. Masscans charge really easy, you just do dash, dash 77 00:07:58,292 --> 00:08:04,292 charge, one of five, two of five, three of five, and it will split the scan. Your biggest 78 00:08:06,917 --> 00:08:12,750 issue is abuse complaints. The Internet now is done in a way that when people do abusive 79 00:08:12,750 --> 00:08:18,750 things like spam or SEO optimization stuff, scanning of websites, the complaints come 80 00:08:22,083 --> 00:08:24,417 back to the ISPs and the ISPs will block them and cancel those customer accounts. And even if 81 00:08:24,417 --> 00:08:30,417 your ISP is nice and willing and wants to do the scan from the network, they don't really have 82 00:08:34,583 --> 00:08:40,167 much choice because other organizations will just blacklist their entire address 83 00:08:40,167 --> 00:08:48,000 range, their entire AS number. Or peering agreements, they will stop peering with them. And so 84 00:08:48,000 --> 00:08:52,542 even if your ISP is nice, still they don't have much choice in this. They can't let you do too 85 00:08:52,542 --> 00:08:57,583 much nasty stuff. And so part of that is responding to abuse complaints. And answering them, 86 00:08:57,583 --> 00:09:05,542 which we'll get into. Some things are worse than others. Doing a Heartbleed scan these 87 00:09:05,542 --> 00:09:09,750 days with all of the IDS detection out there saying someone is exploiting me, that 88 00:09:09,750 --> 00:09:14,583 gets a lot. So we have been doing a Heartbleed scan once a month now for the past several 89 00:09:14,583 --> 00:09:20,333 months, which by the way is about 300,000 systems vulnerable and that's generated a huge 90 00:09:20,333 --> 00:09:25,667 amount of complaints. And by the way we have also run a Tor Exit Node, that's actually generated 91 00:09:25,667 --> 00:09:32,708 more complaints than just the Heartbleed scans. So still, that's the relative level. HTTP 92 00:09:32,708 --> 00:09:37,625 scan tends to put you on the fail to bandwidth, so put something nice in your use 93 00:09:37,625 --> 00:09:44,042 registry as one of the configurations options, put dash, dash, user agent so that 94 00:09:44,042 --> 00:09:49,042 -- say something nice like, you know, we're doing a research scan. And then various IDSs have 95 00:09:49,042 --> 00:09:55,042 rules and stuff. It's nice to try to evade them, not to try to get away with something evil, 96 00:09:57,208 --> 00:10:00,625 but change your signature of what you're doing to evade them so you just don't make people 97 00:10:00,625 --> 00:10:07,833 upset. Sadly, and this is a bad thing, is today's methodology for monitoring the network tends 98 00:10:07,833 --> 00:10:12,167 to monitor the inbound stuff. There's this old joke about a guy who's looking on the ground 99 00:10:12,167 --> 00:10:18,167 and looking for something and his friend asks, what are you looking for? And he says, well, 100 00:10:22,250 --> 00:10:27,958 I dropped my keys over there and I can't find them. And his friend asks, but why are you 101 00:10:27,958 --> 00:10:33,958 looking over here? And the guy says, well, the light is better over here. And that's what most 102 00:10:36,333 --> 00:10:43,083 organizations do these days, is they monitor the inbound attacks for hackers because the light is 103 00:10:43,083 --> 00:10:48,542 better. Because you put an IDS on the wire and you immediately, you see alerts coming up because 104 00:10:48,542 --> 00:10:52,500 people are, there's always a background radiation of someone doing something on the Internet, 105 00:10:52,500 --> 00:10:58,333 sending you packets and you'll get events. The light is better on the inbound side. But the 106 00:10:58,333 --> 00:11:03,792 detection you really want is on the outbound side, what is all the response. So for example, 107 00:11:03,792 --> 00:11:10,875 one of the abuse complaints we get from Heartbleed is, please take us off your scanning list. 108 00:11:10,875 --> 00:11:15,708 And we looked in our data and the data they're giving us, the addresses they're giving us are 109 00:11:15,708 --> 00:11:20,042 ones that are vulnerable to Heartbleed. So they are monitoring our inbound stuff 110 00:11:20,042 --> 00:11:26,542 saying that, are you vulnerable? And not monitoring the outbound stuff saying, yes, we are. And 111 00:11:26,542 --> 00:11:33,500 that's really, really bad. So as I mentioned before, ISPs must take this seriously. One of the 112 00:11:33,500 --> 00:11:39,792 biggest things is the DOD gets really, really angry. And when you've got people in suits show 113 00:11:39,792 --> 00:11:47,708 up at the ISP office and they say, we are seeing traffic from you and we don't want to, the 114 00:11:47,708 --> 00:11:52,208 pressure then comes down on us. Where they say, yeah, these address ranges need to be 115 00:11:52,208 --> 00:11:58,208 excluded. The exclude is pretty easy, it's the same way as NMAP. Which is, you just have a 116 00:12:03,583 --> 00:12:08,250 configuration file, either a file containing exclude list or just add to your configuration 117 00:12:08,250 --> 00:12:16,042 parameters and just keep adding them. And it supports comments. So we just had this long exclude 118 00:12:16,042 --> 00:12:21,625 list of address ranges, and whenever people send us abuse mail and say yes, hello, we're 119 00:12:21,625 --> 00:12:26,042 just doing research scanning, we'll happily take you off the list if you want, and they give 120 00:12:26,042 --> 00:12:32,083 us their IP address range and then we add it to this list. Now one of the cool things that we 121 00:12:32,083 --> 00:12:38,125 wish we could do is to have a public exclude list, but most everyone who sends us a request 122 00:12:38,125 --> 00:12:45,333 to be taken off our list doesn't want that to be known publicly. >> Yeah, a funny aside about 123 00:12:45,333 --> 00:12:51,667 this, so everybody says, take me off your list because I'm worried someone will be able to 124 00:12:51,667 --> 00:12:57,542 go look up what my IP ranges are for my organization so they can hack me. Fortunately bgp.hp.net 125 00:12:57,542 --> 00:13:01,958 has all this information publicly available in a really nice, easily searchable format, 126 00:13:01,958 --> 00:13:05,792 which is occasionally necessary when they don't want to tell you their ranges, but they still 127 00:13:05,792 --> 00:13:11,417 want you to stop scanning them. >> I don't understand. >>Yeah and Paul has got the block list 128 00:13:11,417 --> 00:13:15,417 open, sorry, so Paul's got part of the block list open and one of the other things that's 129 00:13:15,417 --> 00:13:20,542 really fun is, people will run IDS and IPS sensors on whole different subnet mass and 130 00:13:20,542 --> 00:13:26,167 netblocks and different ISPs and they have automated complaint messages that come in and say, 131 00:13:26,167 --> 00:13:30,500 Dear So and So, you're doing malicious activity. Sorry, didn't know a single sin packet 132 00:13:30,500 --> 00:13:37,458 was malicious, but you know, whatever, a single sin packet's malicious? >>The internet is 133 00:13:37,458 --> 00:13:43,167 over. >>But they would write in and complain and say take these net blocks off your list or take 134 00:13:43,167 --> 00:13:48,458 us off your list and give us no information at all. And in one particular case we had to go 135 00:13:48,458 --> 00:13:52,375 back and forth three or four times with them because they didn't, their automated messages 136 00:13:52,375 --> 00:13:58,417 asked us to take their publicly known, straightforward front-end IP addresses off the lists, but 137 00:13:58,417 --> 00:14:02,083 their sensors were on different lists, so we kept doing scans and their sensors kept picking 138 00:14:02,083 --> 00:14:06,125 up scans and kept complaining for us to take off IPs that were already in the block list. And 139 00:14:06,125 --> 00:14:10,375 we're like, we don't know what you guys are, take your crack back to the dealer, you got bad 140 00:14:10,375 --> 00:14:16,667 crack, like, tell them you want better crack. Stop. So it's bizarre, when you scan the whole 141 00:14:16,667 --> 00:14:21,042 Internet, you get a massive bag of random, like every possible ridiculous thing that could 142 00:14:21,042 --> 00:14:27,208 happen will. And every scan you do, you think, we have like, several pages now long, with 143 00:14:27,208 --> 00:14:33,417 multiple now huge net blocks of stuff that we are now leaving off the scans and every single 144 00:14:33,417 --> 00:14:38,542 time we do a scan, like I'm doing a scan right now on the port 62078, the iPhone backdoor 145 00:14:38,542 --> 00:14:43,208 port and there are 542,000 IPs responding. That doesn't necessarily mean they're all 146 00:14:43,208 --> 00:14:49,292 iPhones, that just means there's somebody responding but I'm gonna get abuse complaints. And 147 00:14:49,292 --> 00:14:53,333 I hope that maybe some will come in while we're on stage and I can share them because they're 148 00:14:53,333 --> 00:15:00,958 insane. >> One of the things is people, a lot of defenders don't believe that you are scanning 149 00:15:00,958 --> 00:15:06,750 the entire Internet. >> Oh yeah. >> So they have their company and they've got some 150 00:15:06,750 --> 00:15:11,167 well-known addresses that are identifiably belonging to them but they also got a secret 151 00:15:11,167 --> 00:15:15,875 subnet over there that no one is supposed to know also belongs to them. And then they see you, 152 00:15:15,875 --> 00:15:22,208 your scan go evilly across the entire, all those ranges. And so their conclusion is, oh my God, 153 00:15:22,208 --> 00:15:26,583 they are hacking me because they know me, they are targeting me, 'cause how else would they know 154 00:15:26,583 --> 00:15:33,000 to associate that secret subnet to our main subnetwork. And so they're convinced that we're 155 00:15:33,000 --> 00:15:39,750 hacking them. There was a really cool story about 6 months ago, I was on a podcast, with this guy 156 00:15:39,750 --> 00:15:44,958 who was going to be one of the hosts and the night before I just launched a scan of the 157 00:15:44,958 --> 00:15:49,917 Internet. And he starts tweeting how he was woken up on an emergency conference call 158 00:15:49,917 --> 00:15:56,375 because they were getting hacked. And he had to calm them down, talk them down and go back 159 00:15:56,375 --> 00:16:02,750 to sleep. And now apparently he says that whenever I do a scan, a ticket gets opened up and it 160 00:16:02,750 --> 00:16:08,750 immediately gets closed as, it's just Rob scanning me again. >> [Laughter]. >> This was a great 161 00:16:12,583 --> 00:16:18,583 story. I think this would be the best one to tell it. >> Oh, yes. Oh, this was a good time. 162 00:16:21,875 --> 00:16:27,792 So going back to abuse complaints and dealing with people complaining, like I said, 163 00:16:27,792 --> 00:16:31,750 it's a grab bag and you get a lot of random stuff. I have a friend of mine who runs the 164 00:16:31,750 --> 00:16:36,458 operation in which I'm hosted and he's my ISP. So he has been very kind in letting me do this 165 00:16:36,458 --> 00:16:39,458 sort of scanning. Not a lot of people will let you do this. If you go to any of the major 166 00:16:39,458 --> 00:16:43,500 providers and say, Hi, I want to use like 800 mega seconds to scan the Internet, they go, 167 00:16:43,500 --> 00:16:49,083 Haha, no. So I wanted to work with him and be very open about what I was doing and what I was 168 00:16:49,083 --> 00:16:54,292 scanning so that if he got weird bizarre complaints and he had to deal with the crazy, that he was 169 00:16:54,292 --> 00:17:00,375 better prepared to deal with the scenario. So I did a scan for some, I think it was VNC, I 170 00:17:00,375 --> 00:17:06,042 don't remember, it was Shmoocon this year in like February and we were, the three of us sat in 171 00:17:06,042 --> 00:17:09,667 like the lobby conning it until 3:00 in the morning doing our scans. And the next morning 172 00:17:09,667 --> 00:17:14,625 before the talk I started getting phone calls from my ISP and he was like Hey, we got some 173 00:17:14,625 --> 00:17:18,708 abuse letters, and we want to insulate you from this customer, or from this person because he 174 00:17:18,708 --> 00:17:23,292 is kind of belligerent. And I said, okay, well what can I do? He said just add these IP 175 00:17:23,292 --> 00:17:27,625 addresses to your block list, and all right fine. And a few minutes later he called me again 176 00:17:27,625 --> 00:17:31,417 and said we're still getting complaints and I said that's-. We do scans and we get 177 00:17:31,417 --> 00:17:35,833 complaints randomly for the next week because people don't check their logs immediately, right. 178 00:17:35,833 --> 00:17:43,750 And one guy, from Australia, it's gotta be an Australian right, decided that he was so 179 00:17:43,750 --> 00:17:51,333 upset that I literally had to single sinpack it to his systems. And when he sent in his 180 00:17:51,333 --> 00:17:55,250 complaint, my ISP guy was cordial and responded and said, hi, you know, we are doing 181 00:17:55,250 --> 00:17:58,958 Internet research. This is all open. You can see this website where this guy has everything 182 00:17:58,958 --> 00:18:02,917 documented. And I put it all up on my site, like here's where I'm doing my research, and 183 00:18:02,917 --> 00:18:07,750 here's my intention and here's how you can contact me. And because I guess he deals with so 184 00:18:07,750 --> 00:18:15,208 much random crap on his Ingress interface, we were the only people to ever respond to an 185 00:18:15,208 --> 00:18:21,208 abuse complaint from him. He like unleashed this torrent of crazy on us. >> [Laughter]. >> 186 00:18:23,542 --> 00:18:26,292 And it was like opening the fucking floodgates and he, up and including talking to these 187 00:18:26,292 --> 00:18:29,375 people on the phone and saying he was going to call the Internet police. And I went no, 188 00:18:29,375 --> 00:18:33,042 you're lying to me. And he was like, no I swear, he was threatening to call the Internet 189 00:18:33,042 --> 00:18:40,083 police and I'm like ok. >> [Laughter] >>Three hours later, I own Internetpolice.us and now 190 00:18:40,083 --> 00:18:47,792 my scans come from Internetpolice.us. >> [Laughter]. >> So you have to 191 00:18:47,792 --> 00:18:53,792 know how to work the crazy. So now yeah my scanning comes from Internetpolice.us and the scan 192 00:18:56,750 --> 00:19:02,583 that I'm running right now, that I'm scanning the iPhone port, if you're on--. >> Your thing is 193 00:19:02,583 --> 00:19:07,375 not working. >> What? >> I don't know. >> Oh, did it break? >> Apperently it's dead. 194 00:19:07,375 --> 00:19:12,750 >> Oh, boo, I'll fix it in a sec. >>Yeah, we should fix it. >> Ok, yeah, but it's like now 195 00:19:12,750 --> 00:19:17,917 if you have, oh and I should also say, we're also going to be doing probably several live 196 00:19:17,917 --> 00:19:25,083 scans while we're here and if you have a Verizon device and I think AT&T your phone is 197 00:19:25,083 --> 00:19:30,167 directly connected to the Internet and we will be touching you, against your will, wherever 198 00:19:30,167 --> 00:19:36,167 your phone may be. Yeah so, I found 912,000 devices apparently responding to this port. And I 199 00:19:39,083 --> 00:19:43,000 should say that I guess that, Rob is probably going to get to it, there's a million or so, 200 00:19:43,000 --> 00:19:49,750 there's two million devices that respond to everything. So like that's a whole separate rabbit 201 00:19:49,750 --> 00:19:55,708 hole of a project is going in and finding every load balancer, firewall, and router and other 202 00:19:55,708 --> 00:20:00,583 device that responds to absolutely everything because usually when you do this kind of 203 00:20:00,583 --> 00:20:04,667 work, you have to do it in multiple passes. So we use Masscan for the first sweep to 204 00:20:04,667 --> 00:20:08,708 see if the port is open. And then if the port is open then there's a secondary process 205 00:20:08,708 --> 00:20:14,292 where we decide what to do with the open port. So like if you are scanning for Redis for 206 00:20:14,292 --> 00:20:20,750 example, there's a ton of open Redis instances on the Internet. And you connect to it and issue 207 00:20:20,750 --> 00:20:24,583 the monitor command. And then sometimes it asks you for credentials in which case you 208 00:20:24,583 --> 00:20:30,750 ignore it. And other times it gives you credit card numbers and Facebook session cookies and 209 00:20:30,750 --> 00:20:36,375 Twitter session cookies and what are you doing? Like, they have these gnarly hardened front-ends 210 00:20:36,375 --> 00:20:42,875 wth like 2A SSL certificates and credentialing and OR, and what is it? >>OR. >>Off, and they 211 00:20:42,875 --> 00:20:49,500 really have front-end but then they have that transport mechanism is that is completely 212 00:20:49,500 --> 00:20:53,125 public unencrypted on the Internet. So you can bypass all of that and see like, hey these 213 00:20:53,125 --> 00:21:00,833 are credit card, what am I doing? [Laughter] Yeah, so and you do it in stages, right? So 214 00:21:00,833 --> 00:21:05,292 what we found out was when the secondary pass would go through and we would find a 215 00:21:05,292 --> 00:21:12,125 substantially lower number of things that the first sweep produced. So the first sweep 216 00:21:12,125 --> 00:21:16,458 would produce several million results. And the second sweep would say, well out of those 217 00:21:16,458 --> 00:21:21,500 several million results you have like 200,000 living results and we'd like, that's bizarre, 218 00:21:21,500 --> 00:21:24,792 what's the deal? We started testing it by hand it turned out that there is devices that just 219 00:21:24,792 --> 00:21:29,750 listen to every port and respond to everything. And I'm like, it's 2014 and people don't know 220 00:21:29,750 --> 00:21:35,833 what a SYN flood is and they are configuring their devices to just answer to everything so I'm 221 00:21:35,833 --> 00:21:40,792 thinking that we're just doing these, and we're in the hotel lobby tinkering around at 3:00 222 00:21:40,792 --> 00:21:44,083 in the morning and somewhere there's a guy with his head on fire because his IDS went down 223 00:21:44,083 --> 00:21:47,500 or his firewall went down 'cause somebody configured it. And I think checkpoint's guilty of 224 00:21:47,500 --> 00:21:50,708 this too. They have these settings where, oh yeah, this is going to block NMAP, we'll just 225 00:21:50,708 --> 00:21:54,958 respond to everything and it'll confuse the scanners and we're like scanning with like 8 gigs a 226 00:21:54,958 --> 00:22:00,375 second. >>It's not good for you. >>You might want to rethink this strategy. We'll see 227 00:22:00,375 --> 00:22:05,833 how it works out for them, cotton, right? >> So one of my favorite complaints I get back 228 00:22:05,833 --> 00:22:11,167 is the one saying to the effect of, we've blocked you with a firewall, neener, neener. 229 00:22:11,167 --> 00:22:17,958 [Laughter] Of like, OK, I don't even know who you are, I don't really care. One of the cool 230 00:22:17,958 --> 00:22:24,625 things is how broken organizations are, there's this financial worry, financial group 231 00:22:24,625 --> 00:22:28,250 which apparently is classified by the National Security Objective Facility Class A, as 232 00:22:28,250 --> 00:22:33,583 they repeatedly tell me every time I do a scan, and it's in Korea, and I have no idea why 233 00:22:33,583 --> 00:22:40,708 that is. But what they usefully do is they CC their entire organization on the abuse 234 00:22:40,708 --> 00:22:46,708 e-mails. >> [Laughter]. >> Yeah. >> You had one job! >> [Laughter]. >> So if you want a 235 00:22:48,750 --> 00:22:55,875 list of system admins that you want to phish for that organization, here's a friendly 236 00:22:55,875 --> 00:23:01,875 list that they so nicely give us. So yeah, so we're closer to ISP. Be nice to them. So that's 237 00:23:05,208 --> 00:23:10,500 the same story we have here, for all of us, is we work closely with the ISPs. We use the swipe, 238 00:23:10,500 --> 00:23:15,875 or the swip feature, the share your list project, you get an IP address ranges assigned to us so 239 00:23:15,875 --> 00:23:20,917 that when you do the reverse lookup, all of the abuse comes to us and not to our ISP. So we 240 00:23:20,917 --> 00:23:25,708 handle-- >> Usually about half of the complaints will CC our ISP anyway. Even though they 241 00:23:25,708 --> 00:23:31,208 have our contact info. They just want to CC everybody. I got one that was CC'd to Postmaster at 242 00:23:31,208 --> 00:23:36,625 the domain that I was at the email, that the contact info was from, it was completely 243 00:23:36,625 --> 00:23:43,292 unassociated with the IPs that I was scanning from. They just, they CC everyone that comes back 244 00:23:43,292 --> 00:23:48,542 in any kind of a look-up. So expect that. You know? Don't use your work e-mail if your, the 245 00:23:48,542 --> 00:23:54,542 postmaster at work is worried about this. >> [Laughter]. >> Apache is running. Derp is 246 00:23:58,083 --> 00:24:04,083 running. >> You're doing it wrong! >> It works for me! >> [Laughter]. >> Me, too! >> 247 00:24:13,083 --> 00:24:16,625 Also, if you scroll down a little bit, there's like a, it's a, I need to fix it, you can 248 00:24:16,625 --> 00:24:21,667 file a complaint. Which I need to do like, do something with this. Because you can file a 249 00:24:21,667 --> 00:24:26,833 complaint and it's a form that goes to nowhere. >> [Laughter]. >> You should probably fix 250 00:24:26,833 --> 00:24:33,167 that, Dan. >> Yeah, no, no, that was intentional, but like I'm now thinking like, yeah, I 251 00:24:33,167 --> 00:24:37,750 have to deal with like silly people trying to troll me with shitty XXX and SQL but I can't 252 00:24:37,750 --> 00:24:41,958 imagine if people have tried to fill this form out and what went into it because that would be 253 00:24:41,958 --> 00:24:49,083 like a whole Tumblr feed, like security reactions, just what goes in that form. That would be 254 00:24:49,083 --> 00:24:54,292 so rad. [Laughter]. Yeah, so right now, right now, as we speak, I'm doing a scan and 255 00:24:54,292 --> 00:24:57,917 right now there are system admins running around screaming, police are scanning us! >> 256 00:24:57,917 --> 00:25:03,917 Hopefully they've caught on by now and are not as, I don't know. >> You'd be surprised. Or 257 00:25:05,958 --> 00:25:12,208 maybe you wouldn't. [Laughter]. >> So you can also do a novelist VPS if you want to be a 258 00:25:12,208 --> 00:25:18,208 jerk and pay with Bitcoin and stuff. Some will allow you to complete your scan and before 259 00:25:20,417 --> 00:25:25,333 they cancel your account. Some like Lionel will cancel you very, very quickly. And so your 260 00:25:25,333 --> 00:25:29,792 $50 deposit gets cancelled immediately. Lionel is actually very friendly, if you are a well 261 00:25:29,792 --> 00:25:34,417 known verifiable organization and scan at slow rates, they actually are quite friendly to 262 00:25:34,417 --> 00:25:40,542 this whole thing, but they're not friendly to the whole anonymous VPS who do bad stuff. 263 00:25:40,542 --> 00:25:46,542 So I wanted to quickly talk about Masscan itself, it's just like NMAP, but not. The biggest 264 00:25:48,958 --> 00:25:54,875 thing is that NMAP does what is called a synchronous scan. It does a host at a time, it starts 265 00:25:54,875 --> 00:26:01,125 a scan, waits for a response, sends re-, retries, if it doesn't get back it responds and 266 00:26:01,125 --> 00:26:07,875 that's what slows it down. What Masscans does is it just blasts out the packets and never waits 267 00:26:07,875 --> 00:26:13,292 for a response. And that's why I can send out 4 billion packets because it doesn't have 4 268 00:26:13,292 --> 00:26:18,208 billion records in memory waiting for the response. It doesn't care, it doesn't know. 269 00:26:18,208 --> 00:26:23,375 And what it's using is SYN code so that, to validate the responses to come back that 270 00:26:23,375 --> 00:26:29,958 match what it thinks it might have sent. So this allows you to be a thousand times faster. It's 271 00:26:29,958 --> 00:26:35,667 not a technology thing, it's just, it's a common thing throughout, it's the same 272 00:26:35,667 --> 00:26:40,292 difference as between Apache and EngineX. Apache is an asynchronous server, can handle 273 00:26:40,292 --> 00:26:46,583 a lot more connections than Apache can. And the proportions are a way better scanner. If you 274 00:26:46,583 --> 00:26:51,917 are scanning a few hosts NMAP is just totally better. The only reason that you are using 275 00:26:51,917 --> 00:26:57,917 Masscans is if you want to do a million node networks or a billion node networks. The 276 00:27:00,333 --> 00:27:06,167 annoying thing about Masscan is it has its own TCP/IP Stack. Even when you run it just as a 277 00:27:06,167 --> 00:27:11,292 normal mode, it's still going off and doing its own TCP/IP Stack, bypassing the underlying 278 00:27:11,292 --> 00:27:16,708 system. And so you get little weird things you don't notice like there's duplicate RPs. The 279 00:27:16,708 --> 00:27:22,250 biggest problem is when you're doing banner checking, when you want to establish a TCP 280 00:27:22,250 --> 00:27:27,500 connection, send an HTTP request and get a response and record the response. The normal stack 281 00:27:27,500 --> 00:27:34,250 will reset those connections, so you have to do a firewall rule to block that. Or use a 282 00:27:34,250 --> 00:27:41,583 different IP address. So all of our scans, we scan from one machine, but then we have 283 00:27:41,583 --> 00:27:45,708 another IP address that we're scanning from, that is separate from our machines, not used by 284 00:27:45,708 --> 00:27:51,833 any machine. And we use source IP or adapter IP and set that as our IP address and scan from 285 00:27:51,833 --> 00:27:56,958 that and then we don't have any firewall rules to worry about. So that the basic configuration 286 00:27:56,958 --> 00:28:03,125 is, is set your, if you don't want to rely upon the defaults, if you're having problems, is 287 00:28:03,125 --> 00:28:08,917 set them manually with the source IP source port and you have to figure the router Mac 288 00:28:08,917 --> 00:28:16,375 address or using the router IP just works because it will ARP it. So banner checking is the 289 00:28:16,375 --> 00:28:22,458 fun stuff with Masscans. So Masscan will go off, check the ports, that's your basic scan, 290 00:28:22,458 --> 00:28:30,083 but usually you want to get more data, like SSL certificates or HTTP headers. And that's where 291 00:28:30,083 --> 00:28:34,458 you need to establish the connection to prevent the reset from killing the connection. We 292 00:28:34,458 --> 00:28:39,000 don't support NCS soft scripting. But there's lots if you can do. If all you want to 293 00:28:39,000 --> 00:28:45,500 do is check for one protocol that's odd, put it in a file and then do dash, dash hello string, 294 00:28:45,500 --> 00:28:51,125 that file name, and it will shove that data across the port when it connects to the TCP. So 295 00:28:51,125 --> 00:28:54,917 if you got some weird protocol, like some weird industrial control protocol and a weird 296 00:28:54,917 --> 00:29:00,917 port, that's an easy way to find just that industrial control protocol, bypass but ignoring 297 00:29:03,125 --> 00:29:09,125 all those systems that synack with nothing. One of the cool things is that you can do, you 298 00:29:11,500 --> 00:29:16,292 can break apart a scan, you can shard it. So if you've got 50 different machines. You can just 299 00:29:16,292 --> 00:29:22,750 do shard 1 to 52, 53, across the machines. You can use multiple IP addresses a range. If you 300 00:29:22,750 --> 00:29:26,750 have a class C, and you just want to use all those IP addresses you just type all of 301 00:29:26,750 --> 00:29:32,750 them in, type in the range. The same thing with a port. You can do a range of source ports. So, 302 00:29:36,083 --> 00:29:41,042 yeah, so we're sitting around doing our three day, or our days talking until 3:00 AM in the 303 00:29:41,042 --> 00:29:45,792 morning, drinking and we're imagining, yes, we can also do this. If you want to synplex 304 00:29:45,792 --> 00:29:51,708 someone from all of the IP addresses from the Internet that can be your source range. Your 305 00:29:51,708 --> 00:29:56,167 ISP might not allow it, it might do Egress filtering so it might not work, but in theory, the 306 00:29:56,167 --> 00:30:03,042 scanner can do it. >> The 90s are alive and well right here. [Laughter]. >> Also, it can do 307 00:30:03,042 --> 00:30:10,958 load testing. The, a really cool feature is infinite, which, yeah, it does crash firewalls a 308 00:30:10,958 --> 00:30:17,042 lot. >> I've done that recently and the next generation firewalls, I do deep packet 309 00:30:17,042 --> 00:30:23,958 inspection, oh, they get angry. >> [Laughter]. >> So I was at a client site several, like 310 00:30:23,958 --> 00:30:28,750 months ago yeah, and they were putting in new, fancy pants firewalls and I said I have an 311 00:30:28,750 --> 00:30:34,750 idea so like with dinky laptop I go okay, Masscan to a network on the other side of the firewall 312 00:30:38,125 --> 00:30:45,167 that doesn't exist. Just scan it. One NGFW had active directory authentification and 313 00:30:45,167 --> 00:30:52,167 all of its little gauges went to 100% and it broke and it never came back. And another one just 314 00:30:52,167 --> 00:30:58,250 went to 100% and dropped a lot of packets, but as soon as I control C'd out of Masscan, it 315 00:30:58,250 --> 00:31:01,625 came back to life. So yes, this is a wonderful firewall load-testing tool. >> Testing 316 00:31:01,625 --> 00:31:08,375 tool. >> It breaks clouds too. >> So I overflowed it. I may have overflowed a CAM table and 317 00:31:08,375 --> 00:31:14,042 a switch at a client once too by mistake. >> So that's the optimization we are doing with 318 00:31:14,042 --> 00:31:20,125 this whole asynchronous thing and for us, it's a billion connections in a few minutes, 319 00:31:20,125 --> 00:31:25,583 that's no problem. But the devices start stranding at 100,000 connections. And so they 320 00:31:25,583 --> 00:31:29,958 just, everything falls over. But the infinite feature is cool because you just type dash, dash 321 00:31:29,958 --> 00:31:34,500 infinite and when it completes the scan, it'll just restart it and if all the pieceway are open 322 00:31:34,500 --> 00:31:39,250 from the previous scan, they remain open, so you can create easily 100 million, I mean, 323 00:31:39,250 --> 00:31:47,083 yeah, 100 million of concurrent connections. And nothing else handles that right now. By the 324 00:31:47,083 --> 00:31:52,417 way, no one ever uses this, but I always output to binary format, that's the slash OB 325 00:31:52,417 --> 00:31:57,792 parameter and then read it later with dash rescan of that, and then output to XML or JSON or 326 00:31:57,792 --> 00:32:05,083 TeX or some other format. No one ever uses that but me, but I want to mention it. So one of 327 00:32:05,083 --> 00:32:08,667 the cool things, Paul was mentioning this when we were talking the talk, that should 328 00:32:08,667 --> 00:32:16,083 work, but I've never done it before, but it's really cool, you can receive on one IP 329 00:32:16,083 --> 00:32:21,750 address, like a burner phone and then you transmit from like a Xolo that's got a gigabit 330 00:32:21,750 --> 00:32:28,292 connection and then you spoof the IP address from the Xolo phone. So all the packets go out 331 00:32:28,292 --> 00:32:35,083 to the Internet at a very high rate and the responses come back at a very low rate to the phone. 332 00:32:35,083 --> 00:32:39,208 And what's cool about that is the abuse complaints don't go back to your Xolo account, they 333 00:32:39,208 --> 00:32:45,208 go to the phone. [Laughter] So I did that. I went out and got a T-Mobile phone, a T-Mobile chip, 334 00:32:48,792 --> 00:32:55,208 put it in my little Ninja telephone from two years ago, from which I can run Masscan 335 00:32:55,208 --> 00:33:02,000 'cause I jailbroke it and compiled a command line, but that didn't work because 336 00:33:02,000 --> 00:33:06,708 T-Mobile throws you through a firewall. I could not get all of the responses come back through 337 00:33:06,708 --> 00:33:14,208 the firewall. Clear has a direct access to the network. They also have a firewall, so the SYNs 338 00:33:14,208 --> 00:33:21,625 can't come in, but the synacks can come in just fine. So Clear works great for that. T-Mobile 339 00:33:21,625 --> 00:33:26,750 doesn't. We don't know about Verizon and AT&T. I think Verizon does have you directly 340 00:33:26,750 --> 00:33:33,333 on the Internet so it'll work with Verizon prepaid phones and stuff like that. But all I have 341 00:33:33,333 --> 00:33:40,208 actually verified working is this. And by the way, it works really cool because Masscan, 342 00:33:40,208 --> 00:33:46,458 what you do is you set the same seed. So Masscan randomizes the parameters, randomizes the SYN 343 00:33:46,458 --> 00:33:51,750 cookies. >> I just had a thought. So NSA is scanning all inter-continental traffic? Do 344 00:33:51,750 --> 00:33:56,708 you want to make them really mad? [Laughter]. Set up your phone --. >> Yeah, this will do 345 00:33:56,708 --> 00:34:01,042 it intercontinentally. Yeah, set up your phone on the other side of some ocean and just send all 346 00:34:01,042 --> 00:34:07,750 the results over there and watch them, what the hell is going on? Just a thought, you know, if you 347 00:34:07,750 --> 00:34:08,750 are bored. 348 00:34:08,750 --> 00:34:14,125 >>>So but, you can still do the banner checking. So the device, the Masscan on one hand, because 349 00:34:14,125 --> 00:34:18,292 again it's in its nature, it gets a synapse, it checks to see if it matches the seed, and if 350 00:34:18,292 --> 00:34:23,667 it does, it will then establish the TCP connection so you can do complicated scans like pulling 351 00:34:23,667 --> 00:34:29,875 down everyone's certificates or Heartbleed scan or something, and all from this device. But 352 00:34:29,875 --> 00:34:35,125 the massive gigabit per seconds is all on these other servers, potentially just blasting the 353 00:34:35,125 --> 00:34:41,125 whole Internet. Okay, let's talk about some results. So what Paul here did, and it's really cool, 354 00:34:44,167 --> 00:34:50,167 is he set up a little script to then download the image. And he, so here's an example of -- >> 355 00:34:57,083 --> 00:35:02,292 So you probably can't see, you probably can't read the title of that window. It says, I blanked 356 00:35:02,292 --> 00:35:10,000 out where it is, County warrant processing system, something or other state police. >> The derp 357 00:35:10,000 --> 00:35:16,000 is very strong. >> This one went away pretty quickly when I called my contact and said, hey, 358 00:35:18,292 --> 00:35:24,167 you know, we should probably do something about this. But there's stuff like this all over 359 00:35:24,167 --> 00:35:29,917 the results. And you know, this is probably someone who is all kinds of compliant with all the 360 00:35:29,917 --> 00:35:35,250 local regs, except that they didn't seem to think that a remote desktop protocol with no 361 00:35:35,250 --> 00:35:40,708 password was a problem. >> Yeah. >> So Paul has got lots of good results. We'll hopefully 362 00:35:40,708 --> 00:35:47,333 get to more. >> Another one was Heartbleed, we do a Heartbleed scan and there's still 300,000 363 00:35:47,333 --> 00:35:54,500 systems vulnerable. And so here's a list of the subject names coming back from here. And 364 00:35:54,500 --> 00:35:59,792 what we can see is, they're not websites that are vulnerable, it's things like Synology Nas, 365 00:35:59,792 --> 00:36:06,292 that's the PS series Nas down at the bottom. 10,000 of those. There's also a Synology box, 366 00:36:06,292 --> 00:36:10,625 there's a hick vision which is cameras, so there's all of these devices out there that are 367 00:36:10,625 --> 00:36:14,958 vulnerable that you would never find, if you come in through the DNS name and if you only scan 368 00:36:14,958 --> 00:36:22,458 the IP addresses. >> But there are some websites that are vulnerable and like one long 369 00:36:22,458 --> 00:36:28,458 list starts with secure dot some domain. Some I think are honeypots like NANOG, which is 370 00:36:31,125 --> 00:36:36,792 the North American Network Operators Group or something. There's a guy who's doing 371 00:36:36,792 --> 00:36:41,125 mainframe scanning and found lots of cool mainframes. I didn't include his pics here but 372 00:36:41,125 --> 00:36:46,042 they're really rad, to see what mainframes come on the Internet. >> That guy has a Tumblr of his 373 00:36:46,042 --> 00:36:53,042 mainframes. Live mainframes, like what are you doing, why is this on the Internet? In DMV, 374 00:36:53,042 --> 00:36:59,417 pharmacies and stuff. >> What are you doing? >>Okay, so let's try to do a live demo here. >> 375 00:36:59,417 --> 00:37:05,417 How many goats did you sacrifice to the demo Gods? The answer is, always not enough. So --. >> 376 00:37:12,000 --> 00:37:17,875 Yeah, so right before this talk, for some reason our servers have not wanted to respond. So like 377 00:37:17,875 --> 00:37:21,500 here it says Internetsurvey-2.erratasec.com, that's the one we do most of our 378 00:37:21,500 --> 00:37:25,917 scans from and it's not responding to me, so I'm going to have Paul log on to his 379 00:37:25,917 --> 00:37:33,833 server and do a demo. >> Give me another like 5 minutes. >> [Laughter]. >> Okay. >> So we 380 00:37:33,833 --> 00:37:36,875 can, I'll start talking about what's going on while the configuration is script is 381 00:37:36,875 --> 00:37:44,167 running. So I, this, I lost access to the service I was going to be doing this demo from 382 00:37:44,167 --> 00:37:50,625 and only got it back about 2 hours ago. So my configuration scripts have been running and 383 00:37:50,625 --> 00:37:56,792 installing the distributive scanner that I built. The way this works is that it runs 384 00:37:56,792 --> 00:38:01,417 Masscan from a host that's friendly to run Masscan on. Come talk to me afterwards if you 385 00:38:01,417 --> 00:38:07,417 want hosting recommendations. And it scans port 5900 which is VNC. And I started that about 386 00:38:11,583 --> 00:38:17,042 15,20 minutes ago and I think it's just about done with the whole Internet now. The 387 00:38:17,042 --> 00:38:23,042 follow-up processing is a set of cloud images that don't run SYN scans. What they do is they take 388 00:38:28,583 --> 00:38:35,917 the results of the Masscan output through a queue, through a Redis queue, and just shave 389 00:38:35,917 --> 00:38:42,292 off a result, go take, try to connect to the VNC, try, you know, speak the VNC protocol and 390 00:38:42,292 --> 00:38:44,708 if the VNC protocol says you may connect without authentication because VNC says, you need a 391 00:38:44,708 --> 00:38:48,542 password. But if it says you may connect without authentification, it's a very 392 00:38:48,542 --> 00:38:52,792 explicit thing, we're not you know, hacking into something that's not authorized. And then 393 00:38:52,792 --> 00:38:58,792 it goes and puts it back in the queue and takes a screenshot of it and then it just logs in the 394 00:39:01,333 --> 00:39:08,833 VNC screenshot and puts it back out into the queue. I, the results when they start flowing 395 00:39:08,833 --> 00:39:14,958 in, will be available at results.survey.tx.ai. I don't know if they're up yet. It 396 00:39:14,958 --> 00:39:20,958 doesn't look like it. I'm waiting for the screenshot machines to come back up. tx.ai. 397 00:39:23,208 --> 00:39:29,208 What I, oh, you're not on the DEFCON network. You won't be able to get to it unless you are 398 00:39:31,583 --> 00:39:34,958 on the DEFCON network. >> I'm on the DEFCON network. >> Are you on the DEFCON network? >> 399 00:39:34,958 --> 00:39:39,125 I'm on whatever this Ethernet cable is. >> Oh, you're probably coming from a different 400 00:39:39,125 --> 00:39:45,125 Egress IP, let me fix that for you. >> So as the results come in, they just flow through this 401 00:39:47,833 --> 00:39:53,625 queue and the beautiful thing is we can scale this follow-up processing as wide as we want. I 402 00:39:53,625 --> 00:40:00,875 normally would have about 100 cloud workers running to do this process. I haven't gotten it 403 00:40:00,875 --> 00:40:07,000 scaled up yet because they only just got installed here, but, you know, they cost me 16 cents 404 00:40:07,000 --> 00:40:12,125 an hour, so it's perfectly reasonable to spin them up for a job like this and tear them down 405 00:40:12,125 --> 00:40:18,125 when you're done with them. >> If you can add that . . . [Off mic] >> We can't quite do a 406 00:40:20,875 --> 00:40:28,750 live demo yet, how about you? >> It's loading. >> Loading? >> They won't be able to see 407 00:40:28,750 --> 00:40:35,250 the results you're looking for on this right now. >> Oh, okay. >> Give me another minute. >> 408 00:40:35,250 --> 00:40:40,792 They need five minutes, they're not ready. >> Okay. >> Well, in the meanwhile, we'll just do 409 00:40:40,792 --> 00:40:45,083 a scan from the DEFCON network. We'll see how much they like that. [Laughter] >> Oh yeah, I 410 00:40:45,083 --> 00:40:51,083 can't imagine they'll notice. >> Yeah, so we can do a slow scan. So, Masscan. Let's do like 411 00:40:54,583 --> 00:41:00,583 the, 23 is the big one? >> The wall of sheep. >> We can do like port 80 and we can do a 412 00:41:03,583 --> 00:41:09,583 slow packet rate of just like 10 packets per second. But it's really cool because we start 413 00:41:13,167 --> 00:41:18,792 getting results immediately. It's one of the cool things about Masscan versus NMAP is 414 00:41:18,792 --> 00:41:23,625 that NMAP waits until the entire host scan is done and then it does a ping and it does some 415 00:41:23,625 --> 00:41:27,542 other checks and it takes a while. So when you scan a subnetwork it takes a while 416 00:41:27,542 --> 00:41:31,875 before you get any result. And the NMAP scan, you go away for a coffee and you come back and 417 00:41:31,875 --> 00:41:35,833 realize you made a mistake in your configuration promoters and have to do it again, and it's an 418 00:41:35,833 --> 00:41:40,375 iterative process. But one of the cool things with Masscan is it's just a port at a time, I 419 00:41:40,375 --> 00:41:44,000 don't have to do ping first, I don't have to do anything first, I just send that port request. 420 00:41:44,000 --> 00:41:50,000 So you can have that slow rate like 1000 packets per second, they just start coming back. And 421 00:41:54,208 --> 00:41:59,333 if we just want to do a little bit more obnoxiousness like 10,000 packets per second. I'm 422 00:41:59,333 --> 00:42:06,000 sure they won't mind. >> [Laughter]. >> So actually, it doesn't look like it's much 423 00:42:06,000 --> 00:42:12,250 faster, that's because this whole screen is taking thousands of responses and dumping them to 424 00:42:12,250 --> 00:42:15,917 the screen and then doing the next one second update. But that's the little thing that 425 00:42:15,917 --> 00:42:19,542 reports there on the bottom of the left hand side is how many packets per second it's 426 00:42:19,542 --> 00:42:25,958 successfully doing. We should probably stop this. >> [Laughter]. >> Which is 427 00:42:25,958 --> 00:42:29,708 actually really bad because 20 -- so 23 is the range I test with because there's lots of 428 00:42:29,708 --> 00:42:33,458 hosting environments. There's Amazon, I know there's a bunch of other web servers out there, 429 00:42:33,458 --> 00:42:37,958 so I know that there is always something listed on port 80 and I don't get any abuse complaints 430 00:42:37,958 --> 00:42:45,250 back from that range, so they're a good thing to test with. But you can also do something like 431 00:42:45,250 --> 00:42:51,250 this. [Laughter] So one of the things I do with Masscan is kinda boss, is that I warn you 432 00:42:58,625 --> 00:43:04,292 that you probably misconfigured something and you don't want to scan the entire Internet. So I 433 00:43:04,292 --> 00:43:10,292 make you actually exclude one address. So I'm going to do ten packets per second, but even 434 00:43:17,958 --> 00:43:23,958 now, ten packet per second across the entire Internet, we already get back one result. But 435 00:43:29,833 --> 00:43:35,125 one of the cool things is, it does give you a time stamp, a time of how long remaining. Now 436 00:43:35,125 --> 00:43:39,958 ten packets per second, that remaining is going to be a long time. >> It's like when you 437 00:43:39,958 --> 00:43:47,250 copy a file in Windows 95. >> [Laughter]. >> But it's really cool, when you type in that 438 00:43:47,250 --> 00:43:53,250 0000/00 subnet, meaning the Internet, and at a much faster rate, like a million packets per 439 00:43:57,292 --> 00:44:03,292 second, and it tells you, yeah, it's about an hour. >> Yeah, for reference, I'm getting 440 00:44:06,083 --> 00:44:13,458 690,000 packets a second on my scan that's going right now and it, I started it as I walked in 441 00:44:13,458 --> 00:44:18,250 and it was telling me an hour and 20 minutes. That's just like on a modest gig pipe. >> Can 442 00:44:18,250 --> 00:44:24,083 you, can we connect that to the VGA port? >> All I have is HDMI. So, if we can sort that 443 00:44:24,083 --> 00:44:28,833 out somehow. >> Can we screen that and have you log into the machine and pump that up? >> Oh 444 00:44:28,833 --> 00:44:33,292 there we go, okay, the results are starting to flow in. >>Yay! >>So, the results of that 445 00:44:33,292 --> 00:44:40,167 survey, .tx.ai. So I now I need to scale this out in the cloud. But we're starting to get 446 00:44:40,167 --> 00:44:46,167 results now. >> You might be. >>Okay, what's your IP address? >> 172.18. >> Our IP is 447 00:44:50,875 --> 00:44:56,875 192.801. Why can't you add me? >> Because someone got mad the last time I did this, and I 448 00:44:59,083 --> 00:45:03,417 exposed it to the whole public Internet so I figured I'd just expose it to all of DEFCON and 449 00:45:03,417 --> 00:45:09,417 then they can't complain. Okay, so what's that IP address? >> So by the way, Masscan does, one 450 00:45:20,458 --> 00:45:26,458 thing that is also boss with Masscan is it's just, well I'm getting errors here, but it 451 00:45:29,375 --> 00:45:35,375 compiles on Mac OS and Windows. Well there's some results that all you guys can look at the 452 00:45:35,375 --> 00:45:39,833 results. >> Yeah, everybody except for you apparently can see them. Can one of you who's 453 00:45:39,833 --> 00:45:45,833 in the room who has a laptop see if you can get to that? Are you seeing results there? Cool. >> 454 00:45:49,792 --> 00:45:54,875 So here's the thing about, here's the rule of DEFCON, is we call the demo gods or the demo 455 00:45:54,875 --> 00:46:00,458 demons, is even when your demo is actually working, something does not work. >> Try it now. 456 00:46:00,458 --> 00:46:06,458 >> [Laughter] >> Oh, here we go, okay. It's working, some of you can get it, but I can't get 457 00:46:10,750 --> 00:46:18,125 it. >> Okay, what's your IP, Rob? >> Well, it's --. >> There's the Korean billboards 458 00:46:18,125 --> 00:46:23,042 again. So apparently there's like a swath of billboards in Korea and that are advertising 459 00:46:23,042 --> 00:46:29,042 and you can't really see but, a lot of, and this is one of those opportunities where like, you 460 00:46:31,125 --> 00:46:33,958 think of Hollywood movies and you're saying well, so I'm looking at a billboard that is 461 00:46:33,958 --> 00:46:39,125 probably in a really big public place, and hmmm, you know, all exploitable, the trolling 462 00:46:39,125 --> 00:46:45,125 opportunities. >> [Laughter]. >>I should stay away from the Korean radio. >> Go through the 463 00:46:50,292 --> 00:46:56,333 browser. I think your routing is funky. Actually, here, fuck it. We'll just do it from my machine 464 00:46:56,333 --> 00:47:04,167 'cause we're about out of time. >> Do we just hook up the video? >> Yeah, do you have a-? 465 00:47:04,167 --> 00:47:10,167 >> We can bring the machine up here. >> So any last minute questions by the way? Question 466 00:47:15,583 --> 00:47:21,583 over there? >> Is Masscan open source? >> Yeah, it's open source. I probably should have 467 00:47:23,792 --> 00:47:29,000 mentioned that before and had a link to it. It's on GitHub so if you Google "GitHub Masscan" 468 00:47:29,000 --> 00:47:35,000 you'll probably find it, but it's GitHub/RobertDavidGraham, my name, slash Masscan. >> [Off 469 00:47:43,500 --> 00:47:48,083 mic]. >> So the question for IPv6 is, and the implications are not really going to work. 470 00:47:48,083 --> 00:47:52,417 There are some things we can do knowing how IPv6 allocates addresses and we can maybe do 471 00:47:52,417 --> 00:47:59,958 target ranges. >> [Off mic]. >> Oh, nice! Nice! Well done! >> [Applause]. >> So to be 472 00:47:59,958 --> 00:48:05,958 clear, these are all, these are all results that have been dynamically found while we have 473 00:48:10,375 --> 00:48:16,375 been on stage. While they have been fearlessly typing. >> Is this a train? This is a train! 474 00:48:20,625 --> 00:48:27,875 >> We gotta go though, bye. >> Oh my God. >> So check the results. They're up there! >> 475 00:48:27,875 --> 00:48:33,875 46! >> [Laughter] >> Well done. >> [Applause].