1 00:00:00,000 --> 00:00:05,360 All right, guys. I got 40 minutes to do what was an 80-minute talk, so we're going to skip over a bunch of stuff here. 2 00:00:08,380 --> 00:00:09,600 I am getting time? 3 00:00:12,400 --> 00:00:12,800 Sweet. 4 00:00:17,460 --> 00:00:21,620 Okay. Get me a note with the exact end time, put it on stage. Thanks. 5 00:00:23,080 --> 00:00:25,480 So, who am I? Some guy. I do code. 6 00:00:27,860 --> 00:00:30,000 Who are these guys? Other awesome people. 7 00:00:30,300 --> 00:00:36,400 But I do want to say this. I had a theory that this was a patch that could not be reverse-engineered because it was really weird. 8 00:00:36,540 --> 00:00:40,180 It was reverse-engineered in 51 hours. So much for that theory. 9 00:00:42,080 --> 00:00:45,500 So, we had a bunch of people who were involved. These are the guys who did it. 10 00:00:47,100 --> 00:00:47,800 This is why. 11 00:00:48,160 --> 00:00:52,120 Yeah, I just took a lot of crap over the last month, over the last couple months, whatever. 12 00:00:52,440 --> 00:00:55,460 I got 120 million broadband customers that are fixed. 13 00:00:55,480 --> 00:00:57,680 I'd do it again. I'd do it twice. 14 00:00:59,440 --> 00:01:01,180 Fortune 500 is even doing okay. 15 00:01:02,840 --> 00:01:05,120 So, there are pictures of who's patched. 16 00:01:05,340 --> 00:01:06,100 They're pretty cool. 17 00:01:06,840 --> 00:01:07,800 Why all this work? 18 00:01:08,820 --> 00:01:11,540 So, who here does not know what DNS is? 19 00:01:14,160 --> 00:01:16,360 You might have heard a little while. Okay. 20 00:01:17,180 --> 00:01:19,900 Long story short, it is the phone book for the Internet. 21 00:01:20,100 --> 00:01:23,100 The Internet does not work on names any more than the telephone network does. 22 00:01:23,260 --> 00:01:24,800 You have to put a number in. 23 00:01:25,480 --> 00:01:26,300 For any name. 24 00:01:27,380 --> 00:01:33,180 It is a distributed system, which means it's like voicemail hell, where you keep getting bounced from one system to another. 25 00:01:33,400 --> 00:01:36,980 You start off on the root servers. You ask them for www.foo.com. 26 00:01:37,160 --> 00:01:38,880 System says, I don't know. 27 00:01:39,320 --> 00:01:41,080 But why don't you ask this guy over here? 28 00:01:41,360 --> 00:01:45,040 And then you go to the comms service and say, hey, do you know what www.foo.com is? 29 00:01:45,200 --> 00:01:47,400 And they also say, I don't know. 30 00:01:47,540 --> 00:01:49,220 But why don't you ask this guy over here? 31 00:01:49,440 --> 00:01:54,600 And you do this over and over and over again until you're finally out of voicemail hell and you finally actually get what you're looking for. 32 00:01:54,780 --> 00:01:55,460 This is common. 33 00:01:55,460 --> 00:01:56,260 It's called recursion. 34 00:01:56,260 --> 00:01:57,600 And it is a pain in the ass. 35 00:01:57,940 --> 00:02:06,860 Therefore, we dedicate recursion to a set of servers called name servers, like bind or djbdns or so on, where your host is just a client or a stub resolver. 36 00:02:07,820 --> 00:02:08,980 So what about the bad guys? 37 00:02:09,480 --> 00:02:15,120 If everything depends on receiving the right number for the right name, wouldn't a bad guy want his number returned instead? 38 00:02:15,460 --> 00:02:17,640 You try to go to Yahoo, you get a bad guy's number. 39 00:02:17,760 --> 00:02:19,460 You try to go to Google, you get a bad guy's number. 40 00:02:19,580 --> 00:02:21,220 You try to go to your bank, you get a bad guy's number. 41 00:02:21,500 --> 00:02:22,940 Actually, that sounds pretty damn cool. 42 00:02:24,040 --> 00:02:24,400 So. 43 00:02:25,460 --> 00:02:26,320 Here's the question. 44 00:02:26,500 --> 00:02:32,340 So, you know, when the name server asks, say, ns1.fu.com for www.fu.com, couldn't the bad guy reply first? 45 00:02:32,560 --> 00:02:34,800 Couldn't he, like, just have his answer accepted? 46 00:02:35,120 --> 00:02:36,000 Oh, totally. 47 00:02:36,380 --> 00:02:40,160 The way around this is called a transaction ID. 48 00:02:40,280 --> 00:02:55,180 It is a random number between 0 to 65,000 that allows the response from the legitimate good guy, the real ns1.fu.com, to be separated, disambiguated from the bad guy's fake reply for www.fu.com. 49 00:02:56,200 --> 00:02:57,340 So it's not perfect. 50 00:02:57,540 --> 00:02:59,380 But, you know, the good guy's got an advantage. 51 00:02:59,560 --> 00:03:01,920 It's like 65,536 to 1. 52 00:03:02,160 --> 00:03:04,000 Those are some pretty long odds. 53 00:03:04,260 --> 00:03:09,800 And even better, when the good guy wins, well, he can say how long he wins for. 54 00:03:10,040 --> 00:03:14,180 Is this name-to-number mapping going to last a minute, an hour, a day? 55 00:03:15,100 --> 00:03:21,720 You know, one day times 65,000 races divided by 2, that's like 84 years for the bad guy to actually win. 56 00:03:21,800 --> 00:03:23,280 That's a long time, right? 57 00:03:24,680 --> 00:03:25,160 So. 58 00:03:25,160 --> 00:03:27,120 This was the entire concept of this draft. 59 00:03:27,260 --> 00:03:28,020 Forgery resilience. 60 00:03:28,380 --> 00:03:30,900 And it basically said make your TTL as long as possible. 61 00:03:31,260 --> 00:03:33,900 This entire draft is a dare to the DEF CON community. 62 00:03:35,360 --> 00:03:36,260 Here's the problem. 63 00:03:37,140 --> 00:03:44,900 First, if this is to be a race between who can reply with the correct random number first, the bad guy has the starter pistol. 64 00:03:45,420 --> 00:03:55,140 Look, the good guy has to wait for the correct transaction ID to go over the river and through the woods to actually provide the good guy with, hey, when you reply, use this. 65 00:03:55,140 --> 00:03:56,880 Use number 8312. 66 00:03:58,040 --> 00:03:59,740 Yeah, the bad guy doesn't need to wait. 67 00:03:59,860 --> 00:04:00,480 He doesn't know. 68 00:04:00,840 --> 00:04:04,340 But he can just be like, hey, you, go look up www.foo.com. 69 00:04:04,640 --> 00:04:05,820 Hey, did you use transaction ID 1? 70 00:04:05,960 --> 00:04:06,880 How about 2, maybe 3? 71 00:04:07,760 --> 00:04:10,900 So the bad guy can always reply first. 72 00:04:11,200 --> 00:04:14,800 He may not have the right transaction ID, but he's getting there first. 73 00:04:16,020 --> 00:04:16,800 Second problem. 74 00:04:17,100 --> 00:04:18,980 By the way, first problem was kind of known. 75 00:04:19,100 --> 00:04:20,300 So is the second problem. 76 00:04:20,520 --> 00:04:22,720 Who said the bad guy can only reply once? 77 00:04:22,720 --> 00:04:26,120 The winner of the race is the first person to show up with the correct number. 78 00:04:26,280 --> 00:04:29,780 Nowhere does it say the bad guy can't try lots and lots of random numbers. 79 00:04:30,000 --> 00:04:40,140 So if he can try 100 numbers, the odds go from 65,536 to 1 to 655 to 1, which are still long odds. 80 00:04:40,780 --> 00:04:43,660 And when he loses, he has to wait for the TTL. 81 00:04:43,720 --> 00:04:46,180 That could be like 655 days, almost two years. 82 00:04:47,540 --> 00:04:48,400 Or not. 83 00:04:50,540 --> 00:04:52,580 Look, TTL is not a security feature. 84 00:04:52,580 --> 00:04:54,280 It's what I said in my talk last year. 85 00:04:54,340 --> 00:05:00,320 If the bad guy asks the name server to look up www.foo.com ten times, there's only going to be one race with the good guy. 86 00:05:00,680 --> 00:05:02,400 It's going to be like the first race will happen. 87 00:05:02,740 --> 00:05:04,420 www.foo.com will be looked up. 88 00:05:04,520 --> 00:05:08,980 The other nine times a lookup is spawned, that's just coming out of the cache. 89 00:05:09,240 --> 00:05:10,420 That's just being remembered. 90 00:05:11,820 --> 00:05:15,480 Ah, but there are other names besides just www.foo.com. 91 00:05:15,720 --> 00:05:17,240 Well, at least we can pretend there are. 92 00:05:17,360 --> 00:05:21,940 We can say, what about 1.foo.com, 2.foo.com, 3.foo.com. 93 00:05:21,940 --> 00:05:27,640 The TTL, that race timing limitation, only works on an entire name. 94 00:05:27,860 --> 00:05:29,580 Not on different subdomains. 95 00:05:29,840 --> 00:05:35,220 So, you can just repeatedly cause lookups for 1, 2, 3, 4, 5. 96 00:05:35,900 --> 00:05:39,660 And you may have only a 1 out of 655 chance of winning. 97 00:05:40,000 --> 00:05:42,940 Okay, so you try 655 names and you win. 98 00:05:44,420 --> 00:05:45,320 There's a problem. 99 00:05:45,800 --> 00:05:49,260 You are now the proud spoofer of 83.foo.com. 100 00:05:49,260 --> 00:05:51,640 But you wanted www.foo.com. 101 00:05:51,800 --> 00:05:54,640 Is there a way to get from 83 to www? 102 00:05:55,980 --> 00:05:56,420 Totally. 103 00:05:57,160 --> 00:05:58,340 Look, here's what you do, right? 104 00:05:58,660 --> 00:06:00,760 You've got 83.foo.com. 105 00:06:01,120 --> 00:06:03,420 You wanted to steal www.foo.com. 106 00:06:03,800 --> 00:06:06,440 As the bad guy, you've got three possible responses. 107 00:06:07,300 --> 00:06:12,920 When your transaction ID is accepted, whatever you have in your message is actually going to be looked up. 108 00:06:12,980 --> 00:06:15,440 They're going to open up the envelope and parse what you had to say. 109 00:06:15,660 --> 00:06:17,360 And the three things you could say were, 110 00:06:17,360 --> 00:06:23,260 Hey, I got the transaction ID right and here's your answer for 83.foo.com at 6666. 111 00:06:23,280 --> 00:06:25,160 Well, 6666. 112 00:06:26,420 --> 00:06:27,420 And that can work. 113 00:06:27,660 --> 00:06:30,680 There's I don't know the answer for 83.foo.com. 114 00:06:30,900 --> 00:06:35,600 Or the fun one, 83.foo.com, I don't know. 115 00:06:35,880 --> 00:06:40,980 But why don't you ask www.foo.com and here's its address. 116 00:06:42,080 --> 00:06:47,160 This has to work because it's how you got to ns1.foo.com in the first place. 117 00:06:47,160 --> 00:06:48,800 You went from root to com. 118 00:06:49,140 --> 00:06:52,000 You go from com to ns1.foo.com. 119 00:06:52,180 --> 00:06:57,220 You go from ns1.foo.com, as far as you know, to www.foo.com. 120 00:06:57,420 --> 00:07:03,740 You're basically using the other half of DNS to attack target names. 121 00:07:05,540 --> 00:07:09,400 So I wrote this tool called DNSRake, named after a common method for lockpicking. 122 00:07:09,620 --> 00:07:12,640 It sends a query to a name server for random.foo.com. 123 00:07:12,820 --> 00:07:14,220 The bad guy has a starter pistol. 124 00:07:14,220 --> 00:07:18,880 It sends 200 fake replies to the name server with transaction ID from 0 to 200. 125 00:07:19,120 --> 00:07:20,840 The bad guy can reply multiple times. 126 00:07:21,140 --> 00:07:25,760 And each of those replies contain name server redirections to www.foo.com. 127 00:07:25,940 --> 00:07:33,140 In technical terms, that's random.foo.com in ns, www.foo.com, www.foo.com in a 6666. 128 00:07:33,360 --> 00:07:34,820 It probably won't work. 129 00:07:35,120 --> 00:07:36,300 Oh well, try again. 130 00:07:37,120 --> 00:07:38,940 So these are the packets it looks like. 131 00:07:39,340 --> 00:07:41,220 This is the actual execution trace. 132 00:07:41,440 --> 00:07:42,640 Sorry I don't have time to leave it on. 133 00:07:42,640 --> 00:07:44,920 This is what happens when you actually run it. 134 00:07:45,920 --> 00:07:49,020 Now, this works against pretty much everything in wide deployment. 135 00:07:49,260 --> 00:07:53,740 Bind 8, bind 9, MSDNS, Nominum, which is used in most of the ISPs. 136 00:07:54,040 --> 00:07:59,220 Does not necessarily work against the rest of the name servers out there, but they're just not really out there. 137 00:07:59,320 --> 00:08:00,100 So does that count? 138 00:08:01,560 --> 00:08:03,740 The most commonly offered defense. 139 00:08:04,060 --> 00:08:06,520 Our DNS servers are super secure. 140 00:08:06,680 --> 00:08:08,820 They do not accept queries from the outside world. 141 00:08:09,060 --> 00:08:10,480 They must be safe. 142 00:08:10,480 --> 00:08:15,140 Well, can someone on the inside look up www.spare.com? 143 00:08:15,320 --> 00:08:19,160 Will an IP come back that's 157.222.4520? 144 00:08:19,560 --> 00:08:22,320 If so, you might have a problem. 145 00:08:23,240 --> 00:08:25,620 So look, we have this thing that you've got to realize. 146 00:08:25,940 --> 00:08:30,220 The attack works partially because of what are called bailiwicks. 147 00:08:30,920 --> 00:08:35,340 Root servers can return any name they want, and that name will be trusted. 148 00:08:35,800 --> 00:08:39,620 Comm servers can return any name they want, and that name will be trusted. 149 00:08:39,620 --> 00:08:41,780 As long as it ends in comm. 150 00:08:42,280 --> 00:08:45,920 foo.com can return any record for foo.com. 151 00:08:46,220 --> 00:08:48,060 Now, it wasn't always this way. 152 00:08:48,100 --> 00:08:53,120 This guy, Eugene Kashpal, was like, hey, I could totally stick extra records in any reply. 153 00:08:53,440 --> 00:09:00,760 So when you look up EugeneKashprev.com, I can create a new TLD and just say, by the way, have you heard of, I don't know, .cache? 154 00:09:01,880 --> 00:09:06,700 Yeah, so he got extradited from Canada and put in federal penitentiary. 155 00:09:06,700 --> 00:09:07,480 So don't do that. 156 00:09:09,620 --> 00:09:12,880 But the bailiwick system was invented to deal with his issues. 157 00:09:14,200 --> 00:09:17,040 1997 was the last time we had a DNS bug. 158 00:09:17,260 --> 00:09:18,400 Not a random bug. 159 00:09:18,480 --> 00:09:20,600 There's some awesome bugs that have happened over the last ten years. 160 00:09:21,120 --> 00:09:24,920 But 1997 was the last time we had a DNS bug this bad. 161 00:09:26,040 --> 00:09:34,560 Because in 2002, with the birthday attacks that everyone thinks I was talking about, presumptuous, you couldn't override entries that were already in the cache. 162 00:09:34,860 --> 00:09:38,600 So if you lost the race, you couldn't just try over and over again. 163 00:09:39,680 --> 00:09:44,680 2007's Amit Klein's transaction ID prediction still could not override the cache. 164 00:09:44,920 --> 00:09:47,020 Although Amit doesn't get as much credit as he deserves. 165 00:09:48,780 --> 00:09:59,120 So if that was what behaved within bailiwick stuff, does that mean you may not make a referral, either to a foreign name server or whatever, that is out of your bailiwick? 166 00:09:59,400 --> 00:10:04,480 No, you totally can, because that was just how DNS worked before Kashprev broke everything. 167 00:10:04,860 --> 00:10:06,760 So what they did was they said, 168 00:10:06,760 --> 00:10:14,220 If we're told at foo.com to go look up something in bar.com, we won't reject it, but we will start from scratch. 169 00:10:14,660 --> 00:10:19,240 And we will go to the root, and go to com, and go to com, and find the actual bar.com server. 170 00:10:19,580 --> 00:10:27,700 And we will make our way back such that foo.com can have a referral to bar.com, but we actually know the real bar.com IP. 171 00:10:29,260 --> 00:10:36,360 That means whenever someone looks up foo.com, the foo.com server can force an immediate look up to bar.com. 172 00:10:36,360 --> 00:10:38,280 It happens instantaneously. 173 00:10:38,320 --> 00:10:40,500 The bad guy has the starter pistol. 174 00:10:41,820 --> 00:10:50,620 So what you do as the attacker is not cause random things inside behind the firewall to look up foo.com, because then you have a huge timing issue. 175 00:10:50,760 --> 00:10:52,260 You have to know exactly when it happens. 176 00:10:52,440 --> 00:10:52,800 Excuse me. 177 00:10:52,840 --> 00:10:55,920 You don't make them look up bar.com, target.com, whatever you're trying to hit. 178 00:10:56,100 --> 00:10:57,740 Because that gives you a timing issue. 179 00:10:57,940 --> 00:11:00,940 What you do is you have the internal guys look up foo.com. 180 00:11:01,200 --> 00:11:05,920 And whenever they come to you for foo.com names, or badguy.com names, excuse me, 181 00:11:05,920 --> 00:11:14,000 when they come to you for badguy.com, when the internal name server comes to you for badguy.com names, 182 00:11:14,240 --> 00:11:18,300 you send a CNAME referral to target in your target domain. 183 00:11:18,640 --> 00:11:20,140 And this works very well. 184 00:11:20,760 --> 00:11:22,900 Now, how do you make the internal look ups happen? 185 00:11:23,380 --> 00:11:24,900 Oh, let me count the ways. 186 00:11:26,420 --> 00:11:27,140 All right. 187 00:11:27,180 --> 00:11:28,780 The many starter pistols of Mr. Bad Guy. 188 00:11:28,980 --> 00:11:30,340 You got a web browser, don't you? 189 00:11:30,480 --> 00:11:34,320 Web browsers will do a DNS look up every time you look at them funny. 190 00:11:34,480 --> 00:11:35,160 Any link. 191 00:11:35,160 --> 00:11:35,640 Any image. 192 00:11:35,760 --> 00:11:36,160 Any ad. 193 00:11:36,340 --> 00:11:37,700 Anything will cause a DNS look up. 194 00:11:37,800 --> 00:11:39,700 You don't even need JavaScript, though it helps. 195 00:11:40,360 --> 00:11:41,100 Mail servers. 196 00:11:41,560 --> 00:11:44,820 Anyone here work somewhere where they get email from the internet? 197 00:11:46,760 --> 00:11:47,860 Oh, come on. 198 00:11:49,220 --> 00:11:49,660 Yeah. 199 00:11:49,860 --> 00:11:50,440 Uh-huh. 200 00:11:50,500 --> 00:11:50,820 Yeah. 201 00:11:50,820 --> 00:11:51,860 You know what's coming. 202 00:11:52,280 --> 00:11:52,780 So, look. 203 00:11:52,920 --> 00:11:58,860 You even sniff in the general direction of a mail server on the internet, and it is going to do a DNS look up. 204 00:11:58,960 --> 00:12:00,640 You say, hello, DNS look up. 205 00:12:00,700 --> 00:12:00,980 Literally. 206 00:12:01,840 --> 00:12:03,540 You tell it who you are. 207 00:12:03,540 --> 00:12:05,300 It goes, I want to know more information. 208 00:12:05,440 --> 00:12:06,660 DNS, can you tell me? 209 00:12:06,780 --> 00:12:09,140 On spam check, maybe you're a spammer. 210 00:12:09,200 --> 00:12:11,160 Let's go ahead and look in the spammer DNS server. 211 00:12:11,300 --> 00:12:12,840 What could possibly go wrong? 212 00:12:13,460 --> 00:12:14,860 When trying to deliver a bounce? 213 00:12:15,180 --> 00:12:16,760 When trying to send a newsletter? 214 00:12:17,100 --> 00:12:24,520 Does any, if anyone here has Liris, the major email server at their site, you might want to tell them, by the way, please fix yours. 215 00:12:25,960 --> 00:12:30,600 Who puts a custom name server in a mail server and doesn't tell anybody? 216 00:12:30,600 --> 00:12:32,980 Oh, yeah. 217 00:12:33,120 --> 00:12:36,540 And, you know, sometimes when you mail a company, a human being replies to you. 218 00:12:37,180 --> 00:12:40,320 And when they do, they got to figure out where to deliver the mail. 219 00:12:41,580 --> 00:12:43,080 Web log resolution is fun. 220 00:12:43,360 --> 00:12:44,720 Who here runs a web server? 221 00:12:46,920 --> 00:12:49,200 You know, who here has ever looked at their web logs? 222 00:12:50,720 --> 00:12:51,180 Yeah. 223 00:12:51,320 --> 00:12:51,680 Yeah. 224 00:12:51,720 --> 00:12:58,600 So, when it goes ahead and takes those IP addresses and turns them into names, that's DNS look ups under attacker control. 225 00:12:59,860 --> 00:13:00,580 Web bugger. 226 00:13:00,600 --> 00:13:01,040 Web bugs and documents. 227 00:13:01,440 --> 00:13:04,800 You know, calling home is not just for privacy violation anymore. 228 00:13:05,320 --> 00:13:07,120 And there's lots of things in Web 2.0. 229 00:13:08,280 --> 00:13:08,980 IDSs are fun. 230 00:13:09,160 --> 00:13:13,420 You just make an IDS think you're an attacker and it wants to investigate you and thus do a DNS look up. 231 00:13:14,500 --> 00:13:16,120 Roy Oren's trick was great. 232 00:13:17,660 --> 00:13:21,240 So, you'd get a query from a Microsoft name server and reply with another query. 233 00:13:22,180 --> 00:13:23,560 Be like, it asks you a question. 234 00:13:23,680 --> 00:13:24,120 You go, no, no, no. 235 00:13:24,200 --> 00:13:25,060 I got a question for you. 236 00:13:25,140 --> 00:13:26,080 And it would totally go look it up. 237 00:13:27,800 --> 00:13:28,800 Like on the port. 238 00:13:29,380 --> 00:13:32,220 Send a DNS request on, like, port 58219. 239 00:13:32,420 --> 00:13:32,580 What? 240 00:13:34,500 --> 00:13:37,060 You can spoof internal IPs from the outside network. 241 00:13:37,320 --> 00:13:38,640 This has no right to work. 242 00:13:38,720 --> 00:13:42,400 But a whole bunch of people have crappy router ACLs and think they're firewalls. 243 00:13:42,660 --> 00:13:43,060 Wrong. 244 00:13:45,320 --> 00:13:46,240 So, what did we do? 245 00:13:47,200 --> 00:13:47,600 Look. 246 00:13:48,140 --> 00:13:53,540 We went ahead and we said, look, we got an odds right now of 1 out of 65,000. 247 00:13:53,700 --> 00:13:54,840 We got to increase that. 248 00:13:54,980 --> 00:13:58,780 We got to increase that to between 1 out of 163 million to 1 out of 165,000. 249 00:13:58,780 --> 00:13:59,320 We got to increase that to 2 billion. 250 00:13:59,460 --> 00:14:01,560 Actually, technically, 1 out of 4 billion. 251 00:14:01,800 --> 00:14:02,880 This is an improvement. 252 00:14:03,380 --> 00:14:05,420 That's a lot of traffic to go unnoticed. 253 00:14:05,560 --> 00:14:08,500 It is not necessarily too much traffic, Mr. Russian physicist. 254 00:14:08,780 --> 00:14:09,140 We know. 255 00:14:12,060 --> 00:14:12,520 Yes. 256 00:14:12,600 --> 00:14:21,100 I will totally take an attack that takes 2 billion packets over one that works in 32,000. 257 00:14:21,120 --> 00:14:24,220 Somehow, I think it's a little easier to defend against one versus the other. 258 00:14:24,780 --> 00:14:28,000 Now, people are saying, but I have this perfect idea. 259 00:14:28,000 --> 00:14:28,700 Perfect solution. 260 00:14:28,980 --> 00:14:29,600 Oh, he's wrong. 261 00:14:31,020 --> 00:14:31,460 Look. 262 00:14:31,580 --> 00:14:33,940 There are so many variants of this attack. 263 00:14:34,200 --> 00:14:39,480 I do not know how we got to 2008 with nobody knowing how to actually exploit this thing. 264 00:14:39,800 --> 00:14:42,080 You have C names, D names, extra glue. 265 00:14:42,420 --> 00:14:47,420 You have all the things that make the authoritative servers not reply, like this power DNS bug. 266 00:14:47,620 --> 00:14:52,440 You go ahead and you look up an unnamed query type as opposed to A or NS or CNAME. 267 00:14:52,580 --> 00:14:54,460 There's lots of different record types in DNS. 268 00:14:54,680 --> 00:14:56,940 If you look up one that does not exist. 269 00:14:56,940 --> 00:15:00,260 The power DNS authoritative server just doesn't reply. 270 00:15:00,740 --> 00:15:03,620 There's another way back to one out of 65,000 land. 271 00:15:04,400 --> 00:15:05,560 And other methods. 272 00:15:05,780 --> 00:15:07,480 Anything that causes the cache to clear. 273 00:15:07,700 --> 00:15:09,840 Anytime you have naturally low TTL records. 274 00:15:10,160 --> 00:15:18,060 Anytime, I don't know, you can make a name server not reply because you flooded it with attacks and decided, no, I'll give my firewall rules out to the outside world. 275 00:15:19,000 --> 00:15:21,520 Anytime, how about you just pollute subdomains? 276 00:15:21,800 --> 00:15:23,340 That worked at the TORCON talk. 277 00:15:23,860 --> 00:15:25,560 There's so many variations. 278 00:15:25,560 --> 00:15:27,560 The whole game was this. 279 00:15:27,700 --> 00:15:27,960 Look. 280 00:15:28,440 --> 00:15:32,740 Either we do point fixes, meaning we try to fix this. 281 00:15:32,780 --> 00:15:33,460 We try to fix this. 282 00:15:33,520 --> 00:15:34,200 We try to fix this. 283 00:15:34,340 --> 00:15:38,680 And when we screw up, we're back to 32,000 packets to misery. 284 00:15:39,480 --> 00:15:45,440 Or we have a generic sledgehammer fix that applies a minimum level of security to vulnerabilities we don't even know about. 285 00:15:45,620 --> 00:15:47,960 Also known as the DJB solution. 286 00:15:49,100 --> 00:15:51,460 DJB was totally, totally right. 287 00:15:51,700 --> 00:15:53,700 Even in all of his latest complaints. 288 00:15:53,840 --> 00:15:55,540 We actually completely agree. 289 00:15:55,540 --> 00:15:58,700 He's like, dude, guys, this was 99. 290 00:15:59,200 --> 00:16:00,240 We need real crypto. 291 00:16:00,540 --> 00:16:01,980 Yes, we do. 292 00:16:02,680 --> 00:16:06,940 But if we had showed up, we had this big secret summit back at Microsoft in March. 293 00:16:07,140 --> 00:16:12,780 If we had actually done that and said, like, big DNS bug, our solution is DNSSEC. 294 00:16:17,080 --> 00:16:17,800 That's right. 295 00:16:18,260 --> 00:16:21,980 One happy guy in Glee and the rest of you looking in horror. 296 00:16:25,540 --> 00:16:29,640 I'm not saying DNSSEC is not necessarily the right long-term solution. 297 00:16:29,880 --> 00:16:32,320 But it's sure not the right short-term solution. 298 00:16:33,520 --> 00:16:35,980 So there's going to be a ton of solutions offered. 299 00:16:36,260 --> 00:16:38,060 You know, people are going to talk about lots and lots of things. 300 00:16:38,180 --> 00:16:39,220 And we've broken most of them. 301 00:16:39,940 --> 00:16:40,620 But look. 302 00:16:40,720 --> 00:16:41,700 I will tell you this. 303 00:16:41,920 --> 00:16:44,420 All the things that are, you know, we'll do a little. 304 00:16:44,520 --> 00:16:46,840 We'll get this name server online and this name server online. 305 00:16:47,500 --> 00:16:55,520 Unless the root servers and the com servers, in fact, all the TLDs are either backwards compatible or code migrated to the root server. 306 00:16:55,520 --> 00:16:57,440 So if you want to get into your solution, it doesn't matter. 307 00:16:57,800 --> 00:17:04,280 Because I don't care how secure ns1.foo.com is if I can pop a.gtldservers.net. 308 00:17:04,460 --> 00:17:08,740 Because what do you think told me to use ns1.foo.com in the first place? 309 00:17:09,140 --> 00:17:14,680 So I've got a blog entry at my home page, www.expery.com, that just talks about all the other things. 310 00:17:14,860 --> 00:17:19,960 The long and short of it is we figured out everything else was broken in at least some way. 311 00:17:20,560 --> 00:17:24,940 We'll figure out that we're going to need to fight through this for, like, some period of time. 312 00:17:25,760 --> 00:17:28,440 Let's not have a 32,000 packets of doom. 313 00:17:29,660 --> 00:17:31,540 So there is some stuff from the client. 314 00:17:31,760 --> 00:17:35,160 I don't want to go too much in depth on it because I've got all sorts of fun server attacks. 315 00:17:35,600 --> 00:17:37,140 But I do want to say this. 316 00:17:38,320 --> 00:17:43,100 There was some research a while ago about predicting the transaction ID in the client. 317 00:17:43,480 --> 00:17:47,160 Given ID 1, given ID 2, you could determine ID 3. 318 00:17:47,440 --> 00:17:49,740 And everyone said, that's nice. 319 00:17:49,980 --> 00:17:54,060 If you're ever in a position to learn ID 1, you don't need to predict ID 2. 320 00:17:54,060 --> 00:17:56,780 You know ID 1, you can reply first. 321 00:17:57,100 --> 00:17:58,320 So this bug is BS. 322 00:17:58,760 --> 00:18:02,120 Why did Microsoft fix it in April in the April MSRC patch? 323 00:18:02,240 --> 00:18:02,800 That was ridiculous. 324 00:18:03,360 --> 00:18:06,080 No, it was the right thing to do. 325 00:18:06,200 --> 00:18:07,120 And here's why. 326 00:18:07,800 --> 00:18:14,660 For you to spoof a response to a DNS client talking to its local name server, you have to get two things right. 327 00:18:14,780 --> 00:18:19,540 The UDP source port and you have to get right the transaction ID. 328 00:18:19,860 --> 00:18:21,140 How do you know source port? 329 00:18:21,140 --> 00:18:30,120 Well, when you make an HTTP connection to someone before April MSRC, that connection would say go out on source port 10000. 330 00:18:30,980 --> 00:18:35,440 And you know what port the next DNS request would happen on? 331 00:18:36,480 --> 00:18:37,080 100001. 332 00:18:37,500 --> 00:18:39,400 Oh, so that's pretty easy. 333 00:18:39,580 --> 00:18:41,660 But what about the actual transaction ID? 334 00:18:43,240 --> 00:18:47,620 You can't treat DNS in isolation because everything uses it. 335 00:18:47,740 --> 00:18:50,780 So when a DNS reply happens, 336 00:18:50,780 --> 00:18:53,320 you get two things. 337 00:18:53,460 --> 00:18:56,160 You get a HTTP request going out, 338 00:18:56,720 --> 00:18:57,540 when immediately, 339 00:18:57,900 --> 00:18:58,320 where, 340 00:18:58,460 --> 00:19:00,360 wherever the bad guy says it is. 341 00:19:02,780 --> 00:19:03,720 Hang on. 342 00:19:30,100 --> 00:19:30,900 Wait, wait, wait. 343 00:19:31,000 --> 00:19:31,420 Freeze. 344 00:19:32,140 --> 00:19:33,280 When do I stop? 345 00:19:37,320 --> 00:19:38,940 I'm sorry, 10 minutes to 1. 346 00:19:39,300 --> 00:19:39,720 Oh. 347 00:19:45,300 --> 00:19:45,880 There's a... 348 00:19:45,880 --> 00:19:46,440 Drink! 349 00:19:46,920 --> 00:19:47,340 . 350 00:19:48,820 --> 00:19:49,240 . 351 00:19:50,780 --> 00:19:51,640 I'm sorry. 352 00:19:51,820 --> 00:19:52,560 . 353 00:19:52,560 --> 00:19:53,240 . 354 00:19:55,660 --> 00:19:56,780 . 355 00:19:58,000 --> 00:19:58,960 All right. 356 00:20:08,520 --> 00:20:12,340 So apparently I to totally relax. 357 00:20:12,820 --> 00:20:13,880 . 358 00:20:17,820 --> 00:20:22,460 All right, so this apparently means that I get more time than I had at Black Hat, 359 00:20:22,560 --> 00:20:24,700 which means I get to have a whole bunch more fun. 360 00:20:33,940 --> 00:20:34,380 Sweet. 361 00:20:55,560 --> 00:20:56,280 Ow. 362 00:21:01,500 --> 00:21:02,700 Where was I? 363 00:21:03,880 --> 00:21:04,760 Oh, yeah. 364 00:21:06,540 --> 00:21:09,460 So it turns out other protocols use DNS. 365 00:21:10,080 --> 00:21:12,320 And when DNS is done, 366 00:21:12,540 --> 00:21:13,740 other protocols, 367 00:21:13,880 --> 00:21:18,240 do things immediately to DNS-controlled locations. 368 00:21:18,820 --> 00:21:23,480 So what that means is if you guess the right transaction ID by, 369 00:21:23,580 --> 00:21:24,000 I don't know, 370 00:21:24,060 --> 00:21:26,640 setting 65,000 packets to a DNS client, 371 00:21:27,400 --> 00:21:30,800 you are able to control when you guess correctly, 372 00:21:31,700 --> 00:21:33,900 you will get a packet time. 373 00:21:34,880 --> 00:21:36,740 And when you guess correctly, 374 00:21:36,880 --> 00:21:42,300 the HTTP query will go to a destination that you set. 375 00:21:42,800 --> 00:21:43,100 Where? 376 00:21:44,360 --> 00:21:44,840 Here. 377 00:21:44,840 --> 00:21:46,200 These are not huge signals. 378 00:21:46,600 --> 00:21:50,520 However, all we want is 16 bits for a transaction ID. 379 00:21:50,880 --> 00:21:51,760 16 bits? 380 00:21:51,960 --> 00:21:53,320 I can leak 16 bits. 381 00:21:53,600 --> 00:21:54,740 Here's how we're going to do it. 382 00:21:56,360 --> 00:21:59,600 Client is going to go to a website controlled by the bad guy. 383 00:22:00,560 --> 00:22:01,660 Client is going to say, 384 00:22:01,800 --> 00:22:05,220 oh, I need to look up badguy.com against the local name server. 385 00:22:05,640 --> 00:22:08,360 Local name server is going to work its way throughout the internet. 386 00:22:08,700 --> 00:22:11,200 It's going to find the name server of the bad guy. 387 00:22:11,940 --> 00:22:12,920 And the bad guy? 388 00:22:13,880 --> 00:22:16,620 is not going to reply to the local name server it's just going to sit there 389 00:22:18,100 --> 00:22:24,100 so local name servers waiting and waiting waiting for reply they can't do anything so client 390 00:22:24,510 --> 00:22:29,500 is just going to sit there waiting waiting waiting for a reply to and they're just going to sit there 391 00:22:30,020 --> 00:22:36,700 open port open transaction id just waiting now the bad guy does something but doesn't send any 392 00:22:36,700 --> 00:22:43,300 packets to the local name server bad guy sends packets directly to the client knows what port 393 00:22:43,300 --> 00:22:48,480 to use because it leaked through http doesn't know what transaction id to use so he tries them all 394 00:22:48,980 --> 00:22:52,920 on average in 32 000 packets he will guess the correct transaction id 395 00:22:53,640 --> 00:22:59,480 if he doesn't guess in time oh well but he eventually will guess correctly now there's a 396 00:22:59,480 --> 00:23:05,260 couple signals here timing when the http connection arrives because that's what happens when you 397 00:23:05,260 --> 00:23:12,640 finish a dns reply to a web browser you get an http connection now if you have a say a three 398 00:23:12,640 --> 00:23:13,140 second 399 00:23:13,300 --> 00:23:19,360 window and can dissipate time by about 100 millisecond chunks you get about five maybe 400 00:23:19,360 --> 00:23:27,040 six bits of data but you can try over and over and over again also when you spoof that reply 401 00:23:27,040 --> 00:23:32,080 beyond just timing information you control the location that the web browser is going to go to 402 00:23:32,080 --> 00:23:43,220 so if you have 256 addresses you can basically say uh you know at 1.3 seconds my 130th of my i 403 00:23:43,300 --> 00:23:49,640 p addresses went ahead and got a packet that actually gives you quite a few more bits if you 404 00:23:49,640 --> 00:23:55,380 happen to have a class b if i had that class b no but um if you happen to have a class b you don't 405 00:23:55,380 --> 00:24:01,620 even need timing data it just works now if you have ipv6 you know this is really really easy but 406 00:24:02,100 --> 00:24:10,560 real world so um you know there are totally other hosts out there could we return ip addresses of 407 00:24:10,560 --> 00:24:13,280 hosts we don't have we don't have an ip address or host i i understand i can uh i can answer this 408 00:24:13,280 --> 00:24:15,180 Own and use the web browser 409 00:24:15,180 --> 00:24:17,000 To somehow basically 410 00:24:17,000 --> 00:24:19,120 Borrow the other host for our 411 00:24:19,120 --> 00:24:19,760 Scanning purposes 412 00:24:20,540 --> 00:24:22,800 Who here remembers idle scanning 413 00:24:25,580 --> 00:24:26,720 Dogs right 414 00:24:26,720 --> 00:24:29,160 Check it out idle scanning is 415 00:24:29,160 --> 00:24:31,100 All about you find 64,000 416 00:24:31,100 --> 00:24:33,160 Boxes on the internet that never get traffic 417 00:24:33,160 --> 00:24:35,040 But when they do you can 418 00:24:35,040 --> 00:24:37,060 Tell because their ipids change on 419 00:24:37,060 --> 00:24:38,540 Return packets so 420 00:24:38,540 --> 00:24:41,160 You go ahead and you cause some local 421 00:24:41,160 --> 00:24:43,000 Some client to send a packet to 422 00:24:43,000 --> 00:24:45,400 One of 65,000 423 00:24:45,400 --> 00:24:46,960 Servers then 424 00:24:46,960 --> 00:24:49,020 You go to all 65,000 servers and 425 00:24:49,020 --> 00:24:50,960 Say was it you was it you was it you 426 00:24:50,960 --> 00:24:51,240 Was 427 00:24:52,560 --> 00:24:54,660 Eventually it would theoretically work 428 00:24:54,660 --> 00:24:57,000 Idle scanning worked really well 429 00:24:57,000 --> 00:24:58,960 When it was figured out now there's all 430 00:24:58,960 --> 00:25:00,620 These bastards scanning the internet 431 00:25:00,620 --> 00:25:01,860 Screwing up idle scanning 432 00:25:02,760 --> 00:25:03,320 Sorry 433 00:25:04,620 --> 00:25:06,500 Then I was looking at pointer pollution 434 00:25:06,500 --> 00:25:08,660 You know when an ip address 435 00:25:08,660 --> 00:25:10,700 Communicates somewhere there'll be like a reverse 436 00:25:10,700 --> 00:25:12,760 DNS lookup that wasn't reliable 437 00:25:12,760 --> 00:25:13,260 At all 438 00:25:13,920 --> 00:25:15,940 Anyone here ever gone to a talk with a 439 00:25:15,940 --> 00:25:17,080 Billy Hoffman 440 00:25:18,760 --> 00:25:20,820 Billy does bad things to 441 00:25:20,820 --> 00:25:21,420 Javascript 442 00:25:22,520 --> 00:25:24,980 And at some point I just needed to do 443 00:25:24,980 --> 00:25:25,980 The Billy Hoffman option 444 00:25:26,540 --> 00:25:29,040 So here's the idea I would 445 00:25:29,040 --> 00:25:31,080 Return one of 446 00:25:31,080 --> 00:25:33,260 64,000 web browsers 447 00:25:33,260 --> 00:25:35,520 One of 64,000 web servers 448 00:25:36,280 --> 00:25:37,320 To the client 449 00:25:38,200 --> 00:25:40,560 I wouldn't know which one the client would get 450 00:25:40,560 --> 00:25:42,560 But whoever it got would be under a 451 00:25:42,560 --> 00:25:43,640 Domain I controlled 452 00:25:43,640 --> 00:25:45,960 Meaning I could read back 453 00:25:45,960 --> 00:25:47,280 From the web browser 454 00:25:47,280 --> 00:25:50,060 Hey which page did you get 455 00:25:50,060 --> 00:25:52,420 That actually 456 00:25:52,420 --> 00:25:54,580 Works fine and you can do that either directly 457 00:25:54,580 --> 00:25:56,480 With content or by looking at what happens 458 00:25:56,480 --> 00:25:57,500 To document.cookie 459 00:25:57,500 --> 00:26:00,180 So basically I'm using Javascript 460 00:26:00,180 --> 00:26:02,120 To eventually pick out DNS 461 00:26:02,120 --> 00:26:03,040 Transaction IDs 462 00:26:03,800 --> 00:26:05,140 What could possibly go wrong 463 00:26:05,140 --> 00:26:08,120 Of course it's way easier with my attack 464 00:26:08,120 --> 00:26:09,980 Basically you don't even try to guess the next 465 00:26:09,980 --> 00:26:12,120 Transaction ID just force repeated 466 00:26:12,120 --> 00:26:12,940 Lookouts for a name 467 00:26:12,940 --> 00:26:14,680 Fill in whatever answer you want 468 00:26:14,680 --> 00:26:16,880 And this is actually the exact attack 469 00:26:16,880 --> 00:26:18,000 Implemented in the field 470 00:26:18,640 --> 00:26:19,860 HoDNSSpoof.c from 471 00:26:19,860 --> 00:26:22,160 Psychopod at Yahoo.com 472 00:26:22,160 --> 00:26:24,500 I don't know if ZMDA is his group name 473 00:26:24,500 --> 00:26:25,540 But good job 474 00:26:26,240 --> 00:26:28,240 Initiate sequence to trigger a DNS lookup by the 475 00:26:28,240 --> 00:26:30,000 ADNS resolvers and the same way just spoof 476 00:26:30,000 --> 00:26:32,060 DNS IDs in a constant flood spoofed as the 477 00:26:32,060 --> 00:26:33,260 Primary DNS server 478 00:26:33,260 --> 00:26:35,160 So it's not theoretical 479 00:26:36,220 --> 00:26:37,600 Psychopod totally did it 480 00:26:38,900 --> 00:26:39,840 This was about 481 00:26:40,400 --> 00:26:41,520 Three or four days 482 00:26:42,120 --> 00:26:44,740 Was it the 25th, 26th of July 483 00:26:45,540 --> 00:26:46,240 Somewhere around there 484 00:26:46,240 --> 00:26:46,940 Good stuff 485 00:26:48,260 --> 00:26:51,280 DNS clients have never been the focus of this work though 486 00:26:51,280 --> 00:26:53,240 Because it attacks one box 487 00:26:53,240 --> 00:26:55,380 Would you rather it attacks one or you know 488 00:26:55,380 --> 00:26:56,040 Every one 489 00:26:56,040 --> 00:26:57,780 So we've been focusing on server 490 00:26:59,720 --> 00:27:00,840 Is that it 491 00:27:01,460 --> 00:27:02,700 Well you know that's 492 00:27:02,700 --> 00:27:04,760 How to attack DNS 493 00:27:05,460 --> 00:27:07,260 But that's not the interesting question 494 00:27:07,260 --> 00:27:10,200 The interesting question is why to attack DNS 495 00:27:10,900 --> 00:27:11,740 Because this 496 00:27:11,740 --> 00:27:14,080 This is where things get embarrassing because 497 00:27:14,080 --> 00:27:14,540 Wow 498 00:27:15,660 --> 00:27:18,620 Wow we've been doing a lot of crappy things on the internet for a long time 499 00:27:19,340 --> 00:27:20,340 So check it out 500 00:27:21,100 --> 00:27:22,680 Let's start with the TLDs 501 00:27:22,680 --> 00:27:23,980 It is in fact possible 502 00:27:23,980 --> 00:27:26,380 Yeah you start with poisoning the TLDs 503 00:27:26,380 --> 00:27:26,840 That's right 504 00:27:27,800 --> 00:27:31,980 Yeah don't bother with poisoning foo.com or google or yahoo or whatever 505 00:27:31,980 --> 00:27:32,860 Just poison everything 506 00:27:34,420 --> 00:27:37,560 Directly you can poison it by changing the NS record off of com 507 00:27:38,320 --> 00:27:41,720 Indirectly just poison agtldservers.net bgtlds.net 508 00:27:43,320 --> 00:27:44,840 cgtldservers.net and so on 509 00:27:44,840 --> 00:27:48,040 Now when the bad guy poisons com 510 00:27:48,040 --> 00:27:49,660 He gets all requests 511 00:27:50,200 --> 00:27:53,180 Even requests that he didn't know in advance that he wanted 512 00:27:53,500 --> 00:27:55,100 Because remember when you go to the root 513 00:27:55,100 --> 00:27:55,880 You don't just ask 514 00:27:55,880 --> 00:27:57,200 What's the next com server 515 00:27:57,440 --> 00:28:00,800 Say I'm looking for www.foo.com 516 00:28:00,800 --> 00:28:04,020 So when you poison higher in the DNS hierarchy 517 00:28:04,560 --> 00:28:06,380 The name server comes to you and says 518 00:28:06,380 --> 00:28:09,900 Hello would you like download.microsoft.com? 519 00:28:09,900 --> 00:28:11,940 Would you like it for 10 days? 520 00:28:12,020 --> 00:28:13,480 Would you like it for 10 hours? 521 00:28:13,800 --> 00:28:15,320 Would you like to only take Microsoft? 522 00:28:15,620 --> 00:28:17,920 Would you like to take only the specific name at Microsoft? 523 00:28:18,160 --> 00:28:20,480 You basically get complete control 524 00:28:20,480 --> 00:28:23,960 You actually get asked what you want to poison 525 00:28:23,960 --> 00:28:26,640 And for how long you would like it to be poisoned for 526 00:28:27,520 --> 00:28:27,960 Crap 527 00:28:29,440 --> 00:28:32,240 The obvious first step to do from here is MX intercept 528 00:28:32,780 --> 00:28:34,880 MX intercept is not just for the NSA anymore 529 00:28:36,760 --> 00:28:37,960 Mail is special 530 00:28:37,960 --> 00:28:39,880 It's special to the point that it has to be special 531 00:28:39,900 --> 00:28:41,900 It has its own DNS record 532 00:28:41,900 --> 00:28:43,220 It has an MX record 533 00:28:43,220 --> 00:28:47,300 You can tell not only does someone want to speak to foo.com 534 00:28:47,300 --> 00:28:49,340 They want to send an email 535 00:28:49,840 --> 00:28:55,240 The attacker can actually pick off which mails it wants to take 536 00:28:55,240 --> 00:28:56,200 And which ones it doesn't 537 00:28:56,200 --> 00:28:57,700 Can silently intercept 538 00:28:57,700 --> 00:29:00,280 And then let the mail run off to its own destination 539 00:29:00,900 --> 00:29:03,120 Or can interfere 540 00:29:03,900 --> 00:29:06,980 Here's where we get into real world how things get popped 541 00:29:06,980 --> 00:29:08,840 Okay about a third of all attacks 542 00:29:08,840 --> 00:29:11,320 Come from direct user action 543 00:29:11,840 --> 00:29:12,880 Loading a document 544 00:29:12,880 --> 00:29:14,560 Downloading and installing malware 545 00:29:15,220 --> 00:29:18,360 The game is to get compliance from the user 546 00:29:18,360 --> 00:29:20,340 To assist in executing the attack 547 00:29:20,600 --> 00:29:22,840 And since users want to see dancing pigs 548 00:29:22,840 --> 00:29:24,480 This is not necessarily that hard 549 00:29:26,460 --> 00:29:28,560 But even your best user 550 00:29:28,560 --> 00:29:30,340 Even your most trained user 551 00:29:30,820 --> 00:29:32,560 Even the user who doesn't want to see dancing pigs 552 00:29:32,560 --> 00:29:34,560 Still needs to get work done 553 00:29:34,560 --> 00:29:37,280 And work is done by exchanging documents 554 00:29:37,280 --> 00:29:38,920 And exchanging executables 555 00:29:38,920 --> 00:29:40,780 And exchanging zip files over email 556 00:29:40,780 --> 00:29:43,400 So if you're a man in the middle 557 00:29:43,400 --> 00:29:45,140 And you see a document going by 558 00:29:45,140 --> 00:29:46,780 You don't interfere with it 559 00:29:46,780 --> 00:29:48,420 Or you don't block it 560 00:29:48,420 --> 00:29:49,860 You don't even just read it 561 00:29:49,860 --> 00:29:52,720 You infect the document en route 562 00:29:53,500 --> 00:29:55,240 When it arrives the user is like 563 00:29:55,240 --> 00:29:57,220 Well I was just having a conversation with Bob 564 00:29:57,220 --> 00:29:59,440 And here's the contract that will get me a bonus this year 565 00:29:59,440 --> 00:30:00,480 Open, open, open 566 00:30:04,320 --> 00:30:05,640 Shouldn't the spam filter stop? 567 00:30:05,640 --> 00:30:08,220 When the man in the middle does intercept 568 00:30:08,220 --> 00:30:09,960 It is in fact true 569 00:30:09,960 --> 00:30:11,640 That the actual manipulation 570 00:30:12,380 --> 00:30:14,320 Is now going to come from the 571 00:30:14,320 --> 00:30:17,560 IP address of the bad guy 572 00:30:17,560 --> 00:30:19,020 And not necessarily the IP address 573 00:30:19,020 --> 00:30:20,460 Of the real mail server 574 00:30:20,460 --> 00:30:21,940 Now you might say 575 00:30:21,940 --> 00:30:23,400 But the spam filter will catch this 576 00:30:23,400 --> 00:30:25,100 How do the spam filters work? 577 00:30:28,100 --> 00:30:29,520 Someone just said poorly 578 00:30:29,520 --> 00:30:30,860 That guy gets a beer 579 00:30:32,640 --> 00:30:33,160 So 580 00:30:33,160 --> 00:30:35,620 You end up being able to hijack something 581 00:30:35,640 --> 00:30:36,000 Like spam filters 582 00:30:36,000 --> 00:30:38,440 You can actually go ahead and block mail 583 00:30:38,440 --> 00:30:39,980 From arbitrary domains now 584 00:30:39,980 --> 00:30:40,580 How great is that? 585 00:30:41,400 --> 00:30:44,620 So I'm not going to go fully into the voice over IP stuff 586 00:30:44,620 --> 00:30:47,140 But zip ain't looking too good either 587 00:30:47,140 --> 00:30:49,100 Zip ends up using SRV records 588 00:30:49,100 --> 00:30:49,700 Out of DNS 589 00:30:49,700 --> 00:30:51,640 And it looks like the invite and register messages 590 00:30:51,640 --> 00:30:52,640 Can even say 591 00:30:53,340 --> 00:30:54,900 Hello mister phone over there 592 00:30:54,900 --> 00:30:56,680 Please go ahead and look up this name 593 00:30:58,320 --> 00:30:59,900 Zane Lackey's been looking into this 594 00:31:01,180 --> 00:31:02,740 So beyond just mail 595 00:31:02,740 --> 00:31:03,900 Beyond just zip 596 00:31:05,640 --> 00:31:06,060 It's a little bit hosed 597 00:31:07,480 --> 00:31:09,400 You can directly poison 598 00:31:09,400 --> 00:31:10,900 All websites through com 599 00:31:11,620 --> 00:31:13,080 And that will work great 600 00:31:13,500 --> 00:31:14,680 But it will only let you 601 00:31:14,680 --> 00:31:15,860 Replace content 602 00:31:15,860 --> 00:31:18,440 What if you wanted to be able to read it back 603 00:31:18,440 --> 00:31:21,020 What if you wanted to not just make a user think 604 00:31:21,480 --> 00:31:23,500 Oh it's fake gmail dot com 605 00:31:23,500 --> 00:31:25,020 What if you wanted the user to go to 606 00:31:25,020 --> 00:31:26,340 Real gmail dot com 607 00:31:26,340 --> 00:31:28,420 But by the way there is some extra little script 608 00:31:28,420 --> 00:31:30,820 That was running in that execution context 609 00:31:31,440 --> 00:31:32,940 Well you could target 610 00:31:32,940 --> 00:31:35,580 The static files that are loaded by any 611 00:31:35,640 --> 00:31:36,540 Complex web app 612 00:31:36,540 --> 00:31:38,120 You load a script file 613 00:31:38,120 --> 00:31:38,880 You win 614 00:31:38,880 --> 00:31:40,180 You load CSS 615 00:31:40,180 --> 00:31:44,820 CSS has a method called expression 616 00:31:45,470 --> 00:31:47,420 And expression will run javascript 617 00:31:47,420 --> 00:31:49,440 So all you do is poison the server 618 00:31:49,440 --> 00:31:50,980 Specifically targeting 619 00:31:51,640 --> 00:31:52,140 CSS 620 00:31:52,140 --> 00:31:53,640 And you win there too 621 00:31:54,560 --> 00:31:56,740 If you wanted to do this to everyone 622 00:31:56,740 --> 00:31:59,440 And not just one particular site 623 00:31:59,440 --> 00:32:01,180 We have these nice things 624 00:32:01,180 --> 00:32:02,060 Ad servers 625 00:32:02,060 --> 00:32:04,740 Analytical servers that are run 626 00:32:05,640 --> 00:32:06,440 Script source 627 00:32:06,440 --> 00:32:08,540 If you have script source 628 00:32:08,540 --> 00:32:10,660 Poison DNS name with http 629 00:32:10,660 --> 00:32:12,660 That one poison 630 00:32:12,660 --> 00:32:14,580 Is going to hit the entire web 631 00:32:14,580 --> 00:32:16,000 Now I know what you're thinking 632 00:32:16,000 --> 00:32:17,280 SSL will save us 633 00:32:18,620 --> 00:32:19,180 However 634 00:32:21,660 --> 00:32:23,100 I'd like to point out 635 00:32:23,640 --> 00:32:25,400 Did you guys know the internet 636 00:32:25,400 --> 00:32:26,880 Is more than just the web 637 00:32:26,880 --> 00:32:28,940 Like more things use http 638 00:32:28,940 --> 00:32:30,000 Than just web browsers 639 00:32:32,100 --> 00:32:33,820 Welcome to the third age of hacking 640 00:32:34,760 --> 00:32:35,620 The first thing 641 00:32:35,640 --> 00:32:36,580 The first age of hacking 642 00:32:36,580 --> 00:32:38,000 You wanted to get 643 00:32:38,000 --> 00:32:40,440 Look all security is what are you parsing 644 00:32:40,440 --> 00:32:41,960 And who are you parsing it for 645 00:32:42,580 --> 00:32:45,220 Servers were the source of anonymous parsing 646 00:32:45,220 --> 00:32:47,060 For most of computer security 647 00:32:47,540 --> 00:32:48,820 You wanted to pop a box 648 00:32:48,820 --> 00:32:50,320 You came in over ftp 649 00:32:50,320 --> 00:32:52,020 You came in over telnet mail web 650 00:32:52,020 --> 00:32:53,820 Freaking time would let you in 651 00:32:53,820 --> 00:32:56,100 These were the things that consume 652 00:32:56,100 --> 00:32:57,380 Bytes from a bad guy 653 00:32:57,380 --> 00:32:58,800 What are you parsing crap 654 00:32:58,800 --> 00:33:00,420 Who are you parsing it for 655 00:33:00,420 --> 00:33:02,560 The bad guy was the server 656 00:33:05,960 --> 00:33:08,100 We got a little better with servers 657 00:33:08,100 --> 00:33:09,500 So now 658 00:33:09,500 --> 00:33:10,100 Not all 659 00:33:11,240 --> 00:33:13,640 Now everyone is focusing on client 660 00:33:13,640 --> 00:33:15,340 Site attacks through the web browser 661 00:33:15,340 --> 00:33:17,520 Because ultimately you can totally 662 00:33:17,520 --> 00:33:19,920 Lure people to you 663 00:33:19,920 --> 00:33:21,220 And when they are lured 664 00:33:21,220 --> 00:33:23,440 They go ahead and they take attacker 665 00:33:23,440 --> 00:33:25,000 Control bytes and give it to 666 00:33:25,640 --> 00:33:27,460 Javascript, activex, java 667 00:33:27,460 --> 00:33:29,340 Image formats, doms 668 00:33:29,340 --> 00:33:31,560 There's so much complexity 669 00:33:31,560 --> 00:33:33,500 Reachable through the web server 670 00:33:33,500 --> 00:33:35,520 So we've been spending the last couple 671 00:33:35,640 --> 00:33:37,720 Of years finding client side attacks 672 00:33:37,720 --> 00:33:39,720 And finding them actually 673 00:33:39,720 --> 00:33:41,500 Out in the field on porn 674 00:33:41,500 --> 00:33:43,600 Sides on gambling sides etc 675 00:33:44,660 --> 00:33:45,300 Now 676 00:33:45,300 --> 00:33:47,700 The browser age is not over 677 00:33:47,700 --> 00:33:49,560 Oh you know you can totally have multiple 678 00:33:49,560 --> 00:33:51,080 Bugs going on at the same time 679 00:33:51,400 --> 00:33:53,640 And indeed these dns issues 680 00:33:53,640 --> 00:33:55,120 Really affect the browser 681 00:33:55,500 --> 00:33:57,320 If nothing else all these 682 00:33:57,320 --> 00:33:59,320 Activex controls that are site locked 683 00:33:59,320 --> 00:34:01,000 To only work on a particular domain 684 00:34:01,360 --> 00:34:03,860 If that domain is hdb colon slash slash 685 00:34:03,860 --> 00:34:04,460 Broken 686 00:34:06,200 --> 00:34:06,840 But 687 00:34:06,840 --> 00:34:08,620 This is now the third age 688 00:34:08,620 --> 00:34:10,840 And the third age involves 689 00:34:11,440 --> 00:34:12,320 Everything else 690 00:34:12,320 --> 00:34:15,140 This is a desktop from the internet cafe 691 00:34:15,420 --> 00:34:16,400 Near my home 692 00:34:16,400 --> 00:34:18,240 That is real 693 00:34:18,240 --> 00:34:20,600 You probably can't see all the icons 694 00:34:20,600 --> 00:34:23,500 But here we have flash fxp and skype 695 00:34:23,500 --> 00:34:24,920 And icq and quicktime 696 00:34:24,920 --> 00:34:27,140 And ssh secure file transfer 697 00:34:27,140 --> 00:34:27,920 And yahoo messenger 698 00:34:27,920 --> 00:34:31,380 And logitech quick cam which probably has an auto updater 699 00:34:31,380 --> 00:34:33,140 And adaware sc personal which definitely 700 00:34:33,140 --> 00:34:34,360 Has an auto updater 701 00:34:34,360 --> 00:34:36,360 And itunes and aim 702 00:34:36,360 --> 00:34:37,520 And golden casino 703 00:34:37,520 --> 00:34:39,660 And internet freaking checkers 704 00:34:42,580 --> 00:34:44,300 I think we may have 705 00:34:44,300 --> 00:34:46,160 Some new attack surface to play with 706 00:34:49,060 --> 00:34:50,280 Who here remembers 707 00:34:50,280 --> 00:34:52,680 The vulnerability in sidebar last year 708 00:34:52,680 --> 00:34:54,260 Last year 709 00:34:54,260 --> 00:34:55,280 Vista came out 710 00:34:55,280 --> 00:34:56,960 And whenever 711 00:34:56,960 --> 00:34:58,440 Last year maybe it was the year before 712 00:34:58,440 --> 00:35:00,520 Well whenever sidebar got looked at finally 713 00:35:01,480 --> 00:35:04,140 Someone noticed huh this downloads 714 00:35:04,360 --> 00:35:05,660 Rss feeds from the internet 715 00:35:05,660 --> 00:35:08,360 When it downloads those rss feeds from the internet 716 00:35:08,360 --> 00:35:10,280 By the way they can 717 00:35:10,280 --> 00:35:12,100 Totally contain code to run 718 00:35:13,160 --> 00:35:13,760 Crap 719 00:35:14,420 --> 00:35:16,080 But we didn't see widespread 720 00:35:16,080 --> 00:35:18,240 Exploitation because the code was 721 00:35:18,240 --> 00:35:19,800 Retrieved from a fixed address 722 00:35:20,180 --> 00:35:21,880 That the bad guy could not change 723 00:35:21,880 --> 00:35:23,360 And the bad guy could not control 724 00:35:23,360 --> 00:35:25,540 But with dns you can 725 00:35:25,540 --> 00:35:27,600 This is a general theme 726 00:35:27,600 --> 00:35:30,260 That you can take communications that were once 727 00:35:30,260 --> 00:35:31,900 Secure and migrate them 728 00:35:31,900 --> 00:35:34,040 Or if not secure you can take 729 00:35:34,360 --> 00:35:35,420 Communications that would once 730 00:35:35,420 --> 00:35:37,920 Always go to a non attack or control 731 00:35:37,920 --> 00:35:39,860 Destination and you can totally 732 00:35:39,860 --> 00:35:40,500 Take it over 733 00:35:42,280 --> 00:35:44,080 So sidebar is not 734 00:35:44,080 --> 00:35:45,320 Special in this regard 735 00:35:46,080 --> 00:35:47,800 Browsers are really really good 736 00:35:47,800 --> 00:35:50,000 Client code I may very well be 737 00:35:50,000 --> 00:35:52,020 The first person in computer security 738 00:35:52,020 --> 00:35:53,240 To have ever said that 739 00:35:54,400 --> 00:35:55,780 But it's relative 740 00:35:56,360 --> 00:35:58,160 Browsers have been getting their ass 741 00:35:58,160 --> 00:35:59,380 Kicked for 10 years 742 00:36:00,300 --> 00:36:02,200 Aol instant messenger not so 743 00:36:02,200 --> 00:36:02,660 Much 744 00:36:04,420 --> 00:36:05,180 Look 745 00:36:05,180 --> 00:36:08,240 What do you guys think happens 746 00:36:08,240 --> 00:36:10,120 When you fuzz randomly corrupt 747 00:36:10,120 --> 00:36:12,320 Data into weak clients 748 00:36:12,320 --> 00:36:13,660 Well my buddy 749 00:36:13,660 --> 00:36:15,600 Ilya van sprundel went ahead and did that 750 00:36:15,600 --> 00:36:18,180 And all he did was feed random 751 00:36:18,180 --> 00:36:19,900 Data to irc clients 752 00:36:19,900 --> 00:36:22,100 And with one tiny little fuzzer 753 00:36:22,100 --> 00:36:24,280 He broke bitchex mirc 754 00:36:24,280 --> 00:36:26,100 Xchat kv irc egg drop 755 00:36:26,100 --> 00:36:27,580 Epic ninja emac 756 00:36:27,580 --> 00:36:29,740 Brc turbo irc 757 00:36:29,740 --> 00:36:31,660 It was just a catastrophe 758 00:36:31,660 --> 00:36:33,760 Because clients are written like crap 759 00:36:34,360 --> 00:36:36,220 When they don't have to deal with malicious servers 760 00:36:36,220 --> 00:36:37,600 While most clients 761 00:36:37,600 --> 00:36:39,140 That have ever been written 762 00:36:39,140 --> 00:36:41,280 Have not had to deal with malicious servers 763 00:36:42,420 --> 00:36:43,800 Irc clients have apparently 764 00:36:43,800 --> 00:36:45,720 Gotten better after this fuzzing effort 765 00:36:46,230 --> 00:36:48,400 But there's a lot of other stuff that people are running 766 00:36:49,460 --> 00:36:50,000 Games 767 00:36:51,000 --> 00:36:51,720 Has the 768 00:36:51,720 --> 00:36:54,140 Has the actual gaming next overlook security hole 769 00:36:54,140 --> 00:36:55,300 Talk actually happened 770 00:36:57,280 --> 00:36:57,820 Who 771 00:36:57,820 --> 00:36:59,260 Actually went to it 772 00:37:00,820 --> 00:37:02,380 Okay listen to that guy 773 00:37:02,380 --> 00:37:03,460 Totally totally 774 00:37:04,360 --> 00:37:04,940 Extremely right 775 00:37:04,940 --> 00:37:08,400 Game developers have time to do many many things 776 00:37:09,120 --> 00:37:10,420 Right secure code 777 00:37:10,420 --> 00:37:11,840 That can deal with crappy servers 778 00:37:11,840 --> 00:37:13,900 Is just not one of them 779 00:37:13,900 --> 00:37:15,500 Or at least hadn't been 780 00:37:15,500 --> 00:37:17,640 Because it wasn't a ship requirement 781 00:37:18,280 --> 00:37:19,940 We're gonna have to get a little better here 782 00:37:21,620 --> 00:37:22,180 Now 783 00:37:22,180 --> 00:37:23,840 Now we can skip past this slide 784 00:37:24,980 --> 00:37:26,280 Who needs an exploit 785 00:37:26,280 --> 00:37:26,720 Even 786 00:37:27,720 --> 00:37:29,480 Anyone hear about evil grade 787 00:37:29,480 --> 00:37:30,760 Francisco Amato's stunt 788 00:37:31,760 --> 00:37:33,960 Okay you don't need a buffer overflow 789 00:37:34,600 --> 00:37:36,900 You don't need some crazy ninja stuff 790 00:37:36,900 --> 00:37:40,280 A bunch of clients will just come to you 791 00:37:40,280 --> 00:37:41,580 And say hey you got any code for me 792 00:37:41,580 --> 00:37:42,740 I need a new version 793 00:37:42,740 --> 00:37:43,900 You're the bad guy guy 794 00:37:43,900 --> 00:37:46,180 I totally got a new version for you 795 00:37:50,140 --> 00:37:51,720 We knew this was broken 796 00:37:52,200 --> 00:37:54,380 I didn't realize anyone big 797 00:37:54,380 --> 00:37:56,080 Was still screwing this up in 2008 798 00:37:56,080 --> 00:37:57,900 So sun's got java 799 00:37:57,900 --> 00:37:58,800 And open office 800 00:38:00,060 --> 00:38:02,160 Apple with mac os apparently 801 00:38:02,740 --> 00:38:04,320 Winzip winamp itunes 802 00:38:04,360 --> 00:38:04,940 LinkedIn 803 00:38:04,940 --> 00:38:06,680 We knew about linkedin 804 00:38:06,680 --> 00:38:10,480 Turns out if you send a mail to security at linkedin.com 805 00:38:11,360 --> 00:38:12,120 Someone's listening 806 00:38:12,120 --> 00:38:14,560 I sent a mail I got a call back in 20 minutes 807 00:38:14,560 --> 00:38:16,920 Oh hi Dan I bet you're calling about our toolbar 808 00:38:20,740 --> 00:38:21,180 Yes 809 00:38:21,880 --> 00:38:23,060 Among other things 810 00:38:24,420 --> 00:38:26,220 Props to linkedin they fixed that pretty good 811 00:38:26,220 --> 00:38:27,620 At least I think they did 812 00:38:28,680 --> 00:38:31,120 Auto upgrade is a pain in the ass 813 00:38:31,120 --> 00:38:32,740 You have to make sure 814 00:38:32,740 --> 00:38:34,280 The update package is signed 815 00:38:34,360 --> 00:38:36,380 And signed by you 816 00:38:36,380 --> 00:38:38,220 And signed by you 817 00:38:38,220 --> 00:38:40,400 With the key that says I'm supposed to be able to sign code 818 00:38:40,400 --> 00:38:42,120 And sign from a signature 819 00:38:42,120 --> 00:38:43,420 That has not been revoked 820 00:38:43,420 --> 00:38:46,220 And be a signature on by the way 821 00:38:46,220 --> 00:38:47,180 The same product 822 00:38:47,960 --> 00:38:50,280 And also be a new version 823 00:38:50,280 --> 00:38:52,080 Because if you release something insecure 824 00:38:52,080 --> 00:38:53,120 Six months ago 825 00:38:53,120 --> 00:38:56,320 You don't want an auto upgrade back to the vulnerable version 826 00:38:56,320 --> 00:38:58,220 Now you could use ssl 827 00:38:58,220 --> 00:39:00,240 But people are like oh my god performance 828 00:39:00,240 --> 00:39:01,040 I can't do it 829 00:39:01,720 --> 00:39:02,180 So 830 00:39:04,360 --> 00:39:06,420 There's not one update system 831 00:39:06,420 --> 00:39:08,420 That may actually have pulled this off 832 00:39:08,420 --> 00:39:09,420 Windows update 833 00:39:09,420 --> 00:39:10,820 Everything else is probably hosed 834 00:39:11,460 --> 00:39:13,340 Adobe might be okay at this point 835 00:39:13,340 --> 00:39:14,380 Because they went through some headaches 836 00:39:15,780 --> 00:39:17,920 There's been some talk about windows update 837 00:39:17,920 --> 00:39:19,320 As far as I know 838 00:39:19,320 --> 00:39:22,000 There's no actual justification behind it 839 00:39:22,000 --> 00:39:23,520 But yeah those guys are pretty paranoid 840 00:39:23,520 --> 00:39:26,100 There is a paper called secure software updates 841 00:39:26,100 --> 00:39:27,460 Disappointments and new challenges 842 00:39:27,460 --> 00:39:29,000 By Belissimo Burgess and Fu 843 00:39:29,000 --> 00:39:30,120 It's a pretty good paper 844 00:39:30,120 --> 00:39:32,480 If you're interested in the subject I suggest you take a look 845 00:39:34,360 --> 00:39:35,080 Check this out 846 00:39:35,080 --> 00:39:37,740 This comes out two days after 847 00:39:37,740 --> 00:39:39,880 I announced there's a problem in DNS 848 00:39:40,600 --> 00:39:42,540 Package managers as Achilles heels 849 00:39:42,540 --> 00:39:44,460 It turns out all the linux auto updaters 850 00:39:44,460 --> 00:39:45,400 Are really really broken 851 00:39:46,240 --> 00:39:48,160 And someone said 852 00:39:48,160 --> 00:39:49,720 What keeps you up at night 853 00:39:49,720 --> 00:39:51,820 The thought of attacks on your package manager 854 00:39:52,360 --> 00:39:54,700 Or previously discussed and patched 855 00:39:54,700 --> 00:39:55,700 Vulnerability in DNS 856 00:39:56,900 --> 00:39:58,260 What is this or 857 00:39:58,260 --> 00:39:59,460 You speak of 858 00:39:59,460 --> 00:40:01,720 What I can only use one bug at a time 859 00:40:02,260 --> 00:40:04,280 DNS provides us with the management 860 00:40:04,360 --> 00:40:06,120 In the middle that we can then use 861 00:40:06,120 --> 00:40:08,020 To break broken package managers 862 00:40:08,700 --> 00:40:10,720 There's no competition between bugs 863 00:40:10,720 --> 00:40:13,160 In fact if you take two awesome bugs 864 00:40:13,160 --> 00:40:13,940 And combine them 865 00:40:13,940 --> 00:40:15,740 You get totally awesome bugs 866 00:40:18,180 --> 00:40:18,960 People say 867 00:40:18,960 --> 00:40:19,800 But SSL 868 00:40:20,320 --> 00:40:21,340 SSL will save us 869 00:40:22,640 --> 00:40:23,200 Alright 870 00:40:23,200 --> 00:40:24,880 Let's talk about SSL 871 00:40:24,880 --> 00:40:28,580 Because this is the first big test of SSL 872 00:40:28,580 --> 00:40:30,040 Has it stood up 873 00:40:30,040 --> 00:40:31,420 Because of the strength of its crypto 874 00:40:31,420 --> 00:40:33,080 Or has it stood up 875 00:40:34,360 --> 00:40:35,320 To be a man in the middle on it 876 00:40:35,320 --> 00:40:36,560 And thus just get around 877 00:40:36,560 --> 00:40:37,920 Whatever protections it offered 878 00:40:38,840 --> 00:40:39,840 Let's find out 879 00:40:39,840 --> 00:40:42,220 For SSL to be effective 880 00:40:42,220 --> 00:40:44,620 First of all you must actually use it 881 00:40:46,400 --> 00:40:47,840 It works better 882 00:40:47,840 --> 00:40:49,020 If you plug it in 883 00:40:49,020 --> 00:40:50,800 And the web does not plug it in 884 00:40:52,140 --> 00:40:54,140 SSL is not just kind of the exception 885 00:40:54,140 --> 00:40:56,360 It is barely existent 886 00:40:56,360 --> 00:40:57,860 On the internet right now 887 00:40:57,860 --> 00:40:59,520 How many executables 888 00:40:59,520 --> 00:41:01,220 Will you personally download 889 00:41:01,220 --> 00:41:02,840 Insecurely this week 890 00:41:04,360 --> 00:41:05,440 So hackers can pick and choose 891 00:41:05,440 --> 00:41:06,920 What domains to snipe 892 00:41:06,920 --> 00:41:08,420 So everything can be perfect 893 00:41:08,420 --> 00:41:10,360 Right until you hit that download link 894 00:41:10,360 --> 00:41:12,340 From the one server that provides those 895 00:41:12,340 --> 00:41:13,680 Downloadable executables 896 00:41:13,680 --> 00:41:15,720 And then you're going to the bad guy 897 00:41:16,640 --> 00:41:18,600 And you think people stopped using FTP 898 00:41:18,600 --> 00:41:19,580 I didn't 899 00:41:19,580 --> 00:41:22,340 FTP is still all over the place 900 00:41:23,680 --> 00:41:24,960 There's foreshadowing there 901 00:41:24,960 --> 00:41:26,000 I may not even go into it 902 00:41:27,460 --> 00:41:28,500 Second SSL 903 00:41:28,500 --> 00:41:30,040 You must never downgrade 904 00:41:30,040 --> 00:41:32,780 Too bad downgrade is a fundamental way 905 00:41:34,360 --> 00:41:35,100 To get SSL on the web 906 00:41:35,100 --> 00:41:38,080 You go to www.foo.com and http 907 00:41:38,080 --> 00:41:39,660 And the web server says 908 00:41:39,660 --> 00:41:42,020 You totally should have come to me 909 00:41:42,020 --> 00:41:43,420 Securely here 910 00:41:43,420 --> 00:41:44,880 Let me upgrade you to security 911 00:41:44,880 --> 00:41:45,980 Now everything is great 912 00:41:45,980 --> 00:41:47,420 You know what the bad guy does 913 00:41:47,420 --> 00:41:48,620 Not that 914 00:41:53,660 --> 00:41:54,160 Oh 915 00:41:54,160 --> 00:41:54,740 And 916 00:41:56,380 --> 00:41:57,200 SSL errors 917 00:41:57,740 --> 00:41:59,720 By the way I was just thinking 918 00:41:59,720 --> 00:42:00,720 I could tell you 919 00:42:00,720 --> 00:42:02,460 I know you wanted to have a secure link 920 00:42:04,360 --> 00:42:05,360 But it's not secure at all 921 00:42:05,360 --> 00:42:07,160 You still want to use this site 922 00:42:08,840 --> 00:42:09,320 Ok 923 00:42:10,780 --> 00:42:12,080 41% say 924 00:42:12,080 --> 00:42:13,800 They totally ignore the error 925 00:42:13,800 --> 00:42:14,860 And use the site anyway 926 00:42:14,860 --> 00:42:17,060 Thus obviating any of the value from security 927 00:42:17,060 --> 00:42:18,660 You might say but Dan 928 00:42:18,660 --> 00:42:21,540 43% get all worried and leave the site 929 00:42:21,540 --> 00:42:22,520 And won't deal with it 930 00:42:22,520 --> 00:42:24,020 Yeah that's what people say 931 00:42:24,020 --> 00:42:25,140 You know what people also do 932 00:42:25,140 --> 00:42:26,340 They lie a lot 933 00:42:28,160 --> 00:42:30,920 When you actually look at the data 934 00:42:31,920 --> 00:42:33,820 An online bank in New Zealand 935 00:42:34,360 --> 00:42:35,140 Has a certificate expire 936 00:42:35,140 --> 00:42:36,840 It just went down 937 00:42:36,840 --> 00:42:38,900 Like time ran out 938 00:42:38,900 --> 00:42:40,300 And you know what happened 939 00:42:42,060 --> 00:42:44,140 99.5% of users 940 00:42:44,140 --> 00:42:45,680 Still entered their credentials 941 00:42:45,680 --> 00:42:47,400 That one guy who didn't 942 00:42:47,400 --> 00:42:49,240 Is probably in the room right now 943 00:42:57,000 --> 00:42:59,720 Data suggests the DNS based attacker 944 00:42:59,720 --> 00:43:01,440 Has a remarkably high chance 945 00:43:01,440 --> 00:43:02,380 Of actually winning 946 00:43:04,360 --> 00:43:05,920 You must actually check 947 00:43:05,920 --> 00:43:07,220 To see if the certificate 948 00:43:07,220 --> 00:43:08,560 Is signed by someone 949 00:43:08,560 --> 00:43:09,740 Hey look guys 950 00:43:09,740 --> 00:43:11,280 I have a secure connection 951 00:43:11,280 --> 00:43:12,420 To the bad guy 952 00:43:15,980 --> 00:43:16,500 So 953 00:43:16,500 --> 00:43:19,800 I may be scanning the internet 954 00:43:19,800 --> 00:43:20,760 Every once in a while 955 00:43:20,760 --> 00:43:21,340 All the time 956 00:43:21,340 --> 00:43:21,840 Never stop 957 00:43:21,840 --> 00:43:25,280 I took a look at some SSL data 958 00:43:28,120 --> 00:43:30,040 327,467 SSL certificates 959 00:43:30,040 --> 00:43:30,760 Were scanned 960 00:43:30,760 --> 00:43:32,760 And I just took a look and said 961 00:43:34,360 --> 00:43:35,580 I want to see if the chain is valid 962 00:43:35,580 --> 00:43:36,760 All I want to see 963 00:43:36,760 --> 00:43:37,980 Is that they're even pretending 964 00:43:37,980 --> 00:43:40,140 To be signed by someone else 965 00:43:40,140 --> 00:43:41,180 Or if they're just saying 966 00:43:41,180 --> 00:43:42,160 Hi I'm me 967 00:43:42,160 --> 00:43:42,540 Why? 968 00:43:42,660 --> 00:43:44,000 Because I said so 969 00:43:48,280 --> 00:43:50,200 140,355 SSL certificates 970 00:43:50,200 --> 00:43:51,740 Because I say so 971 00:43:51,740 --> 00:43:53,060 That's not security 972 00:43:53,980 --> 00:43:54,900 Now you might say 973 00:43:54,900 --> 00:43:57,360 But Dan at least there's a browser error 974 00:43:57,360 --> 00:43:59,260 You know if legitimate use 975 00:43:59,260 --> 00:44:00,440 Has a browser error 976 00:44:00,440 --> 00:44:02,740 I think the user is always going to click through 977 00:44:03,260 --> 00:44:04,400 100% of the time 978 00:44:05,600 --> 00:44:06,400 And hey 979 00:44:06,400 --> 00:44:08,480 What about the things that are not browsers 980 00:44:08,480 --> 00:44:10,500 What about other applications 981 00:44:11,180 --> 00:44:13,280 So I was going to talk 982 00:44:13,280 --> 00:44:14,080 About other applications 983 00:44:14,080 --> 00:44:16,120 And then hey Mike why don't you come up here 984 00:44:17,220 --> 00:44:18,100 And then 985 00:44:18,100 --> 00:44:20,280 Then I started hearing about 986 00:44:20,280 --> 00:44:22,080 Someone who'd actually looked into 987 00:44:22,080 --> 00:44:23,160 Real applications 988 00:44:24,080 --> 00:44:25,960 Like SSL VPNs 989 00:44:25,960 --> 00:44:27,860 Now everyone this is Mike Zussman 990 00:44:29,260 --> 00:44:29,620 Hi Mike 991 00:44:31,540 --> 00:44:32,500 Somebody here 992 00:44:41,780 --> 00:44:42,740 Somebody here 993 00:44:43,700 --> 00:44:45,260 Forgot to submit to Defcon 994 00:44:46,780 --> 00:44:47,560 And I was like 995 00:44:47,560 --> 00:44:48,980 Yeah I'll go speak at Black Hat 996 00:44:48,980 --> 00:44:50,680 But oops I forgot Defcon 997 00:44:51,260 --> 00:44:52,460 So he's here now 998 00:44:52,460 --> 00:44:54,980 Because his work's too damn good not to be here 999 00:44:54,980 --> 00:44:56,220 But he's got a drink 1000 00:44:59,380 --> 00:45:00,100 Cheers 1001 00:45:08,380 --> 00:45:09,820 Alright Mike 1002 00:45:09,820 --> 00:45:11,100 Why don't you tell 1003 00:45:14,940 --> 00:45:15,660 Fail 1004 00:45:22,040 --> 00:45:24,880 So you know Mike a major other application 1005 00:45:24,880 --> 00:45:26,820 Are these SSL VPNs right 1006 00:45:26,820 --> 00:45:29,000 Why yes Dan they are 1007 00:45:29,260 --> 00:45:32,740 So Mike why don't you take a couple seconds 1008 00:45:32,740 --> 00:45:35,180 And tell us about how good SSL VPNs are 1009 00:45:35,180 --> 00:45:36,380 At actually checking the certificate 1010 00:45:37,000 --> 00:45:38,240 I would be glad to 1011 00:45:38,240 --> 00:45:40,800 And the answer is in general they are not 1012 00:45:41,740 --> 00:45:43,640 Some of them have the ability to 1013 00:45:43,640 --> 00:45:45,180 But usually it's an option 1014 00:45:45,180 --> 00:45:47,180 That can be turned on turned off 1015 00:45:47,180 --> 00:45:48,520 Pretty willy nilly 1016 00:45:49,060 --> 00:45:51,600 What these and the reason for that 1017 00:45:51,600 --> 00:45:53,260 Is if you're a company you're an enterprise 1018 00:45:53,260 --> 00:45:54,960 And you're evaluating an SSL VPN 1019 00:45:54,960 --> 00:45:56,700 You're not going to go buy your own cert 1020 00:45:56,700 --> 00:45:58,080 You're going to use a self signed cert 1021 00:45:58,080 --> 00:45:59,080 And you're going to test with it 1022 00:45:59,080 --> 00:46:01,000 Maybe once you actually get one in production 1023 00:46:01,600 --> 00:46:04,140 Maybe hopefully you'll buy a real one and use it 1024 00:46:04,580 --> 00:46:06,260 But I've seen cases where 1025 00:46:06,260 --> 00:46:07,540 That just hasn't happened 1026 00:46:07,540 --> 00:46:10,580 And these self signed certs just remain in use 1027 00:46:10,580 --> 00:46:11,100 In production 1028 00:46:12,780 --> 00:46:14,380 But that's not even the 1029 00:46:14,380 --> 00:46:16,960 The biggest problem with SSL VPNs 1030 00:46:16,960 --> 00:46:18,220 Just a little background on me 1031 00:46:18,220 --> 00:46:20,500 I worked for a company called Whale Communications 1032 00:46:20,500 --> 00:46:21,940 That made an SSL VPN 1033 00:46:22,520 --> 00:46:23,520 Got bought by Microsoft 1034 00:46:24,160 --> 00:46:26,320 And I parted ways with Microsoft 1035 00:46:26,700 --> 00:46:28,320 I don't know about a year and a half ago 1036 00:46:29,240 --> 00:46:30,180 Something like that 1037 00:46:30,670 --> 00:46:30,900 Anyway 1038 00:46:31,600 --> 00:46:33,820 So what these SSL VPNs do 1039 00:46:33,820 --> 00:46:36,460 These are web based SSL VPNs 1040 00:46:36,460 --> 00:46:38,320 They rely on ActiveX objects 1041 00:46:38,320 --> 00:46:40,200 To do everything 1042 00:46:40,700 --> 00:46:42,920 So the first time you log into an SSL VPN 1043 00:46:42,920 --> 00:46:45,080 You get a nice little ActiveX installed 1044 00:46:45,080 --> 00:46:46,400 You gotta click through all your warnings 1045 00:46:46,400 --> 00:46:47,680 You get it on there 1046 00:46:47,680 --> 00:46:48,740 And once it's on there 1047 00:46:49,340 --> 00:46:51,360 Well you don't get warned about anything anymore 1048 00:46:51,360 --> 00:46:54,740 That ActiveX object is used to upgrade other parts 1049 00:46:54,740 --> 00:46:56,020 Of the VPN client components 1050 00:46:56,700 --> 00:46:58,440 And do little cool things like 1051 00:46:58,440 --> 00:46:58,980 I don't know 1052 00:47:00,260 --> 00:47:01,380 Interface with Winsock 1053 00:47:01,380 --> 00:47:03,540 And reconfigure your network stack 1054 00:47:04,260 --> 00:47:06,060 And do lots of cool things like that 1055 00:47:06,060 --> 00:47:08,340 But then the one feature that always bothered me 1056 00:47:08,340 --> 00:47:09,580 About SSL VPNs 1057 00:47:10,480 --> 00:47:11,420 Customers would say hey 1058 00:47:11,420 --> 00:47:13,240 I actually worked on the support team 1059 00:47:13,240 --> 00:47:15,080 They'd say hey I'm configuring this application 1060 00:47:15,760 --> 00:47:18,300 And when the user clicks on the link in the web portal 1061 00:47:18,300 --> 00:47:20,000 I really just want the application 1062 00:47:20,000 --> 00:47:21,620 To launch automatically for the user 1063 00:47:23,140 --> 00:47:24,960 So what do we have there 1064 00:47:24,960 --> 00:47:26,340 We have a web page 1065 00:47:26,700 --> 00:47:28,560 That's telling a client to hey 1066 00:47:28,560 --> 00:47:30,560 Launch this arbitrary executable 1067 00:47:30,560 --> 00:47:32,180 And it's all passed down from the server 1068 00:47:32,700 --> 00:47:34,540 So what you have is a very interesting 1069 00:47:34,540 --> 00:47:36,340 Attack vector for repurposing 1070 00:47:36,340 --> 00:47:37,960 Of these ActiveX objects 1071 00:47:38,580 --> 00:47:40,380 Now you talk about site locking 1072 00:47:41,140 --> 00:47:42,900 Saying an ActiveX can only work 1073 00:47:42,900 --> 00:47:43,800 With a specific domain 1074 00:47:44,560 --> 00:47:46,840 Well that doesn't work for SSL VPNs 1075 00:47:46,840 --> 00:47:48,580 Because everybody has their own domain name 1076 00:47:48,580 --> 00:47:49,860 That can't be hard coded 1077 00:47:49,860 --> 00:47:51,520 You can't pass it down from the server 1078 00:47:51,520 --> 00:47:53,320 Because then an attacker can just spoof it anyway 1079 00:47:54,160 --> 00:47:55,960 So that just doesn't work 1080 00:47:56,700 --> 00:47:58,120 It can work if you 1081 00:47:58,900 --> 00:48:01,140 What the Microsoft product actually did 1082 00:48:01,140 --> 00:48:02,720 And I never saw any other 1083 00:48:03,800 --> 00:48:04,500 SSL VPN 1084 00:48:04,500 --> 00:48:05,460 Do this 1085 00:48:05,460 --> 00:48:07,400 It could be out there 1086 00:48:07,400 --> 00:48:08,300 I just haven't seen it 1087 00:48:09,300 --> 00:48:12,060 Is the first time the ActiveX is actually invoked 1088 00:48:12,060 --> 00:48:12,700 On the client 1089 00:48:13,960 --> 00:48:15,120 It'll prompt the user 1090 00:48:15,120 --> 00:48:18,320 It'll say hey this domain name is trying to use me 1091 00:48:18,320 --> 00:48:20,200 Do you want to let them use me 1092 00:48:20,200 --> 00:48:22,060 And execute commands on your machine 1093 00:48:22,060 --> 00:48:23,620 The error message is actually 1094 00:48:23,620 --> 00:48:25,460 Or the warning message is actually very specific 1095 00:48:26,700 --> 00:48:28,400 I can execute commands on your machine 1096 00:48:29,080 --> 00:48:30,800 So the user can then 1097 00:48:30,800 --> 00:48:32,340 Whitelist it for that domain only 1098 00:48:32,340 --> 00:48:33,900 So how do we get around that 1099 00:48:36,820 --> 00:48:37,340 DNS 1100 00:48:38,200 --> 00:48:38,720 Exactly 1101 00:48:38,720 --> 00:48:39,280 DNS 1102 00:48:39,280 --> 00:48:41,820 But fortunately we don't even have to worry about that 1103 00:48:41,820 --> 00:48:43,240 With most SSL VPN vendors 1104 00:48:43,240 --> 00:48:45,560 So what I demoed at Blackhat 1105 00:48:45,560 --> 00:48:48,960 And I'm really not here to slam a vendor 1106 00:48:48,960 --> 00:48:50,840 Because I actually had a very positive experience 1107 00:48:50,840 --> 00:48:51,560 With this vendor 1108 00:48:51,560 --> 00:48:53,340 And they were very appreciative 1109 00:48:53,340 --> 00:48:55,860 Of how I handled the situation 1110 00:48:57,100 --> 00:48:58,500 I basically knew 1111 00:48:58,500 --> 00:48:59,080 How 1112 00:49:00,540 --> 00:49:01,420 How these 1113 00:49:02,620 --> 00:49:04,120 VPN devices were made 1114 00:49:04,120 --> 00:49:06,560 So I figured well if I can just get my hands on another one 1115 00:49:07,220 --> 00:49:08,480 I'll find all these problems 1116 00:49:08,480 --> 00:49:10,640 So SonicWall happened to have a demo site 1117 00:49:11,240 --> 00:49:11,680 So 1118 00:49:13,180 --> 00:49:14,080 That's where I went 1119 00:49:14,080 --> 00:49:15,640 And started doing a little poking around 1120 00:49:15,640 --> 00:49:16,960 A little research and sure enough 1121 00:49:18,140 --> 00:49:20,020 Their base installer ActiveX 1122 00:49:20,020 --> 00:49:21,040 Likes to upgrade itself 1123 00:49:21,040 --> 00:49:24,060 And it likes to reach out to whatever website is invoking it 1124 00:49:24,060 --> 00:49:26,220 And download a nice little executable and run it for you 1125 00:49:26,860 --> 00:49:28,540 So we fixed that 1126 00:49:28,540 --> 00:49:30,700 SonicWall fixed it very quickly 1127 00:49:30,700 --> 00:49:31,980 They have patches available 1128 00:49:32,520 --> 00:49:34,640 And you know 1129 00:49:34,640 --> 00:49:35,500 It was a great experience 1130 00:49:35,500 --> 00:49:37,280 So props to SonicWall on that 1131 00:49:37,280 --> 00:49:38,060 Good company 1132 00:49:38,060 --> 00:49:39,600 Takes security seriously 1133 00:49:39,600 --> 00:49:41,120 You know everybody's got problems 1134 00:49:41,120 --> 00:49:42,100 But they're doing the right thing 1135 00:49:43,580 --> 00:49:46,380 So that's a little bit about SSL VPNs 1136 00:49:46,380 --> 00:49:47,700 But about a week ago 1137 00:49:47,700 --> 00:49:49,520 A week and a half ago before Blackhat 1138 00:49:49,520 --> 00:49:50,080 Hm? 1139 00:49:50,080 --> 00:49:50,120 Hm? 1140 00:49:51,980 --> 00:49:52,520 Nevermind 1141 00:50:01,680 --> 00:50:03,800 Who did you get a cert for? 1142 00:50:04,900 --> 00:50:06,380 Login.live.com 1143 00:50:06,380 --> 00:50:08,000 And how did you get it? 1144 00:50:08,280 --> 00:50:09,860 I placed an order on a 1145 00:50:09,860 --> 00:50:11,580 Big CA's website for it 1146 00:50:11,580 --> 00:50:13,080 He asked 1147 00:50:25,500 --> 00:50:26,000 And I got it 1148 00:50:26,000 --> 00:50:26,440 But don't worry 1149 00:50:26,440 --> 00:50:28,540 SSL will totally save us all 1150 00:50:33,560 --> 00:50:34,060 So 1151 00:50:35,660 --> 00:50:38,200 There are indeed a lot of things 1152 00:50:38,200 --> 00:50:39,880 You think I'm even done with SSL 1153 00:50:39,880 --> 00:50:40,820 Oh we can keep going 1154 00:50:41,360 --> 00:50:42,640 So check this out 1155 00:50:42,640 --> 00:50:45,860 There are actually a lot of SSL applications out there 1156 00:50:45,860 --> 00:50:46,500 Over web pages 1157 00:50:46,500 --> 00:50:48,060 And how do they authenticate? 1158 00:50:50,080 --> 00:50:50,580 Okay wait wait wait 1159 00:50:50,580 --> 00:50:52,080 We have secure cookies 1160 00:50:52,080 --> 00:50:54,120 That means they cannot be read 1161 00:50:55,420 --> 00:50:56,280 Over HTTP 1162 00:50:56,940 --> 00:50:59,700 It however turns out they can totally be written 1163 00:50:59,700 --> 00:51:00,680 Over HTTP 1164 00:51:00,680 --> 00:51:03,960 So you could have a user who is totally logged into 1165 00:51:03,960 --> 00:51:04,680 A web app 1166 00:51:04,680 --> 00:51:07,220 That is a totally perfect SSL web app 1167 00:51:07,220 --> 00:51:08,840 And there's another window in the background 1168 00:51:08,840 --> 00:51:09,380 That's just 1169 00:51:09,380 --> 00:51:11,680 Well I can't read that cookie 1170 00:51:11,680 --> 00:51:13,680 But maybe I can change it 1171 00:51:13,680 --> 00:51:16,160 Do you know how many applications are actually set up 1172 00:51:16,160 --> 00:51:18,660 To deal with someone else changing their cookie? 1173 00:51:20,080 --> 00:51:21,320 Are they changing some of their cookies? 1174 00:51:21,900 --> 00:51:22,420 Nothing 1175 00:51:25,320 --> 00:51:27,580 Who here has seen this error right here? 1176 00:51:27,700 --> 00:51:28,700 Maybe as a web developer 1177 00:51:29,820 --> 00:51:31,460 Who here hates this error? 1178 00:51:33,260 --> 00:51:35,580 You guys do realize if this error is here 1179 00:51:35,580 --> 00:51:36,860 What it's basically saying is 1180 00:51:36,860 --> 00:51:38,020 If you click yes 1181 00:51:38,020 --> 00:51:40,240 The page is not secure at all 1182 00:51:40,240 --> 00:51:41,680 In any way shape or form 1183 00:51:41,680 --> 00:51:44,520 You think that error message makes that clear? 1184 00:51:45,620 --> 00:51:46,140 Well 1185 00:51:46,140 --> 00:51:49,240 Why don't we take a look at the Firefox version of that error message 1186 00:51:50,080 --> 00:51:51,900 Which is a 10 pixel 1187 00:51:51,900 --> 00:51:53,980 Red line through a lock 1188 00:51:53,980 --> 00:51:54,600 Which says 1189 00:51:54,600 --> 00:51:56,920 Well it tried to be secure 1190 00:51:56,920 --> 00:51:57,940 But failed 1191 00:52:01,340 --> 00:52:02,420 Total fail 1192 00:52:03,640 --> 00:52:05,240 I do like this 1193 00:52:06,080 --> 00:52:07,280 So Flash 1194 00:52:07,280 --> 00:52:09,220 Has a call that says 1195 00:52:09,220 --> 00:52:10,840 Allow insecure domain 1196 00:52:10,840 --> 00:52:13,300 Not only does it have a call that says 1197 00:52:13,300 --> 00:52:14,480 Allow insecure domain 1198 00:52:14,480 --> 00:52:16,420 Which does completely break SSL 1199 00:52:16,420 --> 00:52:20,060 But it has a freaking manifesto 1200 00:52:20,060 --> 00:52:21,200 Against the call 1201 00:52:21,200 --> 00:52:22,640 On the Adobe site 1202 00:52:23,600 --> 00:52:25,340 Whoever this guy is 1203 00:52:25,340 --> 00:52:26,540 Is my freaking hero 1204 00:52:26,540 --> 00:52:28,900 I've written things like this 1205 00:52:28,900 --> 00:52:31,080 I never got anything like that published 1206 00:52:31,080 --> 00:52:32,280 That's legendary 1207 00:52:34,040 --> 00:52:34,980 Then there's 1208 00:52:34,980 --> 00:52:35,800 Why is this secure 1209 00:52:35,800 --> 00:52:37,360 The world's most depressing Google search 1210 00:52:37,360 --> 00:52:38,280 From about two years ago 1211 00:52:38,280 --> 00:52:40,120 There are all these financial websites 1212 00:52:40,120 --> 00:52:42,780 That have login forms that are hosted over HTTP 1213 00:52:42,780 --> 00:52:44,140 But you know 1214 00:52:46,420 --> 00:52:47,240 If you happen to put in credentials 1215 00:52:47,240 --> 00:52:50,540 They promise your credentials will be provided 1216 00:52:50,540 --> 00:52:52,760 Over SSL 1217 00:52:53,520 --> 00:52:54,700 And to make sure you know 1218 00:52:54,700 --> 00:52:55,280 That it's safe 1219 00:52:55,280 --> 00:52:56,900 Because there's no picture of a lock on the browser 1220 00:52:56,900 --> 00:52:58,800 They show you a picture of the lock 1221 00:52:59,980 --> 00:53:01,120 They all draw their own 1222 00:53:01,580 --> 00:53:02,400 It's so cute 1223 00:53:02,400 --> 00:53:04,560 I think this is what happened to pixel artists 1224 00:53:04,560 --> 00:53:06,280 They all went to make locks for bank websites 1225 00:53:08,340 --> 00:53:09,680 Yeah this doesn't work at all 1226 00:53:10,480 --> 00:53:12,200 Look engineers are very good 1227 00:53:12,200 --> 00:53:15,080 At engineering to the 99% case 1228 00:53:15,080 --> 00:53:16,400 And the 99% case 1229 00:53:16,420 --> 00:53:18,620 Of security is no attacker 1230 00:53:18,620 --> 00:53:20,520 So you see a lot of security 1231 00:53:20,520 --> 00:53:22,040 As long as there's no attacker 1232 00:53:23,800 --> 00:53:24,960 That's not useful 1233 00:53:24,960 --> 00:53:25,460 Guys 1234 00:53:27,040 --> 00:53:28,900 So we do live in the future 1235 00:53:28,900 --> 00:53:30,740 We've gone from 26% 1236 00:53:30,740 --> 00:53:32,240 Being vulnerable in 2006 1237 00:53:32,240 --> 00:53:34,320 To maybe about 5% in 2008 1238 00:53:34,320 --> 00:53:36,220 The financial sites are improving 1239 00:53:36,220 --> 00:53:37,520 Though they are not perfect 1240 00:53:39,340 --> 00:53:40,340 There's a good paper 1241 00:53:40,340 --> 00:53:42,040 Analyzing websites for user visible 1242 00:53:42,040 --> 00:53:43,300 Security design flaws 1243 00:53:43,300 --> 00:53:45,820 But there are still a lot of sites using the 1244 00:53:46,420 --> 00:53:46,780 Oh wait 1245 00:53:46,780 --> 00:53:48,440 We want to protect our users passwords 1246 00:53:48,440 --> 00:53:52,240 So we'll take the credential over SSL 1247 00:53:52,240 --> 00:53:54,800 And then switch back to HTTP for performance 1248 00:53:55,520 --> 00:53:56,780 This does not help 1249 00:53:56,780 --> 00:53:58,140 But people say 1250 00:53:58,140 --> 00:53:59,080 But wait okay Dan 1251 00:53:59,080 --> 00:54:01,180 These are all at other layers 1252 00:54:01,180 --> 00:54:03,920 At least the cryptos go to SSL 1253 00:54:05,440 --> 00:54:07,200 We're still using MD5 1254 00:54:08,780 --> 00:54:09,340 Okay 1255 00:54:09,920 --> 00:54:10,480 Seriously 1256 00:54:10,480 --> 00:54:12,660 For all the comments 1257 00:54:12,660 --> 00:54:14,260 About us knowing DNS 1258 00:54:14,260 --> 00:54:15,960 Has been broken for like 12 years 1259 00:54:16,420 --> 00:54:17,420 We've known 1260 00:54:18,380 --> 00:54:20,620 MD5 has been going to fail 1261 00:54:20,620 --> 00:54:22,080 For 12 years now 1262 00:54:22,080 --> 00:54:24,480 Hans Darberton did the math in 1996 1263 00:54:24,480 --> 00:54:26,100 And basically said yo 1264 00:54:26,100 --> 00:54:28,760 This is gonna break we need to stop using it 1265 00:54:28,760 --> 00:54:30,360 And the United States government said 1266 00:54:30,360 --> 00:54:32,520 Holy crap Hans you're totally right 1267 00:54:32,520 --> 00:54:33,220 And German 1268 00:54:33,220 --> 00:54:35,420 We totally do need to stop 1269 00:54:35,420 --> 00:54:36,800 Using MD5 1270 00:54:36,800 --> 00:54:38,980 And the federal government decertified it quickly 1271 00:54:38,980 --> 00:54:41,240 In fact I don't know why I say a decade later 1272 00:54:41,240 --> 00:54:42,400 It was like two years later 1273 00:54:42,400 --> 00:54:43,520 I gotta go fix that 1274 00:54:47,500 --> 00:54:49,320 Generation of collisions on MD5 1275 00:54:49,320 --> 00:54:50,260 A couple years ago 1276 00:54:50,260 --> 00:54:52,760 We actually have full on cloning attacks 1277 00:54:52,760 --> 00:54:54,900 Against the predecessor MD4 protocol 1278 00:54:54,900 --> 00:54:56,620 But we still use it 1279 00:54:56,620 --> 00:54:57,880 And use it and use it 1280 00:54:57,880 --> 00:54:59,460 Until the moment it blows up in our face 1281 00:54:59,460 --> 00:55:01,160 And then we're all gonna be surprised 1282 00:55:01,160 --> 00:55:03,660 I don't want anyone in this room 1283 00:55:03,660 --> 00:55:04,360 To be surprised 1284 00:55:04,360 --> 00:55:06,680 When MD5 fails miserably 1285 00:55:08,240 --> 00:55:09,280 Oh yeah 1286 00:55:09,280 --> 00:55:12,040 Anyone remember all certificates from Debian being bad 1287 00:55:13,020 --> 00:55:13,920 Oh oh yeah 1288 00:55:13,920 --> 00:55:15,660 People are saying no no no 1289 00:55:16,420 --> 00:55:17,280 This bug's not very good 1290 00:55:17,280 --> 00:55:19,080 Debian non-random number generator 1291 00:55:19,080 --> 00:55:20,120 That was the bug 1292 00:55:20,120 --> 00:55:22,320 There's no competition guys 1293 00:55:22,320 --> 00:55:25,920 We can totally use both bugs at the same time 1294 00:55:27,160 --> 00:55:27,840 Look 1295 00:55:28,420 --> 00:55:29,740 First you go ahead 1296 00:55:29,740 --> 00:55:30,640 You sweep the net 1297 00:55:30,640 --> 00:55:32,740 You find all the certificates out there 1298 00:55:32,740 --> 00:55:34,300 That were generated by Debian 1299 00:55:34,300 --> 00:55:37,040 By the way signed by legitimate certificate authorities 1300 00:55:37,040 --> 00:55:39,020 Don't worry about revocation 1301 00:55:39,020 --> 00:55:40,640 That doesn't actually exist 1302 00:55:40,640 --> 00:55:43,480 So all those public certificates 1303 00:55:43,480 --> 00:55:46,240 Can be then computed back to their private versions 1304 00:55:46,420 --> 00:55:48,580 And you can impersonate anyone 1305 00:55:48,580 --> 00:55:50,100 Because the CA did say 1306 00:55:50,100 --> 00:55:51,820 This was a valid certificate 1307 00:55:52,580 --> 00:55:54,460 But how do you get in the middle 1308 00:55:54,460 --> 00:55:56,860 DNS gets you in the middle 1309 00:55:56,860 --> 00:55:59,520 So you combine the Debian NRNG bug 1310 00:55:59,520 --> 00:56:00,680 With the new DNS flaw 1311 00:56:00,680 --> 00:56:02,420 And all of those sites 1312 00:56:02,420 --> 00:56:03,920 That were once using 1313 00:56:03,920 --> 00:56:05,500 A Debian generated cert 1314 00:56:05,500 --> 00:56:09,120 Are actually near unfixably vulnerable 1315 00:56:09,120 --> 00:56:10,120 For five years 1316 00:56:10,840 --> 00:56:12,020 How nice is that 1317 00:56:13,700 --> 00:56:14,300 So 1318 00:56:14,300 --> 00:56:16,380 We've known all these things about SSL 1319 00:56:16,420 --> 00:56:17,080 I know what you're saying 1320 00:56:17,080 --> 00:56:18,620 Oh this is all old stuff 1321 00:56:18,620 --> 00:56:19,220 Blah blah blah 1322 00:56:19,220 --> 00:56:25,300 Why do you think SSL certificates are valuable 1323 00:56:25,300 --> 00:56:27,060 Although you might not 1324 00:56:27,060 --> 00:56:28,140 Now that Mike's told everyone 1325 00:56:28,140 --> 00:56:28,960 You can just ask 1326 00:56:30,260 --> 00:56:32,420 But assuming you can't just ask 1327 00:56:33,440 --> 00:56:34,840 Anyone can buy a cert 1328 00:56:34,840 --> 00:56:36,600 Anyone can generate bits 1329 00:56:36,600 --> 00:56:38,220 What prevents any of you 1330 00:56:38,220 --> 00:56:38,780 Besides Mike 1331 00:56:38,780 --> 00:56:42,460 From generating a cert for www.microsoft.com 1332 00:56:43,340 --> 00:56:44,120 Well look 1333 00:56:44,120 --> 00:56:45,940 CAs sell bits 1334 00:56:46,420 --> 00:56:47,820 But there is some meaning 1335 00:56:48,340 --> 00:56:49,000 There's an identity 1336 00:56:49,000 --> 00:56:50,780 And they want to sell say 1337 00:56:50,780 --> 00:56:51,380 I don't know me 1338 00:56:51,380 --> 00:56:53,480 They want to sell me a cert for docspare.com 1339 00:56:53,480 --> 00:56:54,760 But not any of you 1340 00:56:54,760 --> 00:56:56,580 Well what's different between us 1341 00:56:56,580 --> 00:56:57,360 Well 1342 00:56:58,680 --> 00:57:00,180 They send me an email 1343 00:57:03,080 --> 00:57:04,480 So domain validation 1344 00:57:04,480 --> 00:57:05,480 The way it works 1345 00:57:05,480 --> 00:57:06,560 The way they make sure 1346 00:57:06,560 --> 00:57:08,480 That they give a certificate to the right person 1347 00:57:08,480 --> 00:57:10,640 Is first they look up the domain 1348 00:57:10,640 --> 00:57:12,820 And who is which requires a DNS lookup 1349 00:57:16,420 --> 00:57:17,680 Which requires another DNS lookup 1350 00:57:17,680 --> 00:57:20,240 Or they visit the web page and look for a file 1351 00:57:20,240 --> 00:57:23,040 Which requires maybe a third DNS lookup 1352 00:57:23,040 --> 00:57:24,760 Guess how secure 1353 00:57:24,760 --> 00:57:26,860 SSL certificate delivery is 1354 00:57:26,860 --> 00:57:28,060 In the face of a DNS attack 1355 00:57:28,060 --> 00:57:28,820 Not 1356 00:57:31,100 --> 00:57:32,500 Or at least it wouldn't be 1357 00:57:32,500 --> 00:57:34,580 If I hadn't spent the entire month of July 1358 00:57:34,580 --> 00:57:37,220 Taking calls from various random certificate authorities 1359 00:57:37,220 --> 00:57:38,120 Saying 1360 00:57:38,120 --> 00:57:40,640 How did you know who I was 1361 00:57:40,640 --> 00:57:43,060 And what is this I hear about a major attack 1362 00:57:43,740 --> 00:57:45,200 So Tom Albertson 1363 00:57:45,200 --> 00:57:45,760 Kelvin Yuen 1364 00:57:46,420 --> 00:57:46,840 The founder of Microsoft 1365 00:57:46,840 --> 00:57:48,420 I basically went to him and said 1366 00:57:48,420 --> 00:57:51,220 Guys I got a big problem with SSL 1367 00:57:51,220 --> 00:57:52,700 Can you get me emails 1368 00:57:52,700 --> 00:57:55,120 20 minutes later I have a spreadsheet 1369 00:57:55,120 --> 00:57:56,020 Sweet 1370 00:57:56,020 --> 00:57:57,860 So bear sign Komodo 1371 00:57:57,860 --> 00:57:58,940 Digisert Trustwave 1372 00:57:58,940 --> 00:58:02,660 Everyone went ahead evaluated whether they had a problem 1373 00:58:02,660 --> 00:58:04,000 Kept the whole thing secret 1374 00:58:04,760 --> 00:58:07,640 This stuff was actually figured out 1375 00:58:07,640 --> 00:58:08,860 This attack was figured out 1376 00:58:08,860 --> 00:58:11,060 About the night before my black hat talk 1377 00:58:12,140 --> 00:58:12,800 SSLshopper.com 1378 00:58:12,800 --> 00:58:15,000 And they basically said 1379 00:58:16,420 --> 00:58:17,740 The solution to this 1380 00:58:17,740 --> 00:58:19,580 Domain validation problem is 1381 00:58:19,580 --> 00:58:20,820 You should get 1382 00:58:20,820 --> 00:58:23,060 Extended validation certificates 1383 00:58:24,120 --> 00:58:26,380 Basically when your browser shows you 1384 00:58:26,380 --> 00:58:27,000 A big green bar 1385 00:58:28,160 --> 00:58:29,760 So here's the problem 1386 00:58:30,380 --> 00:58:32,340 Guys EV is just a display 1387 00:58:32,340 --> 00:58:32,880 Technology 1388 00:58:32,880 --> 00:58:36,120 That just shows you a greater level of security 1389 00:58:36,120 --> 00:58:37,920 It is not a code 1390 00:58:37,920 --> 00:58:39,340 Technology meaning 1391 00:58:39,340 --> 00:58:41,440 If you have two windows open 1392 00:58:41,440 --> 00:58:43,920 One for HBS colon slash 1393 00:58:43,920 --> 00:58:45,260 www.fu.com 1394 00:58:46,420 --> 00:58:48,040 The other for HBS 1395 00:58:48,040 --> 00:58:49,520 www.fu.com 1396 00:58:49,520 --> 00:58:50,680 Extended validated 1397 00:58:50,680 --> 00:58:52,940 The two windows can talk to each other 1398 00:58:52,940 --> 00:58:55,100 The first window can actually run code 1399 00:58:55,100 --> 00:58:56,200 Inside of the other 1400 00:58:56,200 --> 00:58:58,320 So extended validation does nothing 1401 00:58:58,320 --> 00:59:00,660 Against a domain validation attack 1402 00:59:01,260 --> 00:59:02,640 Maybe someday it will 1403 00:59:02,640 --> 00:59:04,840 But as Colin Jackson and Adam Barth showed us 1404 00:59:04,840 --> 00:59:05,820 Not today 1405 00:59:06,760 --> 00:59:08,200 You know what else is interesting 1406 00:59:08,200 --> 00:59:10,320 You know CAs have web interfaces 1407 00:59:10,320 --> 00:59:12,000 To manage previously issued certs 1408 00:59:12,000 --> 00:59:14,180 Web interfaces you have to sign into 1409 00:59:17,100 --> 00:59:19,980 When I told everyone in July 1410 00:59:19,980 --> 00:59:22,180 That the web was broken 1411 00:59:22,180 --> 00:59:24,240 I wasn't just talking 1412 00:59:24,240 --> 00:59:25,260 About its clients 1413 00:59:25,260 --> 00:59:28,260 No I was talking about servers too 1414 00:59:29,040 --> 00:59:30,240 Anyone confused 1415 00:59:30,240 --> 00:59:31,860 Who here doesn't see what's wrong 1416 00:59:32,860 --> 00:59:33,580 Anyone 1417 00:59:33,580 --> 00:59:35,300 That rock 1418 00:59:35,300 --> 00:59:36,600 Yeah check that out 1419 00:59:36,600 --> 00:59:38,420 Forgot my password 1420 00:59:38,420 --> 00:59:40,760 How does that actually work 1421 00:59:44,220 --> 00:59:45,920 So you've got some website 1422 00:59:45,920 --> 00:59:47,800 And you were supposed to have a password 1423 00:59:47,800 --> 00:59:49,320 But ah you might forget 1424 00:59:49,880 --> 00:59:51,560 And so you click forgot my password 1425 00:59:51,560 --> 00:59:52,820 And it sends you an email 1426 00:59:52,820 --> 00:59:54,600 But email is broken guys 1427 00:59:54,600 --> 00:59:57,400 It's really bad to have email broken 1428 00:59:57,840 --> 00:59:59,720 Because when you click forgot my password 1429 00:59:59,720 --> 01:00:00,600 And email is broken 1430 01:00:00,600 --> 01:00:02,480 There are three things that can happen 1431 01:00:02,480 --> 01:00:05,000 First sometimes you just get the password in the email 1432 01:00:05,000 --> 01:00:07,620 Which is great because people love sharing passwords 1433 01:00:07,620 --> 01:00:08,260 Between sites 1434 01:00:09,120 --> 01:00:11,160 Second you get a reset password link 1435 01:00:12,020 --> 01:00:13,100 You're gonna get in 1436 01:00:13,100 --> 01:00:15,080 But the victim will know 1437 01:00:16,480 --> 01:00:18,060 Occasionally there are additional protections 1438 01:00:18,060 --> 01:00:19,640 Where it asks for personal information 1439 01:00:19,640 --> 01:00:21,600 But number three is pretty rare 1440 01:00:21,600 --> 01:00:23,300 Number one and two are universal 1441 01:00:23,300 --> 01:00:25,200 And they always always work 1442 01:00:26,320 --> 01:00:28,260 So attacking forgot my password 1443 01:00:28,260 --> 01:00:29,660 Systems is just an email 1444 01:00:29,660 --> 01:00:31,760 Meaning it forces a look up to an attacker 1445 01:00:31,760 --> 01:00:32,540 Controlled name 1446 01:00:32,540 --> 01:00:35,060 You can actually create an account on a site 1447 01:00:35,660 --> 01:00:37,160 Forget your password 1448 01:00:37,770 --> 01:00:39,760 Get an email from the specific 1449 01:00:39,760 --> 01:00:41,620 Mail server that provides 1450 01:00:42,000 --> 01:00:43,800 Service for forget my password 1451 01:00:43,800 --> 01:00:46,280 The mail server will talk to its name server 1452 01:00:46,280 --> 01:00:47,780 The name server will talk to you 1453 01:00:47,780 --> 01:00:48,900 You alone com 1454 01:00:48,900 --> 01:00:51,040 You alone forgot my password 1455 01:00:51,040 --> 01:00:53,200 And every account behind that web application 1456 01:00:54,760 --> 01:00:56,360 It has been a long 1457 01:00:56,360 --> 01:00:57,880 Long month of July 1458 01:00:58,740 --> 01:00:59,220 So 1459 01:00:59,220 --> 01:01:01,420 I have spent all of July on the phone 1460 01:01:01,420 --> 01:01:03,280 With Google and Live and Yahoo and PayPal 1461 01:01:03,280 --> 01:01:05,120 And Ebay and Myspace and Facebook and LinkedIn 1462 01:01:05,120 --> 01:01:07,120 And Bebo, Craigslist, Live Journal, Hi5 1463 01:01:07,120 --> 01:01:10,000 And Citrix 1464 01:01:13,020 --> 01:01:13,540 So 1465 01:01:13,540 --> 01:01:16,260 This is very cool 1466 01:01:16,260 --> 01:01:18,040 That everyone fixed this issue 1467 01:01:18,040 --> 01:01:20,220 It would be nice if we had secure email 1468 01:01:20,220 --> 01:01:20,780 In 2008 1469 01:01:22,560 --> 01:01:24,000 Now I'm not going to say 1470 01:01:24,000 --> 01:01:24,820 I got everyone 1471 01:01:24,820 --> 01:01:26,440 Because there is like 1472 01:01:28,660 --> 01:01:30,280 170 million instances 1473 01:01:30,280 --> 01:01:31,480 Of forgot my password 1474 01:01:31,480 --> 01:01:32,440 Forgot your password 1475 01:01:32,440 --> 01:01:33,220 Or forgot password 1476 01:01:34,200 --> 01:01:35,200 But we did okay 1477 01:01:35,920 --> 01:01:37,460 And that's why it was so nice 1478 01:01:37,460 --> 01:01:39,140 To have such uptake on this bug 1479 01:01:40,240 --> 01:01:41,700 I was not going to be able 1480 01:01:41,700 --> 01:01:42,620 To be on the phone with everyone 1481 01:01:44,140 --> 01:01:44,620 So 1482 01:01:44,620 --> 01:01:46,760 Who here knows of OpenID 1483 01:01:48,600 --> 01:01:49,620 Anyone still think 1484 01:01:49,620 --> 01:01:51,140 OpenID was going to save the day 1485 01:01:52,080 --> 01:01:52,880 Yeah yeah yeah 1486 01:01:52,880 --> 01:01:54,720 Here's a conversation for OpenID 1487 01:01:54,720 --> 01:01:55,760 Hi I'm Fred 1488 01:01:55,760 --> 01:01:57,700 My friend can vouch for me 1489 01:01:57,700 --> 01:01:59,780 Then Stickus over here goes over 1490 01:01:59,780 --> 01:02:01,260 To the identity provider and says 1491 01:02:01,260 --> 01:02:03,140 Hey dude is that really Fred 1492 01:02:03,780 --> 01:02:05,440 Identity provider says sure is 1493 01:02:06,160 --> 01:02:07,740 Stickus says welcome to Stickus Fred 1494 01:02:10,000 --> 01:02:10,300 That would have helped 1495 01:02:10,300 --> 01:02:13,460 How did Stickus here 1496 01:02:13,860 --> 01:02:15,740 Find identity provider here 1497 01:02:15,740 --> 01:02:17,400 That's right 1498 01:02:18,000 --> 01:02:18,460 DNS 1499 01:02:24,360 --> 01:02:25,160 So 1500 01:02:25,160 --> 01:02:26,940 It gets worse 1501 01:02:27,780 --> 01:02:30,220 Crap this came out after my talk 1502 01:02:30,220 --> 01:02:31,740 So people were like well 1503 01:02:31,740 --> 01:02:34,500 Our secure OpenSSL 1504 01:02:34,500 --> 01:02:35,840 Our secure OpenID approach 1505 01:02:35,840 --> 01:02:37,220 Uses SSL 1506 01:02:37,220 --> 01:02:39,140 And SSL will save the day 1507 01:02:40,000 --> 01:02:40,520 Unfortunately 1508 01:02:40,520 --> 01:02:42,500 Ben Laurie went ahead and found 1509 01:02:42,500 --> 01:02:43,780 That a bunch of the OpenID providers 1510 01:02:43,780 --> 01:02:44,920 Were using SSL 1511 01:02:44,920 --> 01:02:47,840 With a Debian misgenerated certificate 1512 01:02:54,700 --> 01:02:56,420 This is a total 1513 01:02:56,420 --> 01:02:57,900 I will be the first to say 1514 01:02:57,900 --> 01:03:00,720 The DNS bug is a totally lame bug 1515 01:03:00,720 --> 01:03:02,820 But my god it seems good 1516 01:03:04,500 --> 01:03:05,140 So 1517 01:03:05,140 --> 01:03:07,120 Right about now you're probably thinking 1518 01:03:07,120 --> 01:03:09,560 Alright clients are hosed 1519 01:03:10,000 --> 01:03:11,340 Web 2.0 is hosed 1520 01:03:11,340 --> 01:03:13,060 But my intro webs are safe 1521 01:03:13,060 --> 01:03:14,880 Are they are they really 1522 01:03:14,880 --> 01:03:17,860 Well let us discuss the inconvenient 1523 01:03:17,860 --> 01:03:19,260 Matter of reverse DNS 1524 01:03:19,260 --> 01:03:21,280 We also own ARPA 1525 01:03:22,060 --> 01:03:23,880 Those are words I never thought I'd say 1526 01:03:23,880 --> 01:03:24,840 So 1527 01:03:26,280 --> 01:03:27,300 ARPA is the 1528 01:03:27,300 --> 01:03:28,940 In adder ARPA is the space 1529 01:03:28,940 --> 01:03:31,000 That when you look up 1.2.3.4 1530 01:03:31,000 --> 01:03:33,140 Returns abcd.com 1531 01:03:33,140 --> 01:03:34,780 Now what can you do with this 1532 01:03:34,780 --> 01:03:36,300 Well the obvious thing to do is 1533 01:03:36,300 --> 01:03:37,480 To spoof log entries in Apache 1534 01:03:37,480 --> 01:03:39,640 We've had bugs in this for a while 1535 01:03:39,640 --> 01:03:41,880 The Apache double reverse lookup log entry 1536 01:03:41,880 --> 01:03:43,000 Spoofing vulnerability 1537 01:03:43,000 --> 01:03:45,200 Apache basically gets an IP 1538 01:03:45,200 --> 01:03:47,820 Looks up a name and then makes sure the name 1539 01:03:47,820 --> 01:03:49,580 Goes back to that particular IP 1540 01:03:50,600 --> 01:03:51,880 Well you know what we control 1541 01:03:51,880 --> 01:03:54,060 Forward DNS we control backwards DNS 1542 01:03:54,060 --> 01:03:55,340 We just win 1543 01:03:55,340 --> 01:03:57,020 So if you're building a system 1544 01:03:57,020 --> 01:04:00,080 Do not just log the name that DNS 1545 01:04:00,080 --> 01:04:01,800 Tells you cause DNS can lie 1546 01:04:01,800 --> 01:04:04,160 Log the name log the IP 1547 01:04:04,160 --> 01:04:06,040 Address there's also some 1548 01:04:06,300 --> 01:04:08,400 Interesting possibilities if you can fake a numeric 1549 01:04:08,400 --> 01:04:10,260 TLD I don't know that this 1550 01:04:10,260 --> 01:04:12,160 Will work but I wonder if you can say that 1551 01:04:12,160 --> 01:04:14,200 6666 is in PTR 1552 01:04:14,200 --> 01:04:15,500 Is in reverse lookup 1553 01:04:15,500 --> 01:04:17,360 Of 1.2.3.4 1554 01:04:17,360 --> 01:04:19,780 Then it goes wait wait wait let me look up 1555 01:04:19,780 --> 01:04:22,240 1.2.3.4 and you know as an address 1556 01:04:23,140 --> 01:04:24,140 I'm gonna say 1557 01:04:24,140 --> 01:04:25,660 There's a .4 top level domain 1558 01:04:26,420 --> 01:04:28,260 And it's address is 6666 1559 01:04:28,260 --> 01:04:30,300 So you might actually get like log entries 1560 01:04:30,300 --> 01:04:31,960 That appear to have an IP address 1561 01:04:31,960 --> 01:04:34,240 That is just totally totally faked 1562 01:04:34,880 --> 01:04:36,280 Um you might say 1563 01:04:36,300 --> 01:04:38,240 But Dan this is probably stopped by client side 1564 01:04:38,240 --> 01:04:39,820 APIs never 1565 01:04:39,820 --> 01:04:42,120 Presume an API is ever smarter than it 1566 01:04:42,120 --> 01:04:44,220 Had to be to ship it rarely actually is 1567 01:04:45,360 --> 01:04:46,120 More reverse 1568 01:04:46,120 --> 01:04:48,100 DNS SQL or script 1569 01:04:48,100 --> 01:04:50,140 Injection via client targeted reverse DNS 1570 01:04:50,140 --> 01:04:52,320 Uh responses from reverse 1571 01:04:52,320 --> 01:04:53,940 DNS are often thrown into a database 1572 01:04:53,940 --> 01:04:56,160 We knew about this and the input 1573 01:04:56,160 --> 01:04:58,200 Is not necessarily sanitized 1574 01:04:58,200 --> 01:05:00,080 When put into the database but most 1575 01:05:00,080 --> 01:05:02,180 Name servers do some kind of sanity checking 1576 01:05:02,180 --> 01:05:03,960 But we have attacks that get around 1577 01:05:03,960 --> 01:05:06,080 Name servers we fake the name server 1578 01:05:06,300 --> 01:05:08,200 And the client libraries tend to suck 1579 01:05:08,200 --> 01:05:10,380 So we can go ahead and say 1580 01:05:10,380 --> 01:05:12,300 Oh hey uh you want to insert something 1581 01:05:12,300 --> 01:05:14,220 In your database uh uh you know 1582 01:05:14,220 --> 01:05:15,900 XP command how you doing 1583 01:05:16,500 --> 01:05:18,040 To be honest this is probably 1584 01:05:18,040 --> 01:05:19,900 Pretty unrealistic and painful to execute 1585 01:05:21,980 --> 01:05:23,800 Who here was at my talk last year 1586 01:05:26,520 --> 01:05:28,040 It all works again 1587 01:05:29,180 --> 01:05:29,660 So 1588 01:05:29,660 --> 01:05:32,020 Last year what I talked about was 1589 01:05:32,020 --> 01:05:34,020 How to use DN I need to get some beer here 1590 01:05:34,020 --> 01:05:34,940 My throat kind of hurts 1591 01:05:37,120 --> 01:05:37,980 Alright look 1592 01:05:39,790 --> 01:05:41,900 Last year my talk was all 1593 01:05:41,900 --> 01:05:43,960 About hey we have 1594 01:05:43,960 --> 01:05:45,980 The ability to get connections from 1595 01:05:45,980 --> 01:05:47,560 A web browser that are not actually 1596 01:05:47,560 --> 01:05:49,820 HTTP we have plugins 1597 01:05:49,820 --> 01:05:51,340 Flash and Java 1598 01:05:51,340 --> 01:05:53,940 That are giving us TCP and in 1599 01:05:53,940 --> 01:05:55,540 Java's case even UDP 1600 01:05:55,540 --> 01:05:57,520 Access to the networks that were on 1601 01:05:57,520 --> 01:05:58,440 Well 1602 01:05:59,100 --> 01:06:01,840 This I ended up using last year to build 1603 01:06:01,840 --> 01:06:03,920 Something of a VPN solution you come 1604 01:06:04,020 --> 01:06:05,700 To my network I get a VPN 1605 01:06:05,700 --> 01:06:07,380 Connection to yours we trade 1606 01:06:07,380 --> 01:06:08,640 It's great um 1607 01:06:08,640 --> 01:06:11,960 This was the bug last year everyone fixed 1608 01:06:11,960 --> 01:06:13,760 Flash fix this using 1609 01:06:13,760 --> 01:06:15,920 Cross domain dot XML loaded right 1610 01:06:15,920 --> 01:06:16,740 Off the IP address 1611 01:06:16,740 --> 01:06:19,940 Java fix this by looking in 1612 01:06:19,940 --> 01:06:20,540 Reverse DNS 1613 01:06:21,740 --> 01:06:22,520 Which we own 1614 01:06:22,520 --> 01:06:25,460 So we get all the good stuff now again 1615 01:06:25,460 --> 01:06:27,600 Um we get full TCP and 1616 01:06:27,600 --> 01:06:29,840 UDP access but from any browser in your 1617 01:06:29,840 --> 01:06:31,880 Organization to any host behind 1618 01:06:31,880 --> 01:06:33,440 The firewall bonus 1619 01:06:34,020 --> 01:06:35,880 Your link is fully IPsec 1620 01:06:35,880 --> 01:06:37,440 Authenticated and encrypted because 1621 01:06:37,440 --> 01:06:40,060 The web browser gets to play in full IPsec 1622 01:06:40,060 --> 01:06:41,920 Um you don't get to 1623 01:06:41,920 --> 01:06:43,920 Go ahead and communicate with 127.0.0.1 1624 01:06:43,920 --> 01:06:45,740 In general but you get everything else 1625 01:06:45,740 --> 01:06:48,520 John Heseman figured out how to get 127.0.0.1 1626 01:06:49,400 --> 01:06:49,920 Now 1627 01:06:49,920 --> 01:06:51,520 Spreading the fun um 1628 01:06:51,520 --> 01:06:53,760 If you have arbitrary socket access 1629 01:06:53,760 --> 01:06:55,740 You know what you can do if you have UDP port 1630 01:06:55,740 --> 01:06:57,800 53 to any IP address you can 1631 01:06:57,800 --> 01:06:59,860 Totally find other name servers behind the 1632 01:06:59,860 --> 01:07:01,380 Firewall and poison all of them too 1633 01:07:02,140 --> 01:07:03,060 Beyond that 1634 01:07:04,860 --> 01:07:05,800 Who here knows 1635 01:07:05,800 --> 01:07:07,300 About the SNMPv3 bug 1636 01:07:08,660 --> 01:07:10,080 Ah we didn't need to 1637 01:07:10,080 --> 01:07:11,680 Authenticate that router access 1638 01:07:11,680 --> 01:07:13,400 Anyway 256 1639 01:07:14,120 --> 01:07:15,820 Packets and you get into any router that 1640 01:07:15,820 --> 01:07:17,780 Sucks um so they fix 1641 01:07:17,780 --> 01:07:19,940 That sort of but you know what 1642 01:07:19,940 --> 01:07:21,780 Else you can do from Java at the web browser 1643 01:07:21,780 --> 01:07:24,180 Is you can spoof SNMPv3 1644 01:07:24,180 --> 01:07:25,960 Not spoof you can just say hey 1645 01:07:25,960 --> 01:07:27,640 I've got a message are you a router 1646 01:07:28,180 --> 01:07:28,740 Would you 1647 01:07:28,740 --> 01:07:32,000 Would you like me to authenticate into you 1648 01:07:32,000 --> 01:07:34,000 And reconfigure you so yeah 1649 01:07:34,020 --> 01:07:36,040 Things that are bad 1650 01:07:36,040 --> 01:07:38,080 Because of a stupid little DNS bug 1651 01:07:38,080 --> 01:07:41,020 DNS to Java Java to SNMPv3 1652 01:07:41,020 --> 01:07:42,780 SNMPv3 to more 1653 01:07:42,780 --> 01:07:43,140 Ownage 1654 01:07:45,520 --> 01:07:46,160 Alright 1655 01:07:46,160 --> 01:07:47,860 Alright enough with the client bugs 1656 01:07:47,860 --> 01:07:50,060 What about servers are they vulnerable 1657 01:07:51,320 --> 01:07:52,420 Interesting question 1658 01:07:52,420 --> 01:07:53,760 Which would you rather own 1659 01:07:53,760 --> 01:07:55,740 BGP or DNS 1660 01:07:57,260 --> 01:07:57,900 Ah 1661 01:07:57,900 --> 01:08:00,480 There's a four o'clock talk for the other half 1662 01:08:00,480 --> 01:08:01,880 So check it out right 1663 01:08:01,880 --> 01:08:04,000 Look I'm looking at BGP you know 1664 01:08:04,020 --> 01:08:05,680 I say BGP controls 1665 01:08:05,680 --> 01:08:08,000 The flow of packets already destined for 1666 01:08:08,000 --> 01:08:09,900 The internet two boxes on the same 1667 01:08:09,900 --> 01:08:11,380 Land cannot be attacked with BGP 1668 01:08:11,380 --> 01:08:13,500 Because BGP is a routing protocol 1669 01:08:13,780 --> 01:08:15,940 And two boxes on the land do not route 1670 01:08:15,940 --> 01:08:17,920 They use ARP to find one another 1671 01:08:18,580 --> 01:08:19,620 There's also no 1672 01:08:19,620 --> 01:08:21,960 Specificity in BGP you can't say 1673 01:08:21,960 --> 01:08:23,840 I only want packets from 1674 01:08:23,840 --> 01:08:25,920 Here and this particular 1675 01:08:25,920 --> 01:08:27,740 Session at this particular moment 1676 01:08:27,740 --> 01:08:30,120 And not from here you pretty much 1677 01:08:30,120 --> 01:08:31,840 Have to go all or nothing 1678 01:08:31,840 --> 01:08:33,600 At least in terms of network regions 1679 01:08:34,020 --> 01:08:35,920 And there's good amounts of 1680 01:08:35,920 --> 01:08:36,340 Visibility 1681 01:08:36,340 --> 01:08:39,600 People can see and log BGP announcements 1682 01:08:39,600 --> 01:08:40,660 Decent amount 1683 01:08:42,000 --> 01:08:43,820 DNS by contrast controls 1684 01:08:43,820 --> 01:08:45,680 Where packets are destined 1685 01:08:45,680 --> 01:08:46,700 On the first place 1686 01:08:46,700 --> 01:08:49,820 So the only reason those two boxes on the land 1687 01:08:49,820 --> 01:08:51,900 Used ARP and didn't route 1688 01:08:51,900 --> 01:08:54,000 Is because DNS told them 1689 01:08:54,000 --> 01:08:55,320 They were on the same land 1690 01:08:55,320 --> 01:08:57,660 And told them they didn't need to ARP 1691 01:08:57,660 --> 01:08:59,640 If your DNS is bad 1692 01:08:59,640 --> 01:09:02,020 Two boxes physically next to each other 1693 01:09:02,020 --> 01:09:03,240 Are going to route to each other 1694 01:09:04,020 --> 01:09:04,580 In the way of Malaysia 1695 01:09:07,760 --> 01:09:08,800 Beyond that 1696 01:09:08,800 --> 01:09:11,280 There's some specificity in DNS 1697 01:09:11,280 --> 01:09:13,700 You can say for each query 1698 01:09:13,700 --> 01:09:15,380 You set a TTL of zero 1699 01:09:15,380 --> 01:09:16,620 And you can choose 1700 01:09:17,220 --> 01:09:18,700 Connection by connection by connection 1701 01:09:18,700 --> 01:09:20,620 I want this one not that one 1702 01:09:20,620 --> 01:09:21,620 This one not that one 1703 01:09:21,620 --> 01:09:22,960 And here's how long I want it for 1704 01:09:22,960 --> 01:09:25,320 You get incredible amounts of control 1705 01:09:25,320 --> 01:09:27,600 Over just how much traffic you're going to hijack 1706 01:09:27,600 --> 01:09:29,300 And you have very low visibility 1707 01:09:29,300 --> 01:09:33,120 Because seriously nobody's looking at DNS traffic 1708 01:09:34,020 --> 01:09:35,300 Or at least nobody visibly 1709 01:09:36,680 --> 01:09:37,160 So 1710 01:09:37,160 --> 01:09:39,780 As I thought at Black Hat 1711 01:09:39,780 --> 01:09:42,220 DNS was obviously a better thing 1712 01:09:42,220 --> 01:09:43,680 To look at than BGP right 1713 01:09:44,720 --> 01:09:45,200 Yes 1714 01:09:45,200 --> 01:09:46,660 And then I met the guy 1715 01:09:47,480 --> 01:09:48,300 Here who's 1716 01:09:49,360 --> 01:09:51,460 Who's actually doing BGP pwnage 1717 01:09:51,460 --> 01:09:52,140 Here at DEF CON 1718 01:09:52,140 --> 01:09:54,740 And he kind of set me straight 1719 01:09:55,320 --> 01:09:56,360 He's like Dan 1720 01:09:56,360 --> 01:09:59,060 You know you can use BGP to hijack DNS traffic 1721 01:09:59,060 --> 01:10:00,400 And it totally gets around your patch 1722 01:10:01,800 --> 01:10:02,280 Yes 1723 01:10:04,020 --> 01:10:04,500 It totally works too 1724 01:10:04,500 --> 01:10:07,320 So there's a talk going on 1725 01:10:07,320 --> 01:10:08,820 Called stealing the internet no really 1726 01:10:08,820 --> 01:10:10,160 At 4pm in track 4 1727 01:10:10,160 --> 01:10:13,240 It only works if you have BGP connectivity 1728 01:10:13,860 --> 01:10:16,000 But do you trust everyone with BGP connectivity 1729 01:10:16,000 --> 01:10:18,000 I got some score for you 1730 01:10:18,000 --> 01:10:19,080 Pakistan 1 1731 01:10:19,080 --> 01:10:20,540 YouTube 0 1732 01:10:27,300 --> 01:10:29,200 So there is some difficulty 1733 01:10:29,200 --> 01:10:31,860 You cannot poison authoritative records 1734 01:10:31,860 --> 01:10:32,380 On servers 1735 01:10:32,380 --> 01:10:34,260 At least with the DNS rake attack 1736 01:10:34,260 --> 01:10:36,260 Now you can poison clients 1737 01:10:36,260 --> 01:10:38,600 You can have the client go ahead 1738 01:10:38,600 --> 01:10:40,120 And think that there's a record 1739 01:10:40,120 --> 01:10:41,180 That you're then going to own 1740 01:10:41,180 --> 01:10:42,620 But the server side 1741 01:10:42,620 --> 01:10:45,560 This is a cache poisoning attack 1742 01:10:46,120 --> 01:10:48,220 If a server is configured to be 1743 01:10:48,220 --> 01:10:49,740 The authoritative server for something 1744 01:10:49,740 --> 01:10:51,780 It's not loading it out of the cache 1745 01:10:51,780 --> 01:10:53,000 It knows the answer 1746 01:10:53,000 --> 01:10:54,980 Other caches come to it 1747 01:10:55,600 --> 01:10:56,120 So 1748 01:10:56,120 --> 01:10:58,500 There are places 1749 01:10:58,500 --> 01:10:59,620 There are a number of places 1750 01:10:59,620 --> 01:11:01,980 Where people are talking to only 1751 01:11:01,980 --> 01:11:04,280 Primaries or secondary authoritative servers 1752 01:11:04,280 --> 01:11:05,960 So there is a infrastructure 1753 01:11:05,960 --> 01:11:07,540 Called isolated split brain 1754 01:11:08,090 --> 01:11:09,900 Where individual desktops 1755 01:11:09,900 --> 01:11:12,180 Just never ever ever do DNS to the outside world 1756 01:11:12,180 --> 01:11:14,080 These things are really really safe 1757 01:11:14,080 --> 01:11:16,560 Active directory is pretty heavy on primaries 1758 01:11:16,560 --> 01:11:17,300 It's pretty safe 1759 01:11:17,300 --> 01:11:19,440 There's no cache to corrupt there for internal names 1760 01:11:20,480 --> 01:11:21,520 That's the big thing 1761 01:11:21,520 --> 01:11:24,560 Everyone is thinking about DNS cache poisoning 1762 01:11:24,560 --> 01:11:26,100 For like google.com 1763 01:11:26,120 --> 01:11:26,700 Yeah 1764 01:11:26,700 --> 01:11:28,720 Try your internal servers 1765 01:11:28,720 --> 01:11:30,900 It's the one time in history 1766 01:11:30,900 --> 01:11:32,520 That the flat names that windows use 1767 01:11:32,520 --> 01:11:34,020 Are actually a security benefit 1768 01:11:35,900 --> 01:11:38,220 Split brain environments are heavy on forwarders 1769 01:11:38,220 --> 01:11:39,180 Which are somewhat safe 1770 01:11:39,180 --> 01:11:41,460 Because you don't know the destination of the forwarder 1771 01:11:42,380 --> 01:11:42,940 However 1772 01:11:42,940 --> 01:11:45,680 If you have internal name servers 1773 01:11:45,680 --> 01:11:47,560 That are going out to the internet 1774 01:11:47,880 --> 01:11:49,840 That are going off to some public store 1775 01:11:49,840 --> 01:11:50,640 For names 1776 01:11:50,640 --> 01:11:51,540 There's no split brain 1777 01:11:51,540 --> 01:11:54,680 It's just on the internet you can get internal addresses 1778 01:11:56,120 --> 01:11:56,940 Game on 1779 01:11:56,940 --> 01:12:00,020 Because when it goes to the internet server 1780 01:12:00,020 --> 01:12:02,720 To find out what the internal company IP address is 1781 01:12:02,720 --> 01:12:03,880 That's not going to be 1782 01:12:03,880 --> 01:12:05,660 The internal company address anymore 1783 01:12:07,040 --> 01:12:08,220 So what can happen 1784 01:12:08,220 --> 01:12:09,580 When internal DNS goes bad 1785 01:12:09,880 --> 01:12:10,660 Oh my god 1786 01:12:12,080 --> 01:12:14,380 So network engineers have been awesome 1787 01:12:14,380 --> 01:12:14,700 Right 1788 01:12:14,700 --> 01:12:16,960 They've been complaining that the patch is slow 1789 01:12:16,960 --> 01:12:18,960 They've been complaining that 1790 01:12:20,400 --> 01:12:22,080 They've complained the patch is slow 1791 01:12:22,080 --> 01:12:24,300 They've complained the patch is hard 1792 01:12:24,300 --> 01:12:25,840 The patch conflicts with NAT 1793 01:12:26,120 --> 01:12:27,500 The patch is a pain in the ass 1794 01:12:27,500 --> 01:12:29,180 But what they haven't said is 1795 01:12:29,180 --> 01:12:30,720 We don't need to do this 1796 01:12:30,720 --> 01:12:31,480 You know why 1797 01:12:31,480 --> 01:12:34,700 Because they totally know how long they've been ignoring the security community 1798 01:12:35,260 --> 01:12:37,360 They know what kind of trouble they're in 1799 01:12:37,360 --> 01:12:39,240 That's why it got patched so much 1800 01:12:39,240 --> 01:12:41,820 So telnet behind the firewall 1801 01:12:41,820 --> 01:12:42,400 Oh yeah 1802 01:12:42,400 --> 01:12:44,080 SNMP behind the firewall 1803 01:12:44,080 --> 01:12:44,700 Yep 1804 01:12:44,700 --> 01:12:46,060 Authentication servers 1805 01:12:46,060 --> 01:12:48,480 You think that's your radius server you're talking about 1806 01:12:48,480 --> 01:12:48,860 No 1807 01:12:50,120 --> 01:12:51,160 Backup Restore 1808 01:12:56,120 --> 01:12:57,660 The address that is the next hop 1809 01:12:57,660 --> 01:12:59,420 For your internal data processing 1810 01:13:00,480 --> 01:13:01,500 Backend databases 1811 01:13:01,900 --> 01:13:04,140 This was a tweet by this guy Sean Moyer 1812 01:13:04,140 --> 01:13:05,240 Who was actually at Black Hat 1813 01:13:05,240 --> 01:13:06,340 He's like joking 1814 01:13:06,340 --> 01:13:09,340 He's like oh I think Dan was talking something about DSNs 1815 01:13:09,340 --> 01:13:11,220 Apparently Document found a way to hijack 1816 01:13:11,220 --> 01:13:13,040 Everyone's ODBC connections or something 1817 01:13:14,180 --> 01:13:15,160 Sean was joking 1818 01:13:15,160 --> 01:13:16,600 But that actually works too 1819 01:13:18,300 --> 01:13:19,060 I'm like sweet 1820 01:13:19,060 --> 01:13:21,160 I got another entry here 1821 01:13:21,160 --> 01:13:22,080 Awesome thanks man 1822 01:13:24,200 --> 01:13:26,020 I can't has your SQL query 1823 01:13:26,120 --> 01:13:27,000 Come up and grab a drink 1824 01:13:27,880 --> 01:13:29,160 Alright look 1825 01:13:29,160 --> 01:13:32,380 And even if internal DNS is hard to hit 1826 01:13:32,380 --> 01:13:34,980 External dependencies are totally fair game 1827 01:13:34,980 --> 01:13:35,780 Because there are 1828 01:13:35,780 --> 01:13:38,000 So many connections between companies 1829 01:13:38,000 --> 01:13:39,440 DNS controls 1830 01:13:39,440 --> 01:13:41,040 How servers find each other 1831 01:13:41,040 --> 01:13:43,180 Now that link might be secured 1832 01:13:44,080 --> 01:13:45,380 If SSL is used 1833 01:13:46,300 --> 01:13:48,220 Is anyone actually checking certificates 1834 01:13:48,220 --> 01:13:50,500 Because that ain't a 1835 01:13:50,500 --> 01:13:51,800 Friggin what is it not 1836 01:13:51,800 --> 01:13:53,220 Yeah that's not a browser 1837 01:13:53,220 --> 01:13:54,860 So it's probably not checking certs 1838 01:13:56,120 --> 01:13:56,780 I'm just saying that that's true 1839 01:13:57,700 --> 01:13:58,760 IPsec is great 1840 01:14:00,140 --> 01:14:02,120 People use IPsec to connect 1841 01:14:02,120 --> 01:14:02,860 Between networks 1842 01:14:02,860 --> 01:14:04,640 And IPsec rules are triggered 1843 01:14:04,640 --> 01:14:06,000 For particular routes 1844 01:14:06,000 --> 01:14:08,380 Routes are tied to IP addresses 1845 01:14:09,100 --> 01:14:11,200 DNS controls what IPs are used 1846 01:14:11,200 --> 01:14:12,220 If DNS is corrupt 1847 01:14:12,220 --> 01:14:15,680 You may not go over the VPN in the first place 1848 01:14:15,680 --> 01:14:17,420 DNS changes destination subnet 1849 01:14:17,420 --> 01:14:19,120 Therefore DNS can get around 1850 01:14:19,120 --> 01:14:20,340 IPsec validation 1851 01:14:24,380 --> 01:14:25,720 Ah so someone said 1852 01:14:26,120 --> 01:14:28,320 That's why you use X509 certificates 1853 01:14:28,320 --> 01:14:29,840 And pre-shared keys 1854 01:14:29,840 --> 01:14:31,840 I'd like to point out how practiced 1855 01:14:31,840 --> 01:14:33,600 A reply that was 1856 01:14:34,080 --> 01:14:35,800 Because everyone gets it wrong 1857 01:14:36,900 --> 01:14:37,420 So 1858 01:14:37,980 --> 01:14:38,500 Um 1859 01:14:39,200 --> 01:14:40,760 Ultimate external dependencies 1860 01:14:40,760 --> 01:14:42,760 Payment processing or offsite backup 1861 01:14:42,760 --> 01:14:45,040 Now is not a good time to have an insecure 1862 01:14:45,040 --> 01:14:46,100 Link to your offsite stores 1863 01:14:46,100 --> 01:14:47,640 I'm not saying anyone does 1864 01:14:47,640 --> 01:14:49,380 But if there's a scintilla of a chance 1865 01:14:49,380 --> 01:14:50,060 Patch patch patch 1866 01:14:50,900 --> 01:14:52,600 SNMP into the ink against the internet 1867 01:14:56,380 --> 01:14:57,920 You're probably using 1868 01:14:57,920 --> 01:14:59,280 DNS to find them 1869 01:14:59,280 --> 01:15:01,360 If you would like to not provide 1870 01:15:01,360 --> 01:15:03,780 The SNMP community strings and access codes 1871 01:15:03,780 --> 01:15:05,020 To the outside world 1872 01:15:05,020 --> 01:15:07,340 You might want to make sure your DNS is fixed 1873 01:15:08,000 --> 01:15:09,800 Also you're parsing 1874 01:15:09,800 --> 01:15:11,800 ASN1 from the outside world 1875 01:15:11,800 --> 01:15:13,680 One of the things we learned in 2002 1876 01:15:13,680 --> 01:15:15,820 Which is one of the last big patching efforts 1877 01:15:15,820 --> 01:15:17,120 ASN1 parse 1878 01:15:17,120 --> 01:15:19,600 ASN1 is probably the world's most miserable protocol 1879 01:15:19,600 --> 01:15:20,380 In the world to parse 1880 01:15:21,780 --> 01:15:23,540 Servers might have gotten locked down 1881 01:15:23,540 --> 01:15:26,100 But this is the third age. Your clients better be 1882 01:15:26,120 --> 01:15:26,540 Good too 1883 01:15:27,480 --> 01:15:29,720 Search engine optimization is always fun 1884 01:15:29,720 --> 01:15:31,340 There's search engine optimization 1885 01:15:31,340 --> 01:15:33,580 And then there's owning Google's DNS 1886 01:15:34,600 --> 01:15:35,200 Yeah 1887 01:15:35,200 --> 01:15:37,880 And then who here has ever put files 1888 01:15:37,880 --> 01:15:40,060 On a content distribution network out of curiosity 1889 01:15:40,060 --> 01:15:41,240 Um 1890 01:15:41,240 --> 01:15:43,680 Like Akamai or Limelight 1891 01:15:43,680 --> 01:15:45,860 You ever wonder how that actually happens 1892 01:15:45,860 --> 01:15:47,660 Where they get the data in the first place 1893 01:15:47,660 --> 01:15:50,000 Well you provide the CDN and HTTP 1894 01:15:50,000 --> 01:15:50,400 URL 1895 01:15:51,340 --> 01:15:52,580 Which uses DNS 1896 01:15:52,580 --> 01:15:55,400 Pulls down data and hosts it to the internet 1897 01:15:56,120 --> 01:15:57,820 Which would be really really really bad 1898 01:15:57,820 --> 01:16:00,640 If Akamai or any of the other content distribution networks 1899 01:16:00,640 --> 01:16:02,240 Had bad DNS 1900 01:16:03,560 --> 01:16:04,280 So 1901 01:16:04,280 --> 01:16:07,260 It has been an interesting ride 1902 01:16:07,260 --> 01:16:08,560 Through what a stupid 1903 01:16:08,560 --> 01:16:09,260 Lame 1904 01:16:10,100 --> 01:16:11,600 I'm the first to say 1905 01:16:11,900 --> 01:16:14,380 This bug should not nearly be 1906 01:16:14,640 --> 01:16:16,540 As interesting as it actually is 1907 01:16:16,540 --> 01:16:18,360 The reason this bug is interesting 1908 01:16:18,360 --> 01:16:20,580 Is because everything else is hosed 1909 01:16:21,720 --> 01:16:22,440 So 1910 01:16:22,440 --> 01:16:23,260 Summary 1911 01:16:23,260 --> 01:16:25,120 DNS servers had a core bug 1912 01:16:26,300 --> 01:16:28,340 The bug works even when the host 1913 01:16:28,340 --> 01:16:29,080 Is behind a firewall 1914 01:16:29,080 --> 01:16:31,480 There are enough variants of the bug 1915 01:16:31,480 --> 01:16:33,020 That we needed a stop gap 1916 01:16:33,020 --> 01:16:34,680 Before working on something more complete 1917 01:16:34,680 --> 01:16:36,920 Industry rallied pretty ridiculously 1918 01:16:36,920 --> 01:16:38,180 To do something about this 1919 01:16:38,180 --> 01:16:39,400 With hundreds of millions protected 1920 01:16:39,400 --> 01:16:42,560 DNS clients are at risk in certain circumstances 1921 01:16:42,560 --> 01:16:44,760 But we're really focusing on servers for now 1922 01:16:45,920 --> 01:16:46,980 We are entering 1923 01:16:46,980 --> 01:16:49,400 Or perhaps holding back for a little longer 1924 01:16:49,400 --> 01:16:51,200 A third age of security research 1925 01:16:51,200 --> 01:16:53,520 Where all network apps are fair game 1926 01:16:53,880 --> 01:16:55,180 Where the online games 1927 01:16:56,120 --> 01:16:56,280 Are at risk 1928 01:16:56,280 --> 01:16:57,880 Where the instant messengers are at risk 1929 01:16:57,880 --> 01:17:00,480 Where IRC is at risk in the real world 1930 01:17:00,480 --> 01:17:01,940 Auto update itself 1931 01:17:01,940 --> 01:17:03,460 Which is all over the place 1932 01:17:03,460 --> 01:17:06,980 Is repeatedly being done really really badly 1933 01:17:07,940 --> 01:17:10,000 SSL which is supposed to save the day 1934 01:17:10,000 --> 01:17:11,720 Every time you look at it 1935 01:17:11,720 --> 01:17:13,040 It shoots itself in the face 1936 01:17:15,280 --> 01:17:15,880 The 1937 01:17:16,620 --> 01:17:17,820 In fact 1938 01:17:17,820 --> 01:17:19,140 SSL search themselves 1939 01:17:19,140 --> 01:17:21,000 Are dependent on DNS 1940 01:17:22,200 --> 01:17:23,860 DNS bugs ended up creating 1941 01:17:23,860 --> 01:17:25,280 Something of a skeleton key 1942 01:17:26,120 --> 01:17:26,880 All major websites 1943 01:17:26,880 --> 01:17:29,060 Despite independent implementations 1944 01:17:29,060 --> 01:17:31,340 Internal networks are not excluded 1945 01:17:31,340 --> 01:17:33,640 Because the only thing that keeps things internal 1946 01:17:33,640 --> 01:17:34,360 Is DNS 1947 01:17:34,360 --> 01:17:36,520 And from the effects of Java 1948 01:17:36,520 --> 01:17:39,440 Hey look we get full TCP and UDP access 1949 01:17:39,440 --> 01:17:40,860 Back behind the firewall again 1950 01:17:40,860 --> 01:17:43,160 Your firewalls aren't doing much right now either 1951 01:17:44,180 --> 01:17:45,300 So finally 1952 01:17:45,300 --> 01:17:47,200 We're not even populating CDNs 1953 01:17:47,200 --> 01:17:49,640 How do you think everything else is going 1954 01:17:49,640 --> 01:17:52,200 So that's kind of what this talk has been about 1955 01:17:52,200 --> 01:17:53,200 And that's why 1956 01:17:53,200 --> 01:17:54,400 I did a month 1957 01:17:56,120 --> 01:17:56,380 Of stuff 1958 01:17:56,380 --> 01:17:58,600 There were some people that said it was a lot of hype 1959 01:17:58,600 --> 01:18:00,040 And you know what 1960 01:18:00,040 --> 01:18:01,420 There was a lot of noise 1961 01:18:01,420 --> 01:18:03,140 Because oh my god 1962 01:18:03,140 --> 01:18:04,140 People needed a patch 1963 01:18:04,140 --> 01:18:07,380 They actually really truly did need to patch 1964 01:18:07,380 --> 01:18:09,760 All I said is there was a bug 1965 01:18:09,760 --> 01:18:11,600 People called BS on me 1966 01:18:11,600 --> 01:18:13,060 This was my reply 1967 01:18:14,180 --> 01:18:14,940 Lessons learned 1968 01:18:16,060 --> 01:18:18,280 We've got to get better at fixing infrastructure 1969 01:18:18,760 --> 01:18:20,640 We got really lucky with this bug 1970 01:18:20,640 --> 01:18:22,460 We had an amazing number of people 1971 01:18:22,460 --> 01:18:23,200 Well not just me 1972 01:18:26,560 --> 01:18:27,040 But the whole world 1973 01:18:27,040 --> 01:18:28,480 If you look at the actual hours 1974 01:18:28,480 --> 01:18:29,660 That I spent on this 1975 01:18:29,660 --> 01:18:32,400 Versus all the IT administrators in the world 1976 01:18:32,400 --> 01:18:34,780 Even the companies that wrote the patch 1977 01:18:34,780 --> 01:18:37,760 If I had .001% of the hours invested 1978 01:18:37,760 --> 01:18:39,600 I would be shocked and appalled 1979 01:18:41,300 --> 01:18:43,580 Everyone came together to fix this thing 1980 01:18:43,580 --> 01:18:44,940 This time 1981 01:18:44,940 --> 01:18:47,440 But the next bug is not going to be this smooth 1982 01:18:47,440 --> 01:18:48,140 Because frankly 1983 01:18:48,140 --> 01:18:50,480 There's just going to be so many more people involved 1984 01:18:50,960 --> 01:18:52,960 Because it's not going to be the kind of thing 1985 01:18:52,960 --> 01:18:54,340 That can be kept secret for this long 1986 01:18:54,960 --> 01:18:56,100 We need to have 1987 01:18:56,120 --> 01:18:57,640 Disaster recovery plans 1988 01:18:57,640 --> 01:19:00,620 That include how to handle the discovery of a flaw 1989 01:19:00,620 --> 01:19:02,500 In any mission critical code 1990 01:19:02,500 --> 01:19:03,120 Anywhere 1991 01:19:03,120 --> 01:19:05,400 We need to have bosses that say 1992 01:19:05,400 --> 01:19:07,300 Your router may get owned 1993 01:19:07,880 --> 01:19:09,940 And you have 24 hours to patch 1994 01:19:09,940 --> 01:19:12,380 And you have to know how that's going to work 1995 01:19:12,380 --> 01:19:14,440 And if you need to re-architect things 1996 01:19:14,440 --> 01:19:15,340 You need to 1997 01:19:15,340 --> 01:19:18,120 Look, serviceability is survivability 1998 01:19:18,920 --> 01:19:21,060 And no one has ever made the link 1999 01:19:21,060 --> 01:19:21,520 That says 2000 01:19:21,860 --> 01:19:24,620 How serviceable a network is 2001 01:19:24,620 --> 01:19:26,100 Is a major secret 2002 01:19:26,120 --> 01:19:26,540 Is a major selling point 2003 01:19:26,540 --> 01:19:29,160 Is a major metric for the quality of a system 2004 01:19:29,160 --> 01:19:30,560 It's not about 2005 01:19:30,560 --> 01:19:32,500 How the network works 2006 01:19:32,500 --> 01:19:33,700 When things are going right 2007 01:19:33,700 --> 01:19:35,540 It's about how the network works 2008 01:19:35,540 --> 01:19:37,200 When things are going wrong 2009 01:19:37,200 --> 01:19:39,260 And serviceability is ultimately 2010 01:19:39,260 --> 01:19:41,660 The measure of software flaw survivability 2011 01:19:41,660 --> 01:19:43,340 We also know 2012 01:19:43,340 --> 01:19:45,240 That cooperation across cost competitors 2013 01:19:45,240 --> 01:19:47,560 Researchers and by the way government 2014 01:19:47,560 --> 01:19:49,300 Can indeed be very productive 2015 01:19:49,300 --> 01:19:52,140 When you have 120 million users protected 2016 01:19:52,140 --> 01:19:54,320 From just one of the providers 2017 01:19:56,120 --> 01:19:56,760 That's pretty cool 2018 01:19:58,840 --> 01:20:00,060 A lot of people 2019 01:20:00,060 --> 01:20:01,880 Do not realize the degree to which 2020 01:20:01,880 --> 01:20:04,280 People have been ignoring security research 2021 01:20:04,280 --> 01:20:05,620 And security guidance 2022 01:20:06,260 --> 01:20:07,300 You and I know 2023 01:20:07,300 --> 01:20:08,900 What people should be doing 2024 01:20:08,900 --> 01:20:11,000 But my god there's a lot of crap out there 2025 01:20:11,000 --> 01:20:12,240 If you actually look 2026 01:20:12,240 --> 01:20:14,740 As Mike Zussman actually looked 2027 01:20:15,900 --> 01:20:17,800 His talk should not be a big deal 2028 01:20:17,800 --> 01:20:19,940 His talk should have been known for years 2029 01:20:20,680 --> 01:20:21,160 But 2030 01:20:21,160 --> 01:20:22,400 I was shocked 2031 01:20:23,420 --> 01:20:25,320 So we're doing a lot of things insecurely 2032 01:20:26,120 --> 01:20:27,760 There are a lot of scenarios 2033 01:20:27,760 --> 01:20:29,320 In which unencrypted IP traffic 2034 01:20:29,320 --> 01:20:30,300 Is lost to the attacker 2035 01:20:30,740 --> 01:20:32,720 There is no saving the internet 2036 01:20:32,720 --> 01:20:35,060 There is postponing the inevitable 2037 01:20:35,060 --> 01:20:36,180 For a little longer 2038 01:20:36,180 --> 01:20:37,620 And every one of you 2039 01:20:37,620 --> 01:20:40,100 As a security person in this field 2040 01:20:40,100 --> 01:20:41,420 Get out there 2041 01:20:41,420 --> 01:20:42,980 Get people to fix their stuff 2042 01:20:42,980 --> 01:20:44,960 It's the only thing we can possibly do to help 2043 01:20:44,960 --> 01:20:46,520 And that's what I've got 2044 01:20:46,520 --> 01:20:48,460 At least that's what I've said for now