1 00:00:00,000 --> 00:00:09,760 Okay, hi everybody. I'm Roger Dingledine, the project leader for the Tor project, and I'm going to tell you a little bit about attacks and vulnerabilities on Tor, past, present, and future. 2 00:00:10,260 --> 00:00:13,800 There are sort of three categories to what I'm going to talk to you about today. 3 00:00:14,000 --> 00:00:18,600 One of them are solved and solvable problems. A lot of them are code problems or implementation problems. 4 00:00:18,840 --> 00:00:27,240 The sort of thing where we look at that and say, hey, wait a minute, that line right there means that Tor doesn't provide any security or anonymity or privacy at all. Wait a minute. 5 00:00:27,240 --> 00:00:32,340 So we've got some samples of those to give you some idea of how we've screwed up in the past. 6 00:00:32,500 --> 00:00:41,420 We also have some tough ongoing practical issues, things like application level vulnerabilities and all sorts of ways that using real live applications can screw you. 7 00:00:41,560 --> 00:00:50,160 And then we've got some research things in terms of the academic community coming up with ways to attack Tor and some pretty esoteric but some pretty effective ways. 8 00:00:50,340 --> 00:00:53,980 And then a few thoughts on where we're going to have problems down the road. 9 00:00:54,180 --> 00:00:56,920 So how many people here already know how Tor works? 10 00:00:59,620 --> 00:01:05,520 Perfect. Okay. So I'm going to give you a very brief crash course on how it works, and then we can go into some more details. 11 00:01:05,760 --> 00:01:14,660 So it's a free software program. Tor is an anonymity system. It's a program that you install on your computer, and it takes care of providing anonymity or privacy to you. 12 00:01:14,740 --> 00:01:22,960 So somebody watching you locally can't figure out where you're going, and somebody watching the website or IM system you're connecting to can't figure out where you're coming from. 13 00:01:23,200 --> 00:01:27,060 So it's open source, no patents. It comes with a full specification. 14 00:01:27,240 --> 00:01:35,360 And documentation, which means that other groups have built their own compatible Tor clients out there, and we'll see in a few slides that that's really come in handy. 15 00:01:35,520 --> 00:01:45,680 We've got about 1,500 relays all around the world relaying traffic for some number of users, probably somewhere between 100,000 and 500,000 Tor clients are running right now. 16 00:01:46,400 --> 00:01:55,380 As of the end of 2006, we're an official 501c3 U.S. nonprofit, which means that we've grown a little bit, we've got some funders from a variety of places. 17 00:01:55,380 --> 00:02:01,140 There are seven people being paid to work on Tor right now, which is pretty cool, because in April we had three people. 18 00:02:01,300 --> 00:02:03,660 So we'll see how we keep growing at that point. 19 00:02:04,460 --> 00:02:15,760 So we also, in addition to those seven people, have maybe 50 or 100 people who spend more than an hour a day just helping out with the community or running relays or answering questions, that sort of thing. 20 00:02:15,880 --> 00:02:21,960 We started out funded from the Naval Research Lab, and then we were funded by the Electronic Frontier Foundation for a year. 21 00:02:22,080 --> 00:02:25,360 So our claim to fame is that we're the only project funded by both the Naval Research Lab and the Electronic Frontier Foundation for a year. 22 00:02:25,380 --> 00:02:29,920 Since then, we've been funded by both the DOD and the EFF for the same free software privacy system. 23 00:02:30,320 --> 00:02:35,360 Since then, we've been funded by another U.S. government group called the International Broadcasting Bureau. 24 00:02:35,600 --> 00:02:39,680 They're the folks who run Voice of America and Radio Free Europe and Cuba and so on. 25 00:02:39,820 --> 00:02:45,420 They've got some websites that some folks in the world can't reach, and they'd like to fix that, and we sure wouldn't mind fixing that. 26 00:02:46,880 --> 00:02:51,420 So when I talk to my parents, I say that I'm working on privacy systems. 27 00:02:51,680 --> 00:02:54,900 When I'm talking to Google and Walmart, I say that I'm working on 28 00:02:55,380 --> 00:02:57,540 business security or communication security systems. 29 00:02:57,740 --> 00:03:01,140 When I'm talking to governments, they think anonymity is dumb. 30 00:03:01,280 --> 00:03:02,600 They think privacy is irrelevant. 31 00:03:02,980 --> 00:03:06,800 But they really do need traffic analysis resistant communication networks. 32 00:03:07,200 --> 00:03:11,440 So part of the fun here is trying to explain to each of the different groups 33 00:03:12,020 --> 00:03:16,940 what Tor is for them and phrasing it in terms of security properties that they're looking for. 34 00:03:17,120 --> 00:03:20,540 And we have another category we've added recently, which is blocked users, 35 00:03:20,660 --> 00:03:24,900 people in China or Iran or behind various firewalls all around. 36 00:03:24,900 --> 00:03:30,400 And if they can't reach the Tor network, who cares how good the Tor network's anonymity is? 37 00:03:30,540 --> 00:03:34,080 And if they can't actually get to CNN or VOA or other sites, 38 00:03:34,260 --> 00:03:38,740 then they can't learn or post what they'd like to learn or post on the Internet. 39 00:03:38,980 --> 00:03:42,740 So there are a lot of people who are not using Tor for the anonymity properties, 40 00:03:42,980 --> 00:03:44,900 but rather for the reachability properties. 41 00:03:45,100 --> 00:03:48,460 They want to be able to get to the websites that they were able to get to last time. 42 00:03:48,660 --> 00:03:50,040 So how do you build one of these? 43 00:03:50,140 --> 00:03:54,040 The easy answer is you put a relay somewhere and everybody relays through it. 44 00:03:54,080 --> 00:03:54,540 Alice won. 45 00:03:54,900 --> 00:03:57,440 Alice two, Alice three all show up and say, give me this website. 46 00:03:57,700 --> 00:03:59,960 And the relay fetches them and sends it back. 47 00:04:00,120 --> 00:04:03,500 And that's great. But what if there's a bad guy anywhere in the system? 48 00:04:03,620 --> 00:04:05,680 Maybe there's a compromised relay. 49 00:04:05,860 --> 00:04:07,220 Somebody's wiretapping it. 50 00:04:08,460 --> 00:04:09,780 You bribe the CEO. 51 00:04:10,040 --> 00:04:11,020 You threaten the CEO. 52 00:04:11,260 --> 00:04:13,000 You put a guy named Guido on an airplane. 53 00:04:13,240 --> 00:04:17,220 The list of of ways to attack a single point goes on and on. 54 00:04:17,320 --> 00:04:20,000 So what we'd like to do is have distributed trust. 55 00:04:20,240 --> 00:04:23,500 The idea of Tor is that you relay your connection through more than one 56 00:04:24,000 --> 00:04:25,500 relay through more than one hop. 57 00:04:25,680 --> 00:04:27,740 And that means that no single hop learns 58 00:04:27,740 --> 00:04:30,320 both where you are coming from and where you're going. 59 00:04:30,660 --> 00:04:33,440 So if the first guy is bad, if R1 is bad, 60 00:04:33,600 --> 00:04:37,340 he knows that Alice is using Tor, but he doesn't know what Alice is using Tor for. 61 00:04:38,180 --> 00:04:41,100 If R3 is bad, he knows that somebody is 62 00:04:41,100 --> 00:04:43,980 talking to Bob, but he doesn't know who is talking to Bob. 63 00:04:44,300 --> 00:04:47,500 And if R1 and R3 are colluding, then we're screwed. 64 00:04:47,640 --> 00:04:49,000 We'll get into that down the road. 65 00:04:49,280 --> 00:04:50,180 So far, so good. 66 00:04:51,500 --> 00:04:51,940 OK. 67 00:04:52,060 --> 00:04:53,120 And there's crypto. 68 00:04:53,500 --> 00:04:54,760 I won't talk about that much. 69 00:04:54,880 --> 00:04:58,420 I guess the key point to remember is that we've got perfect forward secrecy, 70 00:04:58,480 --> 00:05:04,940 which means that if Alice and R1 establish this green key and then later on they both 71 00:05:04,940 --> 00:05:08,720 throw it away, meaning that they're done with the connection and they throw away 72 00:05:08,720 --> 00:05:12,400 the key, it doesn't matter if you've logged what's going on back and forth 73 00:05:12,400 --> 00:05:17,260 because you can't break into Alice or R1 later and force them to decrypt. 74 00:05:17,840 --> 00:05:23,100 Though, as we'll see in a few slides, the Debian random number generator flaw pokes 75 00:05:23,100 --> 00:05:23,860 a big hole in that. 76 00:05:25,240 --> 00:05:25,680 OK. 77 00:05:25,800 --> 00:05:31,120 And we also have a directory system that lets all the users know about all the different servers out there. 78 00:05:31,300 --> 00:05:36,460 The way it works basically is each server has its own public private key pair and it builds a little thing called 79 00:05:36,460 --> 00:05:40,660 a server descriptor that says, this is my address and exit policies and so on. 80 00:05:40,760 --> 00:05:43,240 And it signs that and sends it to the directory authorities. 81 00:05:43,480 --> 00:05:48,680 Right now there are six of them and they compute a consensus that says, here are all the servers in the network. 82 00:05:48,840 --> 00:05:52,640 If you want to use Tor, get this list first and then build your path through them. 83 00:05:53,820 --> 00:05:54,220 OK. 84 00:05:54,360 --> 00:05:55,940 So that was Tor in a nutshell. 85 00:05:56,280 --> 00:05:58,840 And there are lots of other things we could talk about. 86 00:05:58,940 --> 00:06:02,700 Feel free to ask me later on if you've got questions, but I'm going to plow forward. 87 00:06:03,640 --> 00:06:08,600 So the first fun example, I'm going to start from the distant past and then work, 88 00:06:08,600 --> 00:06:12,480 work my way up to last week or maybe next week, depending on which bugs we get to. 89 00:06:13,580 --> 00:06:16,820 So once upon a time, OpenSSL did not ship with AES. 90 00:06:17,720 --> 00:06:21,860 And even after it added AES, it didn't ship with counter mode AES. 91 00:06:22,060 --> 00:06:23,040 So we added a 92 00:06:23,040 --> 00:06:25,260 counter on. We took we took the stock AES implementation. 93 00:06:25,640 --> 00:06:26,920 It didn't have counter mode. 94 00:06:27,040 --> 00:06:27,720 So we added it. 95 00:06:27,800 --> 00:06:32,780 Turns out one ampersand and two ampersands are very different when you're doing bitwise operations. 96 00:06:34,140 --> 00:06:37,120 And it was not until we had a second implementation. 97 00:06:37,460 --> 00:06:41,400 There were some nice folks writing a Java client at Dresden University. 98 00:06:41,720 --> 00:06:45,720 And they showed up and said, so I've been writing my compatible client and it works 99 00:06:45,720 --> 00:06:49,600 great, except after the first cell, all the encryption is different. 100 00:06:49,740 --> 00:06:50,680 What am I doing wrong? 101 00:06:51,180 --> 00:06:52,860 And it turns out they were using 102 00:06:53,040 --> 00:06:54,180 AES counter mode correctly. 103 00:06:54,460 --> 00:06:58,540 And we were using something a lot closer to 16 bit AES counter mode. 104 00:06:58,720 --> 00:07:00,440 And for the crypto people in the audience, 105 00:07:00,540 --> 00:07:04,520 16 bits is really not enough to to get the security you're looking for. 106 00:07:04,660 --> 00:07:09,060 So a second implementation, you hear from all the IETF people that you 107 00:07:09,060 --> 00:07:11,400 have to have two implementations before they'll believe something. 108 00:07:11,580 --> 00:07:13,320 Turns out that's a really good idea. 109 00:07:14,500 --> 00:07:18,620 Another fun one, I was talking to people about, hey, let's work on fuzzing Tor. 110 00:07:18,820 --> 00:07:21,660 Let's try to figure out, you know, what sort of inputs can mess you up. 111 00:07:21,720 --> 00:07:22,720 And then I was, you know, 112 00:07:23,040 --> 00:07:25,800 I wanted to give him an example of a situation that he might want to look at 113 00:07:25,800 --> 00:07:28,940 in the code to say, hey, maybe this is something that we could fuzz. 114 00:07:29,020 --> 00:07:30,100 And then I looked at it and I thought, 115 00:07:30,180 --> 00:07:34,440 you know, once upon a time, Tor's cells were 256 bytes, 116 00:07:34,660 --> 00:07:37,060 which means that you could specify the length in one byte. 117 00:07:37,460 --> 00:07:39,300 And then we moved it to 512 bytes 118 00:07:39,300 --> 00:07:41,460 because we wanted to be more efficient with using the network. 119 00:07:41,640 --> 00:07:43,860 And then we needed two bytes to hold that length. 120 00:07:44,060 --> 00:07:48,980 But we never checked to see if the specified length of the cell was less 121 00:07:48,980 --> 00:07:52,680 than 512 bytes or was 50,000 bytes or you could 122 00:07:53,040 --> 00:07:55,220 specify the cell length as much as you'd like. 123 00:07:55,320 --> 00:07:56,620 And that's, you know, it's a bug. 124 00:07:56,800 --> 00:07:58,980 OK, except for the fact that the exit 125 00:07:58,980 --> 00:08:03,540 relays were writing the cells out to the network at whatever length you specify. 126 00:08:03,880 --> 00:08:07,400 So the cell shows up and says, hi, I've got a great payload. 127 00:08:07,540 --> 00:08:09,160 It's 45,000 bytes. 128 00:08:09,340 --> 00:08:11,500 And the exit relay says, OK, I'll write 129 00:08:11,500 --> 00:08:15,340 45,000 bytes of memory starting here onto the network. 130 00:08:16,540 --> 00:08:19,720 And who knows what's in that memory, but it got written out. 131 00:08:19,800 --> 00:08:20,940 So that was kind of bad. 132 00:08:21,040 --> 00:08:22,700 We noticed that one and solved it. 133 00:08:23,760 --> 00:08:25,820 Pretty quietly, I think a lot of. 134 00:08:25,860 --> 00:08:27,820 So there are sort of two categories of bugs here. 135 00:08:27,920 --> 00:08:32,640 One of them is the ones where we look at the code and we say, holy cow, oh, my God, we did what? 136 00:08:32,900 --> 00:08:35,380 This has been around for how long? OK, let's fix it. 137 00:08:35,480 --> 00:08:37,760 And then after we fix it and people have upgraded, 138 00:08:37,800 --> 00:08:40,800 then we'll tell people about the problem and make sure that they upgrade. 139 00:08:40,960 --> 00:08:44,700 And the other category are the fun ones where some guy shows up on the IRC 140 00:08:44,700 --> 00:08:47,760 channel or the mailing list and says, hey, I think I found a problem. 141 00:08:48,000 --> 00:08:52,420 And then we have to fix it rather quickly and make sure that we fix it and make sure 142 00:08:52,420 --> 00:08:56,420 that people upgrade. So another example, I was at What the Hack 143 00:08:56,420 --> 00:09:01,960 back in 2005 and I was telling people, hey, if you find any problems, we'd love to hear from you. 144 00:09:02,100 --> 00:09:06,380 I heard from a few who were explaining, hey, my job doesn't let me report 145 00:09:06,380 --> 00:09:08,640 vulnerabilities to anybody except for my job. 146 00:09:08,780 --> 00:09:11,720 And I responded, dude, I wrote an anonymity system. 147 00:09:12,260 --> 00:09:13,680 Maybe you should use it. 148 00:09:15,940 --> 00:09:21,960 So the next week after I came back from What the Hack, some guy showed up on IRC, pasted a GPG 149 00:09:22,420 --> 00:09:25,780 blob and said, get this to Roger and left. And it was a great bug. 150 00:09:26,020 --> 00:09:30,900 It turns out that OpenSSL doesn't check the keys as much as we thought it would. 151 00:09:31,160 --> 00:09:35,900 So if somebody does a man in the middle attack, for example, they are your first 152 00:09:35,900 --> 00:09:40,720 relay and they accept the connection and then they pass it on. 153 00:09:40,820 --> 00:09:44,280 But they change the keys so that they can read everything going back and forth. 154 00:09:44,460 --> 00:09:46,540 And in fact, they don't have to just read everything. 155 00:09:46,720 --> 00:09:49,380 They can pretend to be the whole rest of the network. 156 00:09:49,560 --> 00:09:51,200 They can imitate anything they want to. 157 00:09:51,200 --> 00:09:53,140 You're basically talking in plain text. 158 00:09:53,420 --> 00:09:55,880 And we had no idea this bug was around. 159 00:09:56,380 --> 00:09:58,040 OpenSSL has fixed it since then. 160 00:09:58,100 --> 00:10:01,060 So now when it's doing the Diffie-Hellman operations, it can check. 161 00:10:01,180 --> 00:10:04,880 But that was an exciting week where we were trying to figure out exactly 162 00:10:05,420 --> 00:10:07,980 what sort of attackers would be able to attack the users. 163 00:10:09,580 --> 00:10:12,220 And you'll notice a little trend here. 164 00:10:12,340 --> 00:10:13,920 This one was August 8. 165 00:10:14,100 --> 00:10:19,020 You'll notice a trend of a lot of these bugs being fixed in the first or second week of August. 166 00:10:19,140 --> 00:10:20,140 We'll get back to that one 167 00:10:20,140 --> 00:10:21,440 in a little bit. 168 00:10:23,200 --> 00:10:28,080 So another fun attack that some researchers found, Paul Syverson and Lasse Viglier, 169 00:10:29,440 --> 00:10:32,320 they were working on how do I attack a hidden service? 170 00:10:32,440 --> 00:10:35,200 How do I figure out the location of a Tor hidden service? 171 00:10:35,540 --> 00:10:39,560 And they figured it out that if you run a couple of servers and they're fast and 172 00:10:39,560 --> 00:10:43,400 you keep making the hidden service make more circuits, make more connections, 173 00:10:43,600 --> 00:10:46,740 then eventually it's going to pick your node as the first hop. 174 00:10:46,940 --> 00:10:50,040 And then you win because you look at it and you say, hey, you're not a Tor 175 00:10:50,140 --> 00:10:54,100 server, I'm pretty sure you're the hidden service that I have been inducing to make connections. 176 00:10:54,460 --> 00:11:01,380 So what this means is if you run two or three fast Tor servers and you just wait 177 00:11:01,380 --> 00:11:05,700 and you're patient and every user keeps building a new path through the network, 178 00:11:05,920 --> 00:11:10,160 after a while, the user is going to pick your node for the first hop and your node 179 00:11:10,160 --> 00:11:11,940 for the last hop, and then she loses. 180 00:11:12,100 --> 00:11:15,840 We'll get into how the actual traffic correlation stuff works later on. 181 00:11:16,320 --> 00:11:19,340 So the defense against this is what we call entry guards. 182 00:11:19,340 --> 00:11:27,160 The idea is every client picks three or four entry nodes, three or four Tor servers as her first hop always. 183 00:11:27,340 --> 00:11:30,140 And she sticks with those three or four until they disappear. 184 00:11:30,420 --> 00:11:35,760 So the previous situation was as Alice uses Tor more and more, 185 00:11:35,900 --> 00:11:39,620 the probability that eventually she is screwed goes up to one. 186 00:11:40,080 --> 00:11:44,440 Whereas once we're using entry guards, she's either screwed at the beginning, 187 00:11:44,540 --> 00:11:49,280 meaning she picks a bad entry guard, or she's never screwed because she never uses, she never keeps 188 00:11:49,340 --> 00:11:50,740 rotating until she gets there. 189 00:11:51,100 --> 00:11:52,900 So that was a fun patch. 190 00:11:53,140 --> 00:11:57,060 And it was several years ago, but there was a Black Hat talk at DC 191 00:11:58,360 --> 00:12:01,040 detailing how the attack worked and how to do the attack. 192 00:12:01,260 --> 00:12:02,520 And it turned out it was pretty efficient. 193 00:12:02,660 --> 00:12:05,080 You could locate a hidden service in a few minutes. 194 00:12:05,280 --> 00:12:07,900 And there was another group at MIT 195 00:12:07,900 --> 00:12:11,100 a few years ago who did the same attack, not just on hidden services, 196 00:12:11,220 --> 00:12:15,420 but on actually finding the location of Tor users going to their website. 197 00:12:17,500 --> 00:12:18,840 Then another exciting one. 198 00:12:19,340 --> 00:12:22,840 You'll notice also it's the next year, August, beginning of August. 199 00:12:24,220 --> 00:12:30,940 We noticed that clients in Tor are pretty much the same code base as servers. 200 00:12:31,100 --> 00:12:33,080 So it's just a configuration option. 201 00:12:33,200 --> 00:12:34,920 Do I want to be a client? Do I want to be a server? 202 00:12:35,260 --> 00:12:39,540 So the way that building circuits works is the user shows up to the first hop 203 00:12:39,540 --> 00:12:41,900 and says, I want to, here's a create cell. 204 00:12:42,060 --> 00:12:43,440 I want to do a handshake with you. 205 00:12:43,560 --> 00:12:46,220 And then after that, she shows up and says, here's an extend cell. 206 00:12:46,320 --> 00:12:47,820 Please make that circuit another hop. 207 00:12:47,900 --> 00:12:49,060 And she sends a few more extend 208 00:12:49,340 --> 00:12:50,680 cells and then she has a circuit. 209 00:12:51,440 --> 00:12:56,480 Turns out clients never checked if they got sent a create cell or extend cells. 210 00:12:56,960 --> 00:12:59,440 So we used to say, you know, you could be a client. 211 00:12:59,560 --> 00:13:02,380 You don't have to relay traffic or you can click this button and you'll be a server 212 00:13:02,380 --> 00:13:05,540 and you can relay traffic, but actually clients would relay 213 00:13:05,540 --> 00:13:08,000 traffic to if anybody bothered to ask them to. 214 00:13:08,240 --> 00:13:11,700 As far as I know, nobody bothered to build circuits through them. 215 00:13:11,800 --> 00:13:13,320 You couldn't make them exit nodes. 216 00:13:13,480 --> 00:13:15,740 They would trigger an assert if you tried to exit from them. 217 00:13:15,780 --> 00:13:17,400 But you could build a circuit through them. 218 00:13:17,480 --> 00:13:19,140 And I don't think anybody actually 219 00:13:19,340 --> 00:13:20,620 tried this. We fixed it before that. 220 00:13:20,760 --> 00:13:26,520 But it's another example of a bug where if you make really general designs and you 221 00:13:26,520 --> 00:13:30,240 have the same software that can be used for, you know, client or server or hidden 222 00:13:30,240 --> 00:13:33,780 service or directory authority, then you might run into problems. 223 00:13:34,940 --> 00:13:35,940 Another fun attack. 224 00:13:36,180 --> 00:13:39,700 This was from a group of researchers at Colorado University. 225 00:13:40,600 --> 00:13:43,920 So the way clients choose their paths is 226 00:13:43,920 --> 00:13:47,620 they look at a couple of different flags that are provided in the directory. 227 00:13:47,840 --> 00:13:49,160 We say these servers. 228 00:13:49,340 --> 00:13:49,760 They're stable. 229 00:13:49,940 --> 00:13:53,860 You should use them for instant messaging or IRC or something like that. 230 00:13:54,120 --> 00:13:58,760 And the way we assign stable flags is we line up all the servers by uptime. 231 00:13:59,000 --> 00:14:02,680 And if you've got the median uptime or better, you get the stable flag. 232 00:14:02,840 --> 00:14:03,640 Otherwise you don't. 233 00:14:03,780 --> 00:14:06,540 And the reason we did this is so that we could be dynamic. 234 00:14:06,700 --> 00:14:09,180 So if all the servers have low uptime, 235 00:14:09,380 --> 00:14:12,420 then we can still say, well, these half are better than that half. 236 00:14:12,540 --> 00:14:14,360 Or if all the servers have really good uptime, 237 00:14:14,500 --> 00:14:18,440 then we can still say you want to use this half because it's even more stable. 238 00:14:19,340 --> 00:14:23,420 The problem with this is what if you get yourself a botnet or something like that 239 00:14:23,420 --> 00:14:29,140 and you sign up to 2000 servers and they all claim to have 10 years of uptime? 240 00:14:29,720 --> 00:14:32,180 You've just claimed all of the stable flags. 241 00:14:32,380 --> 00:14:34,940 You just bumped the stable flags off of everybody else. 242 00:14:35,500 --> 00:14:37,540 OK, so that's stable. Who cares? 243 00:14:37,620 --> 00:14:38,580 That's just for IRC. 244 00:14:38,680 --> 00:14:41,260 You actually the same thing worked for the guard flag. 245 00:14:41,520 --> 00:14:44,560 So the authorities, the directory authorities specify. 246 00:14:44,940 --> 00:14:47,800 These are the servers that you should use as a guard. 247 00:14:47,900 --> 00:14:49,000 These are the servers that you should 248 00:14:49,000 --> 00:14:51,000 use as the first hop in your path. 249 00:14:51,360 --> 00:14:53,960 And if the bad guy shows up and says, here are 2000 250 00:14:53,960 --> 00:14:56,860 servers that are better to use as the first 251 00:14:56,860 --> 00:14:59,640 top of your path and he bumps out all the real ones, 252 00:14:59,820 --> 00:15:03,280 then he is guaranteed to be chosen for the first top of the path. 253 00:15:03,580 --> 00:15:05,000 That turned out to be a bad move. 254 00:15:05,220 --> 00:15:08,080 So the solution for that is now we say, 255 00:15:08,180 --> 00:15:10,760 if you have a certain amount of uptime and a certain amount 256 00:15:10,760 --> 00:15:13,060 of bandwidth, we're going to give you the guard flag anyway. 257 00:15:13,220 --> 00:15:15,660 And that means that the attacker can't show up and give you 258 00:15:15,660 --> 00:15:17,580 2000 servers and just bump everybody. 259 00:15:19,000 --> 00:15:19,260 Are so good. 260 00:15:21,680 --> 00:15:24,700 And then a fun one that Kyle found last year. 261 00:15:25,300 --> 00:15:26,540 Notice also the 262 00:15:27,680 --> 00:15:29,400 beginning of August 2007 263 00:15:30,680 --> 00:15:32,500 was the control port issue. 264 00:15:32,720 --> 00:15:34,340 So Tor has a control port. 265 00:15:34,440 --> 00:15:37,200 It listens on local hosts so that we can have other applications. 266 00:15:38,260 --> 00:15:40,880 Hopefully people here who use Tor have seen Fidelia, 267 00:15:40,940 --> 00:15:43,540 which is the cute little GUI we've got that lets 268 00:15:43,540 --> 00:15:46,020 you configure your Tor and figure out how you're 269 00:15:46,020 --> 00:15:47,860 doing and where your circuits are and so on. 270 00:15:49,000 --> 00:15:51,400 So Tor is written in C. It's cross-platform. 271 00:15:51,660 --> 00:15:52,520 You can put it anywhere. 272 00:15:52,800 --> 00:15:55,220 We wanted the controller to be a separate program written 273 00:15:55,220 --> 00:15:57,400 in whatever language you want to write it. 274 00:15:57,620 --> 00:16:02,520 So we listen on local host and we only bind to local host, which means we're safe, right? 275 00:16:02,580 --> 00:16:06,060 Nobody should be able to connect to local host except for trusted applications. 276 00:16:07,140 --> 00:16:09,520 Turns out the users have these things called web browsers 277 00:16:10,120 --> 00:16:13,160 and web browsers can be induced to do all sorts of crazy things. 278 00:16:13,460 --> 00:16:18,280 So the easy version of this is you have a Java plug-in 279 00:16:18,280 --> 00:16:20,980 and you hand them the Java applet and the Java applet just connects 280 00:16:20,980 --> 00:16:23,320 to local host and talks to whatever it wants to talk. 281 00:16:23,500 --> 00:16:26,460 In this case, you can connect to the control port and you can change 282 00:16:26,460 --> 00:16:28,820 the configuration and you can look up who Alice is. 283 00:16:28,940 --> 00:16:30,120 You can do all sorts of crazy things. 284 00:16:30,300 --> 00:16:33,420 But in fact, you don't need to use a Java plug-in for this. 285 00:16:33,580 --> 00:16:36,620 You can just use a form, a simple HTTP form. 286 00:16:36,800 --> 00:16:39,580 You give the user a little post thing 287 00:16:39,580 --> 00:16:42,520 and when she clicks post, then it connects 288 00:16:42,520 --> 00:16:45,180 not to the website she thinks she's talking to, but to local 289 00:16:45,180 --> 00:16:47,920 host port 9051 and then you can have 290 00:16:47,920 --> 00:16:49,400 whatever conversation you want with it. 291 00:16:49,480 --> 00:16:50,420 You can dump commands there. 292 00:16:50,680 --> 00:16:53,400 So it turns out that Firefox has 293 00:16:53,400 --> 00:16:56,080 a list of ports that it won't let you connect to locally, 294 00:16:56,320 --> 00:16:59,100 like port 25, because if you're running a mail server 295 00:16:59,100 --> 00:17:01,900 and a browser, you don't really want the attacking website 296 00:17:01,900 --> 00:17:04,400 to be able to force you to send mail or receive mail. 297 00:17:04,580 --> 00:17:07,260 And there are a couple of other ports that it refuses by default. 298 00:17:07,800 --> 00:17:11,080 Last I checked, Safari doesn't have any list like this. 299 00:17:11,280 --> 00:17:14,180 So if you are running something open on port 25 300 00:17:14,180 --> 00:17:16,620 and you're using Safari, 301 00:17:16,620 --> 00:17:21,040 a website that tries to attack you can induce you to send mail. 302 00:17:22,340 --> 00:17:24,260 Hopefully Safari will fix that at some point. 303 00:17:24,340 --> 00:17:27,960 If you know any Safari people, have them come talk to me. 304 00:17:28,620 --> 00:17:33,520 So this is still a little bit tricky because how do we do the authentication now? 305 00:17:33,580 --> 00:17:34,260 We had authentication. 306 00:17:34,580 --> 00:17:36,960 We had password authentication, cookie authentication, 307 00:17:37,280 --> 00:17:40,660 if file systems can be trusted, but we didn't use it because it was a hassle. 308 00:17:40,800 --> 00:17:42,980 And now we've set it up so that we do use it. 309 00:17:43,000 --> 00:17:45,340 There's a password that Vidalia knows and Tor knows. 310 00:17:45,620 --> 00:17:46,500 But if you want 311 00:17:46,620 --> 00:17:50,680 to set up your Tor as an NT service, as something that boots before anything else 312 00:17:50,680 --> 00:17:52,840 boots, how do you write down your password? 313 00:17:53,040 --> 00:17:54,400 Because it turns out there are other fun 314 00:17:54,400 --> 00:17:58,760 attacks where you can induce the browser to go look up any file on the local file 315 00:17:58,760 --> 00:18:02,380 system. So if we store the file, if we store the password anywhere on the local 316 00:18:02,380 --> 00:18:06,600 file system, then a bad guy can trick our browser into going and looking it up. 317 00:18:06,700 --> 00:18:07,640 And then then we lose. 318 00:18:08,320 --> 00:18:12,940 So that's still an ongoing hassle that we don't have a good usable handle for. 319 00:18:13,080 --> 00:18:14,240 We'll get to that in a few slides. 320 00:18:16,620 --> 00:18:22,820 So another one that Kyle also found and we have pretty much solved by now. 321 00:18:23,580 --> 00:18:28,260 So the default exit policy in Tor, every node has an exit policy that specifies 322 00:18:28,260 --> 00:18:30,500 these are the addresses and ports you're allowed to connect to. 323 00:18:30,860 --> 00:18:35,720 The default exit port exit policy says nobody can connect to internal networks. 324 00:18:35,840 --> 00:18:37,840 If anybody saw Dan Kaminsky's talk last 325 00:18:37,840 --> 00:18:43,880 year where he tricked a web browser into crawling the entire corporate intranet, 326 00:18:45,040 --> 00:18:46,580 you could do that with a Tor service. 327 00:18:46,620 --> 00:18:53,660 However, also, except if you ask for 192.168 or a local host or 10.1.1.1, 328 00:18:54,150 --> 00:18:58,260 the exit relay will say, no, I'm sorry, I don't want to let you connect to that sort 329 00:18:58,260 --> 00:19:02,900 of thing. But the problem is you could still connect to the IP address of the 330 00:19:02,900 --> 00:19:08,260 relay from the relay. And typically that was some Linksys that had the password 331 00:19:08,260 --> 00:19:13,500 default. And that means that you could break into the relay's Linksys router and 332 00:19:13,500 --> 00:19:16,020 then change its DNS and start your phishing attacks. 333 00:19:16,740 --> 00:19:19,020 Redirect them and do whatever the heck you wanted to do. 334 00:19:19,220 --> 00:19:24,360 So the answer is now the default exit policy refuses connections to the local 335 00:19:24,360 --> 00:19:28,240 computer, both by its private IP addresses and by its public IP addresses. 336 00:19:28,580 --> 00:19:34,800 And that's a hassle because we really liked the fact that you could exit from a 337 00:19:34,800 --> 00:19:38,200 relay to itself. You could run like IndyMedia has been 338 00:19:38,200 --> 00:19:41,620 running a Tor exit relay that only exits to themselves. 339 00:19:41,940 --> 00:19:45,860 And that means you get end to end encryption, you get end to end authentication. 340 00:19:46,620 --> 00:19:49,760 All for free, except that contradicts this attack. 341 00:19:50,040 --> 00:19:54,440 And we figured that by default, we should not screw the dumb users who don't 342 00:19:54,440 --> 00:19:56,500 realize that their Linksys has the default password. 343 00:19:57,520 --> 00:19:58,960 So trade offs again. 344 00:20:01,350 --> 00:20:04,140 And then the Debian random number generator flaw. 345 00:20:04,460 --> 00:20:08,620 So raise your hand if you don't know what this attack is, what this problem is. 346 00:20:09,060 --> 00:20:11,660 I see roughly, I see a few hands. 347 00:20:11,820 --> 00:20:16,280 OK, so it turns out that some nice guy on the Debian security 348 00:20:16,620 --> 00:20:20,400 team was looking at Valgrind output of OpenSSL. 349 00:20:20,540 --> 00:20:22,860 And there were a few lines that confused him. 350 00:20:23,060 --> 00:20:27,060 It was something about, you know, this has unpredictable input or something. 351 00:20:27,220 --> 00:20:28,920 I don't I don't like unpredictable input. 352 00:20:28,980 --> 00:20:31,100 Let's remove those lines from OpenSSL. 353 00:20:31,620 --> 00:20:33,840 And turns out that unpredictable input, 354 00:20:33,940 --> 00:20:37,440 if you're generating random numbers, is really helpful. 355 00:20:40,400 --> 00:20:46,140 So for years, Debian shipped an OpenSSL that had, 356 00:20:46,140 --> 00:20:49,260 I don't know, was it 12 bits of entropy or 16 bits? 357 00:20:49,460 --> 00:20:51,820 It wasn't anywhere near what we would have wanted. 358 00:20:52,040 --> 00:20:53,860 So that means that anybody who generated 359 00:20:54,240 --> 00:20:57,800 an RSA key, anybody who logged in with SSH, 360 00:20:57,800 --> 00:21:02,440 anybody who generated an SSL certificate generated one that I can break. 361 00:21:02,540 --> 00:21:04,800 I can break it with like a napkin at this point. 362 00:21:05,080 --> 00:21:09,500 And that means that we had 300 Tor servers 363 00:21:09,500 --> 00:21:13,540 running Debian or Ubuntu or something based on this OpenSSL library. 364 00:21:13,860 --> 00:21:15,760 And that means that suddenly, 365 00:21:16,140 --> 00:21:20,280 one day, 300 of the 1500 Tor relays were running with weak keys. 366 00:21:20,620 --> 00:21:22,760 Now, fortunately, we were tipped off to this 367 00:21:22,760 --> 00:21:25,700 problem a little bit before the official announcement went out. 368 00:21:25,780 --> 00:21:28,160 So we had a release that came out 30 369 00:21:28,160 --> 00:21:31,460 minutes after the official security advisory came out. 370 00:21:31,560 --> 00:21:33,100 But it was still a little bit tricky. 371 00:21:33,220 --> 00:21:38,280 The reason why it's so bad is because if anybody decided to log the traffic 372 00:21:38,280 --> 00:21:42,080 that they saw going through the Tor network and a client happened to pick 373 00:21:42,080 --> 00:21:44,820 three bad nodes, all three bad nodes for her path, 374 00:21:44,820 --> 00:21:47,500 then you can just decrypt it later on. 375 00:21:47,540 --> 00:21:50,760 If I've got logs from somebody using Tor from two years ago, 376 00:21:50,940 --> 00:21:52,760 I can read them all right now. 377 00:21:52,840 --> 00:21:55,760 I can know what Alice did, what she received, what she sent. 378 00:21:56,060 --> 00:21:56,780 That sucks. 379 00:21:58,140 --> 00:22:00,700 Now, you have to have all three bad nodes. 380 00:22:00,780 --> 00:22:04,100 If you had one good node, then the crypto stays and you can't decrypt it. 381 00:22:04,340 --> 00:22:06,400 So we're doing a lot better than a lot 382 00:22:06,400 --> 00:22:11,340 of single hop proxies out there that were just totally broken for years. 383 00:22:12,340 --> 00:22:13,800 And the other issue was, 384 00:22:14,820 --> 00:22:18,600 the new version three directory authorities, we had just generated a fine 385 00:22:18,600 --> 00:22:22,420 new set of identity keys and we were shifting over to the new directory design 386 00:22:22,820 --> 00:22:24,900 where we build consensus directories better. 387 00:22:25,500 --> 00:22:27,880 And so the way it worked was each client 388 00:22:27,880 --> 00:22:31,800 would pull down the consensus network status and look for signatures on it. 389 00:22:31,940 --> 00:22:35,120 And if she saw four out of six signatures, then she'd say, oh, good. 390 00:22:35,180 --> 00:22:36,720 This one signed by enough servers. 391 00:22:36,940 --> 00:22:37,800 I'll trust it. 392 00:22:38,820 --> 00:22:44,660 Three of the six keys were generated on Debian, which means that anybody who wanted 393 00:22:44,820 --> 00:22:48,160 to could produce signatures for three out of the six directory authorities. 394 00:22:48,520 --> 00:22:49,820 Now, that's not four. 395 00:22:50,420 --> 00:22:51,720 So we're fine, right? 396 00:22:52,980 --> 00:22:54,500 That's probably not a good assumption. 397 00:22:54,800 --> 00:22:58,400 There are certainly some attacks you can do if you can almost get the majority. 398 00:22:58,640 --> 00:23:00,040 So that was kind of bad. 399 00:23:00,160 --> 00:23:04,380 It wasn't awful because this was still the development tree. 400 00:23:04,660 --> 00:23:08,180 And hopefully if you're using the development tree, then you're expecting 401 00:23:08,180 --> 00:23:10,940 things like this, especially based on the last ten slides I had. 402 00:23:11,220 --> 00:23:11,700 So 403 00:23:11,700 --> 00:23:16,260 it wasn't as bad as it could be, but it was still pretty bad. 404 00:23:17,720 --> 00:23:22,100 OK, another exciting attack that we are still tackling. 405 00:23:22,760 --> 00:23:24,920 Turns out that clients can just keep 406 00:23:24,920 --> 00:23:27,420 on extending their circuit as long as they want to. 407 00:23:27,920 --> 00:23:32,520 So and the reason for this is that servers can't figure out where they are in the past. 408 00:23:32,620 --> 00:23:35,300 So they can't say, hey, wait a minute, I'm hop number 20. 409 00:23:35,400 --> 00:23:36,300 What the heck are you doing? 410 00:23:36,380 --> 00:23:37,720 I'm not going to let you extend more. 411 00:23:37,880 --> 00:23:40,560 All they see is somebody connecting and asking to extend. 412 00:23:40,780 --> 00:23:41,660 They don't know if they're 413 00:23:41,700 --> 00:23:44,180 the first hop or the 20th hop or the 50th hop or what. 414 00:23:44,620 --> 00:23:48,260 And so that first of all, it's a DOS opportunity. 415 00:23:49,140 --> 00:23:50,240 I'm one client. 416 00:23:50,340 --> 00:23:54,280 I can build a path that has four thousand or whatever hops. 417 00:23:54,460 --> 00:23:59,240 If I can actually get one to extend that far and work and then I send one cell 418 00:23:59,760 --> 00:24:03,560 and it produces a cell on every single relay in the path. 419 00:24:03,820 --> 00:24:05,960 So if I'm some dude with 20 kilobytes 420 00:24:05,960 --> 00:24:11,000 of bandwidth, I can knock over a Tor server at Harvard and MIT and BU and so 421 00:24:11,000 --> 00:24:11,260 on. 422 00:24:11,700 --> 00:24:13,500 Because I just keep bouncing back and forth. 423 00:24:13,580 --> 00:24:16,480 And they are forced to send to use up that bandwidth. 424 00:24:16,920 --> 00:24:18,500 So it's a DOS multiplier. 425 00:24:18,900 --> 00:24:20,180 OK, I'm fine with that. 426 00:24:20,700 --> 00:24:22,580 Turns out it's also an anonymity attack. 427 00:24:22,800 --> 00:24:25,680 There are a couple of ways of turning it into an anonymity attack. 428 00:24:25,940 --> 00:24:31,140 One of them is if you run, say, five percent of the nodes and then 429 00:24:31,140 --> 00:24:33,980 you beat the crap out of the other ninety five percent of the nodes. 430 00:24:34,020 --> 00:24:34,620 So they disappear. 431 00:24:35,020 --> 00:24:37,580 Now you look like the part of the Tor network that's working. 432 00:24:38,000 --> 00:24:39,760 So, OK, that's that's one attack. 433 00:24:40,260 --> 00:24:43,540 There's an even more subtle attack that you can do with it that Christian 434 00:24:43,540 --> 00:24:48,040 Grothhoff and Nate Evans are going to talk about in this room in about four or five hours. 435 00:24:48,260 --> 00:24:52,160 So there's a plug for them and we're on the way to fixing it. 436 00:24:52,260 --> 00:24:57,960 We've made it so that you can't make a path of more than about eight or ten hops. 437 00:24:58,180 --> 00:25:00,560 And the way we do that is a little bit complex. 438 00:25:00,720 --> 00:25:01,600 I'll talk about it afterwards. 439 00:25:01,880 --> 00:25:03,340 But we haven't. 440 00:25:03,340 --> 00:25:08,160 So we've done all of the steps of fixing the bug, except for enabling servers to 441 00:25:08,160 --> 00:25:09,000 actually refuse. 442 00:25:10,000 --> 00:25:11,640 People who are doing the old way. 443 00:25:11,780 --> 00:25:15,200 So that means you can still do the attack right now until everybody's upgraded. 444 00:25:15,500 --> 00:25:18,460 And once people have upgraded, then we'll flip the switch and 445 00:25:18,460 --> 00:25:20,940 and we'll start enforcing the path limits. 446 00:25:22,240 --> 00:25:24,780 OK, so those were some solved or solvable problems. 447 00:25:25,560 --> 00:25:26,960 How about some practical problems? 448 00:25:28,000 --> 00:25:32,600 I assume a lot of people here heard the Slashdot articles or CNN or Wired or 449 00:25:32,600 --> 00:25:38,380 whatever it was from the Swedish guy last year who, if I use the phrase embassy 450 00:25:38,380 --> 00:25:42,000 password thing, then I'll see a lot of people nodding. 451 00:25:42,320 --> 00:25:47,920 So there was some dude in Sweden and he ran a tour exit relay and he watched all the traffic that came out. 452 00:25:48,060 --> 00:25:50,640 And then he started saying, hey, wow, I'm seeing some great things. 453 00:25:50,720 --> 00:25:53,240 I'm going to go to the press and produce lots of news articles. 454 00:25:53,600 --> 00:25:55,620 So it's a little bit tricky here. 455 00:25:55,680 --> 00:25:57,780 First of all, he was breaking Swedish law. 456 00:25:57,880 --> 00:25:58,700 He was wiretapping. 457 00:25:59,140 --> 00:26:00,500 He's since been raided. 458 00:26:00,540 --> 00:26:06,540 And I talked to somebody a few days ago who said, oh, yeah, nobody's heard from him since he got raided. 459 00:26:07,320 --> 00:26:13,540 So if you've heard from him, I'd love to hear from you because I'm a bit curious what happened to this fella. 460 00:26:14,400 --> 00:26:18,960 So the first thought is if you're planning on breaking your law, talk to a lawyer first. 461 00:26:19,080 --> 00:26:25,740 There are plenty of EFF people who are hanging around here who would be happy to advise you on exactly how vague and obsolete 462 00:26:25,740 --> 00:26:28,380 and yet still enforced the wiretap laws are. 463 00:26:29,040 --> 00:26:31,580 The other thing to keep in mind, Tor hides your location. 464 00:26:31,940 --> 00:26:33,440 It provides anonymity. 465 00:26:33,440 --> 00:26:35,700 It doesn't magically encrypt all the traffic on the Internet. 466 00:26:35,860 --> 00:26:36,520 So if you remember, 467 00:26:36,540 --> 00:26:42,900 that slide a few slides back where we had the the encryption lined up, the last step was in plain text. 468 00:26:43,480 --> 00:26:51,160 So if I'm talking to CNN and I'm just using HTTP, that means that whatever comes out of the exit relay going to CNN, 469 00:26:51,240 --> 00:26:54,120 anybody in between there gets to read it or change it. 470 00:26:54,260 --> 00:26:57,820 It's the same sort of thing you've got if you walk into Starbucks and you don't use SSL. 471 00:26:58,920 --> 00:27:02,040 So if you do use SSL, then it works fine over Tor. 472 00:27:02,120 --> 00:27:05,500 So I guess the key point is if you want end to end encryption 473 00:27:05,500 --> 00:27:08,080 or end to end authentication, get it. 474 00:27:08,120 --> 00:27:12,400 Tor does not provide it by default and it does protect against the local attacker. 475 00:27:12,640 --> 00:27:16,880 If there's somebody watching your local network, Tor will use encryption inside the circuit. 476 00:27:17,020 --> 00:27:20,860 It's only once it pops out of the exit relay that it is however you sent it. 477 00:27:20,980 --> 00:27:22,180 So it's a little bit confusing. 478 00:27:22,340 --> 00:27:23,660 What are some things we can do here? 479 00:27:24,020 --> 00:27:29,420 One of the tricky things is a lot of people view HTTPS as a premium feature. 480 00:27:29,600 --> 00:27:35,100 So I was reading a Wired article last year where they were slamming the Tor users for saying the Tor users 481 00:27:35,500 --> 00:27:39,760 are so stupid they don't even use SSL, they don't even click the button to encrypt their traffic. 482 00:27:40,040 --> 00:27:44,180 So I went to the Wired.com site and they've got a little login thing. 483 00:27:44,340 --> 00:27:46,200 So I click it, I turn it into SSL. 484 00:27:46,260 --> 00:27:47,400 They don't use SSL. 485 00:27:47,520 --> 00:27:49,100 They don't even support SSL. 486 00:27:49,840 --> 00:27:51,180 So what's going on here? 487 00:27:51,340 --> 00:27:56,680 There are a lot of groups out there who say encryption should be used on the Internet, but nobody actually supports it. 488 00:27:56,820 --> 00:27:58,800 So in Wired's case, they use Akamai. 489 00:27:58,960 --> 00:28:04,580 And I guess Akamai charges them an extra $100,000 or whatever to provide Akamai's SSL. 490 00:28:04,680 --> 00:28:05,360 So they said, oh, 491 00:28:05,500 --> 00:28:07,180 heck, that's not worth it. We're not going to do that. 492 00:28:08,600 --> 00:28:10,920 There are a couple of things we could handle, though. 493 00:28:10,960 --> 00:28:15,200 We could make Tor say, hey, you're making an outgoing connection to port 109. 494 00:28:16,440 --> 00:28:20,080 Probably you're about to send a password and username for POP. 495 00:28:20,300 --> 00:28:22,520 So I'm going to warn you about that. 496 00:28:22,720 --> 00:28:24,740 Or maybe I'm just going to block the connection entirely. 497 00:28:25,060 --> 00:28:27,040 That might work well for POP or IMAP. 498 00:28:27,180 --> 00:28:28,300 What do we do for port 80? 499 00:28:29,760 --> 00:28:33,780 Firefox has a little pop up that says, hey, you're sending stuff unencrypted. 500 00:28:33,980 --> 00:28:35,100 Somebody might be able to see it. 501 00:28:35,500 --> 00:28:38,320 Every one of us has learned to click the stupid button. 502 00:28:38,420 --> 00:28:41,920 We know. Except the Internet is not encrypted. 503 00:28:42,140 --> 00:28:43,300 So what are you going to do? 504 00:28:44,560 --> 00:28:46,700 Another answer is maybe we should use Tor Flow. 505 00:28:46,880 --> 00:28:50,580 Mike Perry is somewhere around here, and he's been working on a tool that you 506 00:28:50,580 --> 00:28:54,720 can check from an exit relay what it thinks the Web page looks like. 507 00:28:54,820 --> 00:28:56,720 And if it thinks the Web page has a whole 508 00:28:56,720 --> 00:29:00,280 bunch of backdoors and JavaScript and other crap in it, then maybe you should 509 00:29:00,280 --> 00:29:02,460 be suspicious about what that exit relay is doing. 510 00:29:03,280 --> 00:29:04,700 Should we educate users? 511 00:29:04,700 --> 00:29:06,060 That trick never works. 512 00:29:08,760 --> 00:29:12,100 It even gets more complex than this because there are. 513 00:29:12,280 --> 00:29:17,280 So, for example, when you log into Gmail, you use SSL for the authentication step, 514 00:29:17,420 --> 00:29:20,860 but it switches you back to plain text after that, which means that anybody who's 515 00:29:20,860 --> 00:29:25,800 watching you from Starbucks or Tor or wherever, unless you force Gmail to stay 516 00:29:25,800 --> 00:29:29,920 using SSL, they get to read all of your traffic going back and forth, all your mail. 517 00:29:30,020 --> 00:29:31,580 They get to see your Gmail cookie. 518 00:29:32,120 --> 00:29:33,440 They get to become you. 519 00:29:33,500 --> 00:29:34,300 They get to log in. 520 00:29:34,300 --> 00:29:35,600 They get to do everything they want to. 521 00:29:35,740 --> 00:29:37,860 And it's worse than that because Gmail cookies, 522 00:29:38,780 --> 00:29:44,940 they could say this cookie is only allowed to be used for SSL connections, but they don't. 523 00:29:44,940 --> 00:29:48,720 They let you use it for SSL or non SSL because they want to be usable. 524 00:29:48,920 --> 00:29:50,320 They want to make sure that none of those 525 00:29:50,320 --> 00:29:53,740 users out there get confused and can't read their Gmail. 526 00:29:54,080 --> 00:29:56,540 So this is certainly something that we need to talk more about. 527 00:29:56,680 --> 00:29:58,560 Mike Perry has a talk, I think, tomorrow, 528 00:29:59,560 --> 00:30:03,840 slamming them and putting out an exploit that automatically attacks all of this. 529 00:30:04,300 --> 00:30:05,280 So we'll see how that one goes. 530 00:30:05,500 --> 00:30:06,580 And it's a bit tricky. 531 00:30:06,700 --> 00:30:10,120 Some research on exit traffic properties is legitimate and useful. 532 00:30:10,660 --> 00:30:14,780 Sometimes we really want we really do want to know how many users there are. 533 00:30:14,860 --> 00:30:16,340 What sort of protocols they talk. 534 00:30:16,880 --> 00:30:19,500 On the other hand, it's illegal in a lot of jurisdictions. 535 00:30:19,880 --> 00:30:21,120 How do we get the right balance? 536 00:30:23,340 --> 00:30:26,700 So the next issue, who actually runs the relays? 537 00:30:26,780 --> 00:30:27,940 How do we know that they're safe? 538 00:30:28,280 --> 00:30:33,760 Once upon a time, you had to send me mail saying, hey, Roger, I'm that guy you met at that conference and you convinced 539 00:30:34,300 --> 00:30:35,440 me to set up a Tor server. Here it is. 540 00:30:36,000 --> 00:30:38,400 That scaled even less well than I thought it would. 541 00:30:40,260 --> 00:30:42,800 So what we've done in the meantime is we've set it up. 542 00:30:42,900 --> 00:30:44,360 There are two steps to checking. 543 00:30:44,520 --> 00:30:48,000 One of them is, is this server actually working? 544 00:30:48,160 --> 00:30:49,720 Is it reachable? Does it pass traffic? 545 00:30:49,980 --> 00:30:52,200 And the other step is, is this a bad guy? 546 00:30:52,340 --> 00:30:53,660 Is this somebody that I shouldn't trust? 547 00:30:54,260 --> 00:30:57,860 And we've automated the first step, but the second step is still a big mess. 548 00:30:58,180 --> 00:31:03,160 How do you know when some server shows up from Korea, whether it's a nice guy who 549 00:31:03,160 --> 00:31:03,840 really wants to help? 550 00:31:03,840 --> 00:31:09,180 Relay traffic or it's some dude who just read the Swedish embassy thing and wants 551 00:31:09,180 --> 00:31:11,760 to be a copycat. So there's still a tension. 552 00:31:12,180 --> 00:31:16,720 I mean, if Taurus server, if Taurus security comes from having a really 553 00:31:16,720 --> 00:31:20,720 diverse set of servers all around the world, because then not very many people 554 00:31:20,720 --> 00:31:24,520 can attack it, we really do want these people I've never heard of to be running servers. 555 00:31:24,820 --> 00:31:26,120 We've got servers in China. 556 00:31:26,280 --> 00:31:27,440 We've got servers in Venezuela. 557 00:31:27,760 --> 00:31:29,300 We've got servers all over the place. 558 00:31:29,440 --> 00:31:33,080 If we only allowed servers that I've heard of or are places that I know, 559 00:31:33,080 --> 00:31:36,020 we'd have a small Tor network and we wouldn't have much security. 560 00:31:37,780 --> 00:31:39,700 So it gets more complex than that. 561 00:31:39,760 --> 00:31:45,580 Even there are a lot of volunteer Windows exit nodes and they run the latest and 562 00:31:45,580 --> 00:31:50,840 greatest antivirus thing, and that transparently intercepts HTTP going 563 00:31:50,840 --> 00:31:54,900 across their network and it fixes it. It removes JavaScript. 564 00:31:55,040 --> 00:31:58,480 If you don't want JavaScript, it replaces websites with I'm sorry, 565 00:31:58,580 --> 00:32:00,160 this might be a phishing site. Don't see it. 566 00:32:00,260 --> 00:32:02,320 And that, you know, is kind of a hassle 567 00:32:03,080 --> 00:32:06,120 for the folks at CMU who are doing phishing research over Tor. 568 00:32:06,300 --> 00:32:09,020 But it's kind of good for the users who don't want to get phished. 569 00:32:09,180 --> 00:32:10,840 So there's certainly a trade off there. 570 00:32:11,080 --> 00:32:13,940 What if your exit relay is in China and you're trying to read BBC? 571 00:32:14,360 --> 00:32:14,960 Doesn't work. 572 00:32:15,260 --> 00:32:18,020 So as we get more fast servers in China, 573 00:32:18,460 --> 00:32:21,260 it becomes more and more apparent that the Internet is not flat. 574 00:32:21,400 --> 00:32:22,680 It looks different from different places. 575 00:32:22,880 --> 00:32:25,200 You can't even reach certain sites from certain things. 576 00:32:25,440 --> 00:32:28,600 Google will give you different answers depending on whether you're popping out 577 00:32:28,600 --> 00:32:32,060 of China or the US or Germany, and they will censor different things 578 00:32:32,060 --> 00:32:32,960 in the US. 579 00:32:33,080 --> 00:32:35,500 Then in Germany, then in France, then in China. 580 00:32:35,780 --> 00:32:36,940 And it gets worse than that. 581 00:32:37,020 --> 00:32:41,220 We had a Tor server in China a little while ago that was doing SSL man 582 00:32:41,220 --> 00:32:43,420 in the middle attacks on everybody popping out of it. 583 00:32:43,500 --> 00:32:45,480 If you try to go to PayPal or eBay, 584 00:32:45,740 --> 00:32:49,500 then it would it would scrub off the old certificate, the real one, 585 00:32:49,600 --> 00:32:53,060 and it would put in its own self-signed certificate saying, yep, 586 00:32:53,240 --> 00:32:56,720 you're really connecting to PayPal. Can I watch all your traffic, please? 587 00:32:57,060 --> 00:33:01,440 And some some users would notice the little pop up that Firefox would say. 588 00:33:01,500 --> 00:33:02,560 They would say, you know, 589 00:33:02,560 --> 00:33:04,500 this is not the real certificate. Click here. 590 00:33:04,840 --> 00:33:07,100 And so they would click here and that was that. 591 00:33:07,240 --> 00:33:09,940 But a lot of people wouldn't even care about that sort of thing. 592 00:33:10,280 --> 00:33:11,860 So we noticed that it wasn't. 593 00:33:12,620 --> 00:33:16,280 We originally thought, oh, man, there's a guy in China who's attacking Tor. 594 00:33:16,420 --> 00:33:17,980 He's trying to do SSL man in the middles. 595 00:33:18,380 --> 00:33:20,080 It turns out it was his ISP. 596 00:33:20,120 --> 00:33:24,980 His the ISP in China was doing SSL man in the middle attacks on all of its 597 00:33:24,980 --> 00:33:32,020 customers in that area of China and the Tor user in Idaho was a collateral damage. 598 00:33:32,560 --> 00:33:35,720 Of this policy that China has for its citizens. 599 00:33:36,200 --> 00:33:38,240 So that was something interesting to learn. 600 00:33:38,440 --> 00:33:43,240 And then even worse, I've been hearing rumors that so, you know, in Firefox, 601 00:33:43,360 --> 00:33:47,000 you've got like 200 different certificate authorities that you're willing to trust. 602 00:33:47,160 --> 00:33:49,420 And plenty of them went out of business in 2000. 603 00:33:49,580 --> 00:33:51,780 But they're still in the list of CEOs that you trust. 604 00:33:52,020 --> 00:33:55,340 I've been hearing rumors that China is looking to buy one of these keys. 605 00:33:56,040 --> 00:33:59,720 Once they do, they're going to be able to do SSL man in the middle attacks. 606 00:33:59,920 --> 00:34:01,820 And your Firefox won't pop up anything. 607 00:34:01,820 --> 00:34:04,820 It'll say, oh, good, it's signed by a real person I trust. 608 00:34:05,000 --> 00:34:06,180 That really is PayPal. 609 00:34:07,000 --> 00:34:10,940 What happens if some guy who runs an exit note gets a hold of one of these official 610 00:34:10,940 --> 00:34:14,460 CAs now he can spoof the whole SSL Internet. 611 00:34:14,900 --> 00:34:18,700 Turns out the SSL might not be as end to end secure as we hope. 612 00:34:20,440 --> 00:34:27,100 A couple of years ago, there were ten or 15 Tor relays that showed up all from 149.9. 613 00:34:27,240 --> 00:34:31,680 Something something and they were fast and they didn't have any contact information. 614 00:34:32,220 --> 00:34:36,560 And nobody told me that, hey, I'm the I'm the person running these 15 fast servers. 615 00:34:37,060 --> 00:34:42,480 So we went to who is and we looked them up and they were registered under PSI net 616 00:34:42,940 --> 00:34:47,300 in near Washington, D.C., which some people freaked out about because 617 00:34:47,300 --> 00:34:49,380 there are plenty of conspiracy theories to go around. 618 00:34:49,560 --> 00:34:54,240 So we contacted PSI net and said, hey, these IP addresses, can you tell us who owns them? 619 00:34:54,340 --> 00:34:57,080 And they said, whoa, those are ours. 620 00:34:57,440 --> 00:34:59,540 Wow. Those aren't in any list that we've got. 621 00:34:59,620 --> 00:35:01,200 Thanks. So that was. 622 00:35:05,040 --> 00:35:06,360 So that was kind of weird. 623 00:35:06,960 --> 00:35:09,780 And we eventually did track down who's running them. 624 00:35:09,900 --> 00:35:13,020 And they're a reasonably well-known security organization. 625 00:35:13,300 --> 00:35:15,500 Probably some of them are in the audience right now. 626 00:35:15,600 --> 00:35:18,000 And they said, oopsie, I'm really sorry. 627 00:35:18,100 --> 00:35:19,100 I probably should have told you. 628 00:35:19,180 --> 00:35:21,360 Can you like not publicly embarrass us? 629 00:35:21,880 --> 00:35:23,160 We'll try harder in the future. 630 00:35:23,340 --> 00:35:25,200 So these nodes are still running. 631 00:35:25,360 --> 00:35:26,440 We know who they are. 632 00:35:27,720 --> 00:35:31,420 But what do you do when 15 fast servers show 633 00:35:31,820 --> 00:35:32,980 up and they all want to help out? 634 00:35:33,120 --> 00:35:36,660 So the first trick is that we have a new path building algorithm. 635 00:35:37,060 --> 00:35:41,900 If you have a bunch of servers from the same slash 16, you only use one of them 636 00:35:41,900 --> 00:35:45,840 in your circuit, and that means that you won't end up saying I'm going to route 637 00:35:45,840 --> 00:35:50,920 through this unregistered block in PSI net to this unregistered block. 638 00:35:51,300 --> 00:35:54,840 And then at my third hop, I'm going to use this unregistered block also. 639 00:35:54,900 --> 00:35:56,540 And I'll have great anonymity. 640 00:35:56,980 --> 00:35:59,200 That turns out not to be what people should do. 641 00:35:59,400 --> 00:36:01,260 And it gets a little bit trickier. 642 00:36:01,820 --> 00:36:05,400 The Colorado researchers said, hey, why don't you make it hard to run your 643 00:36:05,400 --> 00:36:08,460 2000 or 3000 servers all on the same IP address? 644 00:36:08,760 --> 00:36:10,160 And that was a good point. 645 00:36:10,280 --> 00:36:15,320 So now you can run only two relays per IP address, which means if you want to sign 646 00:36:15,320 --> 00:36:22,000 up 15, a 1500 separate relays, then you need to come up with 750 IP addresses, 647 00:36:22,160 --> 00:36:26,060 ideally on different slash 16s if you want to attack us as well as you can. 648 00:36:26,300 --> 00:36:27,860 But that's not the whole story. 649 00:36:28,060 --> 00:36:29,880 What about separate asses? 650 00:36:30,080 --> 00:36:31,260 I wrote a paper 651 00:36:31,820 --> 00:36:35,720 in Feimster a few years ago, and we'll get into that in a few slides. 652 00:36:35,860 --> 00:36:39,560 But the basic idea was generally when we're talking about anonymity systems, 653 00:36:39,740 --> 00:36:42,240 we make gestures like this, we say hopping around the Internet. 654 00:36:42,560 --> 00:36:47,520 But if you look at the actual tier one ISPs that people go through, like AT&T 655 00:36:47,520 --> 00:36:50,540 and level three and stuff, the real gesture should be like this. 656 00:36:50,780 --> 00:36:54,820 Hopping around the Internet on level three, back and forth over level three. 657 00:36:55,140 --> 00:37:01,140 And that means that certain attackers who are able to watch large tier one ISPs like 658 00:37:01,820 --> 00:37:05,480 AT&T, I think we've heard of some three letter agencies who get to snoop AT&T lately. 659 00:37:06,840 --> 00:37:08,960 They are in a pretty good position to break tour. 660 00:37:09,120 --> 00:37:13,460 What about I exits, Internet exchanges in Amsterdam and London and so on? 661 00:37:13,580 --> 00:37:16,920 These are great centralized places to be able to watch the traffic. 662 00:37:17,020 --> 00:37:20,660 So even if there are different IP addresses involved in the circuit, if all 663 00:37:20,660 --> 00:37:26,020 the traffic keeps going over the same actual physical pipe, then we're potentially in bad shape. 664 00:37:27,540 --> 00:37:31,420 OK, so let's switch from 665 00:37:31,820 --> 00:37:35,960 design issues with how to pick your path to application level issues. 666 00:37:36,520 --> 00:37:37,720 Let me give you an example. 667 00:37:37,900 --> 00:37:42,820 If you are using tour with tour button and you go to a website and you're using tour 668 00:37:42,820 --> 00:37:45,840 and you're all safe, they don't know who you are, but you're running JavaScript, 669 00:37:46,700 --> 00:37:53,460 then they hand you a little JavaScript timer and it says every 60 seconds, please refresh. 670 00:37:54,100 --> 00:37:55,880 So there you are with your browser. 671 00:37:55,980 --> 00:37:57,660 Maybe you go get a cup of coffee or whatever. 672 00:37:57,780 --> 00:37:59,920 Every 60 seconds you load the page again. 673 00:37:59,980 --> 00:38:01,620 You're still using tour, so you're fine. 674 00:38:01,820 --> 00:38:03,960 And then you say, OK, screw this. 675 00:38:04,000 --> 00:38:04,600 This is too slow. 676 00:38:04,840 --> 00:38:06,780 You click the button, you disable tour. 677 00:38:06,900 --> 00:38:08,040 Now you're not using tour anymore. 678 00:38:08,400 --> 00:38:12,340 60 seconds later, your browser automatically refreshes the page again. 679 00:38:12,680 --> 00:38:16,540 Now you go directly to that website that was attacking you and you say, hey, 680 00:38:16,600 --> 00:38:19,200 I'm the guy who's been refreshing every 60 seconds. 681 00:38:19,260 --> 00:38:20,480 This is my real IP address. 682 00:38:21,400 --> 00:38:22,280 That's bad. 683 00:38:22,740 --> 00:38:25,160 And there are a lot of other versions of that attack. 684 00:38:25,480 --> 00:38:26,780 There are cookies. 685 00:38:27,000 --> 00:38:28,800 There are ways of looking up the history. 686 00:38:28,920 --> 00:38:31,640 You can say, well, I don't know who this anonymous person is. 687 00:38:31,820 --> 00:38:32,380 I don't know who he is because they're using tour. 688 00:38:32,540 --> 00:38:36,820 But they visited the following 71 interesting websites over the past day. 689 00:38:37,500 --> 00:38:39,400 That's not the sort of thing you want to reveal. 690 00:38:40,100 --> 00:38:41,060 Browser window size. 691 00:38:41,300 --> 00:38:44,720 It turns out that at least IE and probably Firefox also. 692 00:38:45,160 --> 00:38:46,380 I think it's just IE. 693 00:38:46,480 --> 00:38:48,600 Actually, they specify when you connect to a website. 694 00:38:48,780 --> 00:38:53,960 These are the exact number of pixels by number of pixels that are that our browser is. 695 00:38:54,240 --> 00:38:57,840 And that's a pretty good tag if you want to recognize the client later. 696 00:38:58,260 --> 00:38:59,520 And then user agent. 697 00:38:59,640 --> 00:39:01,360 Do you have the brand new 698 00:39:01,820 --> 00:39:02,760 daily build of Firefox? 699 00:39:03,060 --> 00:39:05,340 Does anybody else have that brand new daily build? 700 00:39:05,480 --> 00:39:06,460 That's a good way to track you. 701 00:39:07,080 --> 00:39:13,580 Are you the guy who says, I'd really prefer Japanese, but, you know, German and Portuguese is OK, too. 702 00:39:13,960 --> 00:39:19,740 There aren't all that many Tor users who broadcast that when they make web requests in their HTTP headers. 703 00:39:20,440 --> 00:39:22,540 And then HTTP auth information. 704 00:39:22,940 --> 00:39:30,660 If I log into a forum and I provide some credentials and now I've got auth in my browser and I turn Tor off and I go there again. 705 00:39:30,740 --> 00:39:31,660 It knows who I am. 706 00:39:31,820 --> 00:39:38,680 So a lot of these problems are application level issues when you switch from using Tor to not using Tor or back. 707 00:39:38,840 --> 00:39:44,680 If you just want to lock down the browser and you're going to say, I'm always going to use Tor, then it gets a lot simpler. 708 00:39:44,880 --> 00:39:50,240 But there are a lot of people out there who want to use Tor sometimes and then they want to stop if they want to do other things. 709 00:39:50,620 --> 00:39:55,560 So Mike Perry has a new version of Tor button that he put out last week or so. 710 00:39:55,620 --> 00:39:58,860 Notice the proximity to the first week in August there again. 711 00:39:59,700 --> 00:40:01,600 And and it tackles a lot of these. 712 00:40:01,600 --> 00:40:03,240 Problems, but not all of them. 713 00:40:03,420 --> 00:40:05,560 So there's there's certainly a lot more we need to work on there. 714 00:40:05,900 --> 00:40:09,380 And there are some Firefox privacy bugs that are still around. 715 00:40:09,600 --> 00:40:12,460 One of them is there's no way to configure or spoof time zones. 716 00:40:12,760 --> 00:40:20,720 So that means that if you're running in Windows and you say, hey, I'm in Pacific time and the the website you go to says, hey, here's some little JavaScript. 717 00:40:20,860 --> 00:40:25,000 Can you tell me your date and you'll tell the date and you'll specify what time zone you're in. 718 00:40:25,080 --> 00:40:28,560 And now you've narrowed down where in the world you might be. 719 00:40:29,040 --> 00:40:31,120 There are a lot of other tricky things. 720 00:40:31,600 --> 00:40:37,320 For example, if you've got client side SSL certificates, not that anybody does, I think, because nobody uses that feature, 721 00:40:38,460 --> 00:40:44,260 then your browser will happily present the SSL certificates to whichever website asks for them. 722 00:40:44,560 --> 00:40:47,460 Maybe you have to spoof the domain so you'll be willing to give them. 723 00:40:47,520 --> 00:40:48,360 But that's pretty easy. 724 00:40:48,960 --> 00:40:52,060 So there are some bugs and I'd be happy to chat about those later on. 725 00:40:52,120 --> 00:40:55,280 I imagine Mike Perry will also use the Tor button developer. 726 00:40:56,260 --> 00:40:58,620 So there's some more application level woes, actually. 727 00:40:58,780 --> 00:41:01,200 There are some applications out there that are really bad. 728 00:41:01,200 --> 00:41:02,520 It obeying their proxy settings. 729 00:41:03,120 --> 00:41:08,660 Pretty much all of the plug ins out there can be told to ignore those proxy things. 730 00:41:08,920 --> 00:41:13,840 So if you set up your your Firefox to make sure to proxy through Tor 731 00:41:13,840 --> 00:41:18,080 and then you also get to run Flash and Java and so on, 732 00:41:18,160 --> 00:41:23,820 then the website gives you a Flash applet and the Flash applet says, oh, screw this proxy stuff. 733 00:41:23,980 --> 00:41:25,780 I don't want to do that. I just want to make a direct connection. 734 00:41:26,280 --> 00:41:27,480 Then you're in bad shape. 735 00:41:27,700 --> 00:41:30,840 And H.D. Moore put out an attack like this a few years ago. 736 00:41:31,200 --> 00:41:35,260 And Kyle's had an unending stream of attacks like this. 737 00:41:35,740 --> 00:41:38,640 And I was talking to somebody yesterday and they said, well, yeah, but. 738 00:41:38,940 --> 00:41:42,440 But can you just close all your applications and then toggle Tor? 739 00:41:43,620 --> 00:41:46,500 Maybe. So one of the challenges here is that Windows 740 00:41:47,140 --> 00:41:51,000 and IE are built into each other so much that you can't. 741 00:41:51,120 --> 00:41:54,660 Basically, if you want to switch from using Tor to not using Tor, reboot. 742 00:41:55,760 --> 00:41:57,520 That's the only real answer. 743 00:41:57,660 --> 00:41:59,300 And we'll we'll talk about that in a bit more. 744 00:41:59,400 --> 00:41:59,540 So 745 00:42:01,200 --> 00:42:05,360 the challenge here is how do we switch from Tor as a SOX proxy? 746 00:42:05,420 --> 00:42:09,800 You point your applications to use it into Tor as a transparent proxy. 747 00:42:10,060 --> 00:42:14,740 It intercepts all the outgoing connections and it takes care of your privacy for you. 748 00:42:14,920 --> 00:42:18,360 So this is easy to do in pretty much every OS except Windows. 749 00:42:19,220 --> 00:42:20,720 There are simple system calls. 750 00:42:21,000 --> 00:42:23,020 There are simple IP tables or PF rules. 751 00:42:23,200 --> 00:42:26,740 You basically say, hey, everything that goes out under this user or not under 752 00:42:26,740 --> 00:42:28,940 this user, can you please redirect it over here? 753 00:42:29,060 --> 00:42:30,460 And I'll do a kernel call to say 754 00:42:31,200 --> 00:42:33,560 that connection you just gave me, where did you mean it to go really? 755 00:42:34,060 --> 00:42:35,820 So that that works, except in Windows. 756 00:42:36,000 --> 00:42:40,800 And Windows is a big hassle to do a kernel shim or intercept stuff and so on. 757 00:42:40,960 --> 00:42:43,720 So we've got two sort of models that we're heading towards right now. 758 00:42:44,140 --> 00:42:48,920 One of them is you get a Linux kernel and you run it inside QMU 759 00:42:49,480 --> 00:42:53,400 and you run a Tor client there also and it does the IP table. 760 00:42:53,580 --> 00:42:57,140 So it transparently redirects stuff and you do some sort of 761 00:42:58,620 --> 00:43:00,760 interception magic to try to get all the Windows 762 00:43:00,760 --> 00:43:02,040 connections to go through it. 763 00:43:02,380 --> 00:43:04,120 And at that point, you're great. 764 00:43:04,220 --> 00:43:04,920 You've got a Tor client. 765 00:43:05,220 --> 00:43:07,600 It is your network from Windows's perspective. 766 00:43:07,860 --> 00:43:10,660 And all the stuff that goes out from whatever applications 767 00:43:10,660 --> 00:43:13,740 you're running, it just goes into the Tor client 768 00:43:13,740 --> 00:43:17,300 and Tor either sends it through Tor or drops it if it can't handle it. 769 00:43:17,420 --> 00:43:18,420 So that's one approach. 770 00:43:18,660 --> 00:43:21,140 And that's certainly a promising approach. 771 00:43:21,320 --> 00:43:24,200 We haven't found any yet that are well documented 772 00:43:24,200 --> 00:43:26,420 as well as usable, as well as 773 00:43:27,740 --> 00:43:29,760 explored in terms of specification and what 774 00:43:29,760 --> 00:43:31,080 the actual security properties are. 775 00:43:31,200 --> 00:43:34,520 But I think we're going to get there in hopefully not too long. 776 00:43:34,740 --> 00:43:38,180 Another approach is there's a group called Incognito. 777 00:43:38,300 --> 00:43:41,240 They're working on a live CD and now they have an option 778 00:43:41,240 --> 00:43:46,700 for I want to boot my live CD inside Windows, inside QMU. 779 00:43:46,860 --> 00:43:49,880 So basically there you are in Windows and you click click and now 780 00:43:49,880 --> 00:43:52,420 an entire Linux OS pops up with a Tor client 781 00:43:52,420 --> 00:43:55,220 set up, with IP tables set up correctly, with all 782 00:43:55,220 --> 00:43:57,380 the applications you might want configured correctly. 783 00:43:57,600 --> 00:43:59,160 And then you just use the Firefox 784 00:43:59,760 --> 00:44:03,460 inside your live CD running inside Windows and then you're all set. 785 00:44:03,620 --> 00:44:05,240 You don't have any of those issues with 786 00:44:05,240 --> 00:44:08,480 with applications being able to get around the proxies. 787 00:44:08,720 --> 00:44:11,260 So I'm not sure which of these strategies will be better. 788 00:44:11,640 --> 00:44:15,120 Certainly running the entire OS inside Windows is kind of a hassle. 789 00:44:15,720 --> 00:44:19,720 Another approach, the ideal approach would be to pop up a bunch of different VMs. 790 00:44:19,740 --> 00:44:23,320 So you've got your Windows running in this VM and your Tor running in this VM. 791 00:44:23,560 --> 00:44:25,120 And this one takes care of your network. 792 00:44:25,280 --> 00:44:28,860 But you can shut this one down and start a new one if you want to. 793 00:44:28,940 --> 00:44:29,460 So there are a lot 794 00:44:29,460 --> 00:44:33,420 of ways we can play with running a whole lot of different VMs. 795 00:44:33,460 --> 00:44:37,980 I worry that if we try to get these working well on the Windows 98 computers 796 00:44:37,980 --> 00:44:41,720 in Internet cafes and around, it'll be a real challenge. 797 00:44:42,020 --> 00:44:45,120 So this is certainly something we need to keep on tackling. 798 00:44:46,100 --> 00:44:49,980 Another issue we need to work on filtering connections to Tor. 799 00:44:50,140 --> 00:44:52,760 I had a talk here at DEF CON last year on that. 800 00:44:52,960 --> 00:44:57,800 There are a lot of different ways that people can attack connections to the to the Tor network. 801 00:44:58,020 --> 00:44:59,300 For example, I can 802 00:44:59,460 --> 00:45:01,940 look at the six directory authorities and block those IP addresses. 803 00:45:02,180 --> 00:45:05,160 I can pull down the whole list and block all fifteen hundred IP addresses. 804 00:45:05,480 --> 00:45:09,100 I can look at the actual SSL connections and say, hey, you're talking Tor. 805 00:45:09,220 --> 00:45:12,660 I'm going to block that or I'm going to block the the website. 806 00:45:13,020 --> 00:45:16,220 China a few weeks ago finally blocked TorProject.org. 807 00:45:16,360 --> 00:45:18,000 So we're trying to tackle that. 808 00:45:18,100 --> 00:45:22,580 The approach that we're working on now is bridges and go see last year's talk for that. 809 00:45:22,700 --> 00:45:27,880 The basic idea is you have a lot of users who can relay traffic from the blocked user 810 00:45:28,460 --> 00:45:29,360 through the Tor client. 811 00:45:29,460 --> 00:45:30,300 Into the Tor network. 812 00:45:31,220 --> 00:45:34,220 OK, so a few last thoughts on research. 813 00:45:34,800 --> 00:45:35,540 Traffic confirmation. 814 00:45:35,960 --> 00:45:37,900 This is the big attack against Tor. 815 00:45:38,080 --> 00:45:43,240 If you can see the connection into Tor and you can see the connection out of Tor, then you win. 816 00:45:43,740 --> 00:45:47,280 Simple math means that you look at the patterns and you say, hey, wait a minute. 817 00:45:47,340 --> 00:45:48,280 These are the same flows. 818 00:45:48,500 --> 00:45:50,500 I'm pretty sure this Alice is talking to this Bob. 819 00:45:50,760 --> 00:45:54,500 And there are some research designs out there, defensive dropping, adaptive padding. 820 00:45:54,680 --> 00:45:59,220 They kind of sort of work, but not really, because the attacks are are producing 821 00:45:59,460 --> 00:46:02,100 even better and better versions of the simple math. 822 00:46:02,340 --> 00:46:05,820 For example, Stephen Murdoch had a paper a little while ago where he said Internet 823 00:46:05,820 --> 00:46:09,880 exchanges get to see a lot of traffic, but they can't log all of it because they see too much. 824 00:46:10,020 --> 00:46:10,780 So they sample. 825 00:46:11,120 --> 00:46:16,160 I'm going to do a traffic confirmation attack when I only get to see one out of every thousand packets. 826 00:46:16,780 --> 00:46:19,580 And he still produced a good attack that worked quickly. 827 00:46:19,680 --> 00:46:21,520 You didn't have to have a very large flow. 828 00:46:21,700 --> 00:46:23,200 So that's really scary. 829 00:46:24,880 --> 00:46:26,160 Website fingerprinting is another one. 830 00:46:26,340 --> 00:46:29,440 So it's been well known for a while that if you look in SSL, 831 00:46:29,460 --> 00:46:34,500 at an SSL connection, you can guess what's inside based on how long the SSL connection is. 832 00:46:34,620 --> 00:46:37,280 You can say, hey, you've just fetched an eight kilobyte thing. 833 00:46:37,500 --> 00:46:40,340 I'm pretty sure the eight kilobyte thing comes from this website. 834 00:46:40,660 --> 00:46:42,240 So does the attack work on Tor? 835 00:46:42,380 --> 00:46:47,520 Can you look at the traffic coming out of a Tor client and say, well, she fetched an eight kilobyte thing. 836 00:46:47,660 --> 00:46:51,720 So it wasn't CNN's front page, but it might have been BBC's front page. 837 00:46:52,240 --> 00:46:53,800 I don't know. Open research question. 838 00:46:54,200 --> 00:46:57,000 Some people believe that they've gotten it to work. 839 00:46:57,100 --> 00:46:59,180 Some people haven't. I haven't seen anything convincing. 840 00:46:59,460 --> 00:47:02,180 Either way. But it can probably be made to work. 841 00:47:02,340 --> 00:47:03,340 And that's kind of bad. 842 00:47:03,500 --> 00:47:07,920 It can be made to work even faster if you not just look at one website, but you say, 843 00:47:08,080 --> 00:47:12,440 Alice pulled down an eight kilobyte thing and then she pulled down a 32 kilobyte thing. 844 00:47:12,620 --> 00:47:18,220 How many websites have eight kilobytes on their front page and 32 kilobytes on their top news story? 845 00:47:18,680 --> 00:47:19,440 Not so many. 846 00:47:19,860 --> 00:47:23,560 So I bet that will be a good attack and we don't have good defenses against it. 847 00:47:24,280 --> 00:47:25,460 Clogging and congestion attacks. 848 00:47:25,860 --> 00:47:28,560 So once upon a time, Stephen Murdock and George 849 00:47:28,560 --> 00:47:35,780 Dennis had an attack in 2005 that said, we're going to we're going to try to identify every relay that Alice is using. 850 00:47:35,880 --> 00:47:41,300 So they built a circuit through all the relays in the Tor network and send constant rate traffic through them. 851 00:47:41,480 --> 00:47:51,340 And when Alice connected to their Web server, they dumped as large a stream as they could on her as large as large a flow as they could and looked for which three relays had a hiccup. 852 00:47:51,440 --> 00:47:56,520 And then they said, aha, these three got affected, got congested, got clogged. 853 00:47:56,520 --> 00:47:58,460 When Alice started using the network. 854 00:47:58,560 --> 00:48:00,300 So these are the three that she's using. 855 00:48:00,460 --> 00:48:03,940 But that was OK because we didn't actually identify the location of Alice. 856 00:48:04,160 --> 00:48:07,820 We just identified the three circuit servers that she's using. 857 00:48:07,960 --> 00:48:11,380 You'll hear more about that attack this afternoon from Christian and Nate. 858 00:48:12,280 --> 00:48:18,300 So Nick Hopper actually has a cool attack from last year where he looks at the latency of these things. 859 00:48:18,380 --> 00:48:22,960 If you can guess what the three servers are, build your own path through those three servers. 860 00:48:23,160 --> 00:48:28,080 You know, the latency from your Tor client to the Web server, you know, you're the latency from your 861 00:48:28,080 --> 00:48:29,700 Tor client to the entry guard. 862 00:48:30,180 --> 00:48:33,920 Now you can subtract and now you know the latency from the entry guard to your victim. 863 00:48:34,580 --> 00:48:37,480 Now, are there latency tables out there? 864 00:48:37,560 --> 00:48:44,060 Can I say given that the latency from the entry node to my victim is eighty seven milliseconds, 865 00:48:44,420 --> 00:48:47,300 I know what IP address she's got, what network she's on. 866 00:48:47,820 --> 00:48:50,200 I don't know. Maybe that's kind of worrying. 867 00:48:51,120 --> 00:48:56,860 And there's actually a group at Columbia who has a newer version of this where they look at the bandwidth. 868 00:48:58,080 --> 00:49:03,780 They've got a way of remotely measuring bandwidth and they can say here I'm going to look for little hiccups. 869 00:49:03,980 --> 00:49:06,480 So I'm not just going to look at the relays for hiccups. 870 00:49:06,640 --> 00:49:12,360 I'm going to actually step back one step at a time on the actual routers and try to trace the flow back to Alice. 871 00:49:12,780 --> 00:49:14,220 Does that work? Maybe. 872 00:49:14,360 --> 00:49:16,240 I don't know. They've got like six data points. 873 00:49:16,460 --> 00:49:19,520 Some of them work. We're working with them to try to get some more data points. 874 00:49:21,040 --> 00:49:27,240 OK, so I'm going to talk about a few issues that we don't have a good handle on yet. 875 00:49:28,080 --> 00:49:29,780 Traffic correlation is just going to get better. 876 00:49:29,900 --> 00:49:36,020 If you can see the flows coming into Tor and going out of Tor, there are so many different ways to do the math. 877 00:49:37,180 --> 00:49:45,900 And so, for example, let's imagine some very innocent ISP operator puts up an MRTG graph of how much bandwidth they've pushed over time. 878 00:49:46,160 --> 00:49:50,980 What happens if the entry node puts up an MRTG graph and the exit node puts up a graph? 879 00:49:51,220 --> 00:49:57,580 And some smart researcher says, hey, I can do math on this one and that one and identify who's been talking when. 880 00:49:58,320 --> 00:49:59,200 That would be bad. 881 00:49:59,320 --> 00:50:01,420 Somebody else set up a smoke ping data. 882 00:50:01,560 --> 00:50:05,540 Smoke ping is this thing that pings a whole lot of servers and puts up cool graphs and so on. 883 00:50:05,640 --> 00:50:12,200 If you can look at the latency, are you doing a congestion detection attack all the time against all of these servers? 884 00:50:12,760 --> 00:50:17,120 I have no idea how well any of this will work, but it scares me. 885 00:50:17,460 --> 00:50:19,840 I'd be happy to chat with you about it later on. 886 00:50:20,780 --> 00:50:23,580 Countries are going to keep blocking the Tor network even more and more. 887 00:50:24,140 --> 00:50:27,780 There are a lot of press articles out even this week from the Guardian. 888 00:50:28,080 --> 00:50:34,320 And stuff like that about China and the Olympics and how China keeps saying, well, we're totally open. 889 00:50:34,440 --> 00:50:38,180 We've opened up our whole network except for all those bad things that nobody would want to look at. 890 00:50:38,600 --> 00:50:41,240 And there are a lot of journalists who are kind of upset about that. 891 00:50:41,400 --> 00:50:42,420 We'll see how that goes. 892 00:50:43,120 --> 00:50:47,520 But once they start blocking the Tor network, then we have to deploy our bridges design. 893 00:50:47,740 --> 00:50:49,240 And that's going to be an arms race. 894 00:50:49,380 --> 00:50:56,820 And there have been some bugs that we fixed already in terms of having an attacker easily be able to enumerate all the servers out there. 895 00:50:56,920 --> 00:50:57,700 And there are. 896 00:50:58,080 --> 00:51:00,620 There are doubtless going to be more bugs like that that we have to fix. 897 00:51:01,360 --> 00:51:07,180 And then another issue that we really need to pay a lot of attention to is data retention in Germany right now. 898 00:51:07,280 --> 00:51:13,780 And all across the EU, they're working on laws that say you have to write down all the traffic headers you see. 899 00:51:13,880 --> 00:51:17,980 We're not going to tell you what a traffic header is for six months or two years or something. 900 00:51:18,200 --> 00:51:20,580 And Germany goes several steps farther. 901 00:51:20,720 --> 00:51:22,680 So how many layers of logging are there? 902 00:51:22,740 --> 00:51:23,920 Does the Tor server have to log? 903 00:51:24,020 --> 00:51:25,240 Does the ISP have to log? 904 00:51:25,320 --> 00:51:27,000 Does the tier one ISP have to log? 905 00:51:27,000 --> 00:51:33,080 We hear every week about a new company in California that just accidentally lost its whole database about customers. 906 00:51:33,360 --> 00:51:37,280 Are these guys going to be able to keep these huge traffic databases safe? 907 00:51:37,800 --> 00:51:41,920 Probably not, especially if they need to provide real time access to law enforcement. 908 00:51:42,080 --> 00:51:46,240 Whatever real time means, whatever access means and whatever law enforcement means. 909 00:51:46,620 --> 00:51:49,120 So this is going to be a little bit tricky. 910 00:51:49,240 --> 00:51:54,000 So I have the slide reused for my December talk at 24C3. 911 00:51:54,140 --> 00:51:56,060 And the bottom of it says, but hey, 912 00:51:56,060 --> 00:52:00,260 they're not going to enforce it until 2009, so we've got plenty of time to overthrow the law. 913 00:52:00,540 --> 00:52:02,680 We're running out of time to overthrow the law. 914 00:52:02,920 --> 00:52:06,800 So we're going to have to start thinking about designs where we say, I'm sorry, 915 00:52:06,900 --> 00:52:09,420 no Tor servers in Germany, they're worse than China. 916 00:52:10,460 --> 00:52:16,920 Or I'm not sure how we can balance these things and still make use of servers in a country that logs everything. 917 00:52:18,100 --> 00:52:20,820 And then a few last lessons learned here. 918 00:52:20,920 --> 00:52:25,460 A lot of these are hard research problems and good attacks against all 919 00:52:26,060 --> 00:52:29,200 latency anonymity systems. If you're trying to get your website, 920 00:52:29,700 --> 00:52:34,720 your web page from the website through the anonymity system to Tor quickly enough 921 00:52:34,720 --> 00:52:36,700 that your user doesn't get pissed off and leave, 922 00:52:36,980 --> 00:52:40,460 then you're going to be vulnerable to these end to end correlation attacks. 923 00:52:40,760 --> 00:52:43,380 If somebody can see both sides, they're going to be able to win. 924 00:52:44,220 --> 00:52:46,640 So it's not just Tor that's vulnerable to these. 925 00:52:46,740 --> 00:52:48,200 It's a lot of other systems out there. 926 00:52:48,320 --> 00:52:51,020 And this is a little bit tricky in terms of educating the masses. 927 00:52:51,160 --> 00:52:55,380 I was talking to a journalist a while ago and she wrote a nice article about Tor. 928 00:52:55,500 --> 00:52:55,800 And then 929 00:52:56,060 --> 00:53:00,140 at the end she said the Tor developers recommend you use something else for now 930 00:53:00,140 --> 00:53:05,020 because Tor isn't really perfect. No, we don't recommend you use something else for now. 931 00:53:05,160 --> 00:53:07,400 All of these are broken by these various attacks. 932 00:53:07,720 --> 00:53:10,200 Tor is the best approach that we know of right now. 933 00:53:10,420 --> 00:53:14,800 Other than if you really need good anonymity, consider not using the Internet. 934 00:53:16,720 --> 00:53:18,560 I'd like to have a better answer than that. 935 00:53:18,580 --> 00:53:19,960 There are a lot of people who really need 936 00:53:19,960 --> 00:53:23,420 to use the Internet, so they need to understand the tradeoffs. 937 00:53:24,440 --> 00:53:25,820 So another lesson here. 938 00:53:26,060 --> 00:53:29,940 A lot of these bugs were found and a lot of these attacks were reported because we 939 00:53:29,940 --> 00:53:34,540 have all of these design documents and we've written down exactly how you work 940 00:53:34,540 --> 00:53:37,700 with Tor and we've made it easy to build controllers and to do research. 941 00:53:37,920 --> 00:53:41,500 And that means that people use Tor as their test and they come to us and they 942 00:53:41,500 --> 00:53:44,280 say, hey, here's the research I did. I think I can break Tor like this. 943 00:53:44,540 --> 00:53:50,140 So the lesson is make sure that you provide openness and then people will be 944 00:53:50,140 --> 00:53:53,480 able to understand how your system works and they'll be able to provide attacks 945 00:53:53,920 --> 00:53:55,540 and hopefully be able to provide defenses. 946 00:53:56,100 --> 00:54:01,720 And the other lesson of that is we'd love to hear from you if you have any thoughts on attacks. 947 00:54:02,220 --> 00:54:06,580 And then the last lesson, as my goon comes up to pull me off stage, 948 00:54:06,780 --> 00:54:11,800 is pretty much any Tor bug here turns into an anonymity bug. 949 00:54:12,020 --> 00:54:15,320 There have been a lot of simple ones like, you know, maybe your 950 00:54:16,000 --> 00:54:19,900 certain keys don't get built correctly or maybe you can do an infinite length 951 00:54:19,900 --> 00:54:21,700 circuit or maybe you can do some other attack. 952 00:54:22,680 --> 00:54:25,960 Each time we come up with a bug that looks like it's just 953 00:54:26,060 --> 00:54:29,580 a simple hassle and we should fix it, somebody comes up with an anonymity 954 00:54:29,580 --> 00:54:34,120 attack that turns it into a security problem, not just an oops, I built it wrong. 955 00:54:34,700 --> 00:54:38,220 So there are a lot of lessons we can learn about that. 956 00:54:38,600 --> 00:54:39,280 Anonymity is tough. 957 00:54:40,100 --> 00:54:44,280 OK, so I'm out of time and I'd love to chat with any of you later on. 958 00:54:44,340 --> 00:54:48,080 I'm going to be in room 105, directly down the hall. 959 00:54:48,280 --> 00:54:48,820 Thank you.