1 00:00:00,000 --> 00:00:03,840 Hello everyone. I guess we are about ready to get started. 2 00:00:05,320 --> 00:00:13,920 So this is a two hour block, but I'll be dividing it up into two intermissions for Q&A. 3 00:00:14,100 --> 00:00:18,860 So be sure to have questions in your mind and ready, and don't be afraid to ask a question. 4 00:00:18,920 --> 00:00:24,960 If you have a question, something's on your mind, it's likely that at least five other people that occurred to them too. 5 00:00:24,960 --> 00:00:32,600 So don't be afraid to ask questions. It's very important to make sure that everybody understands everything that's going on, 6 00:00:32,620 --> 00:00:36,040 that I haven't overlooked anything, or I'm not making some crucial mistake, 7 00:00:36,260 --> 00:00:40,040 because obviously this is, in the imperfect tense, securing the Tor network. 8 00:00:40,320 --> 00:00:45,300 I'm not saying, oh, everything is solved forever, for sure, this is it. It's an ongoing process. 9 00:00:46,340 --> 00:00:50,880 Okay, so who the hell am I? I'm a volunteer Tor developer. 10 00:00:51,080 --> 00:00:53,860 I work on Tor because I think it's important. 11 00:00:53,860 --> 00:00:56,000 For a few reasons that I'll get into later. 12 00:00:57,500 --> 00:00:59,920 Professionally, I'm a forward and reverse engineer. 13 00:01:00,200 --> 00:01:10,420 I write C++ code and reverse engineer the Microsoft Exchange protocol, along with a few others, for Riverbed Technology. 14 00:01:10,980 --> 00:01:16,340 This is a company, shameless plug time, just to berate you people about my employer. 15 00:01:16,980 --> 00:01:22,060 We make WAN accelerators, essentially we make WAN traffic fast for companies, 16 00:01:22,580 --> 00:01:23,840 large companies with lots of traffic. 17 00:01:23,860 --> 00:01:25,400 Lots of branch offices all over the place. 18 00:01:26,460 --> 00:01:31,720 Significant accelerations for Windows file sharing that's done across a distributed intranet. 19 00:01:33,120 --> 00:01:43,820 Also significant 5 to 50x enhancements of improvement of performance for Microsoft Exchange. 20 00:01:44,220 --> 00:01:45,780 That's the protocol that I work on. 21 00:01:46,060 --> 00:01:51,180 We also do protocol independent data reduction, so if you send some data over Exchange, 22 00:01:51,180 --> 00:01:56,440 the next time you fetch it via the Windows file share, it's also cached and accelerated. 23 00:01:57,780 --> 00:01:59,800 And we are pretty good at it. 24 00:02:00,560 --> 00:02:03,620 When we go head to head against any of our competitors, 90% win rate. 25 00:02:04,040 --> 00:02:08,260 We are outselling Cisco 2 to 1, and they're pretty anti-competitive about their practices. 26 00:02:08,400 --> 00:02:14,200 They give significant deals on a lot of their WAN acceleration equipment for people who have Cisco gear. 27 00:02:14,740 --> 00:02:17,240 And we're still significantly outselling them. 28 00:02:17,300 --> 00:02:17,980 So we're pretty successful. 29 00:02:18,340 --> 00:02:19,600 That's the end of that plug. 30 00:02:19,680 --> 00:02:20,740 If you're interested in... 31 00:02:21,180 --> 00:02:24,720 in that company and work in reverse engineering, fuzzing network protocols, 32 00:02:25,700 --> 00:02:28,680 you know, C++ development, network programming, 33 00:02:29,840 --> 00:02:33,340 pretty much on Linux, of course, 34 00:02:34,320 --> 00:02:39,880 come talk to me afterwards or whatever and we can discuss, you know, setting you up with an interview or whatever. 35 00:02:40,360 --> 00:02:45,620 So preaching to the choir about why I think Tor is important for normal people. 36 00:02:46,620 --> 00:02:49,900 There's a lot of talk about, you know, it should be... 37 00:02:49,900 --> 00:02:51,200 it's a censorship resistance tool. 38 00:02:51,360 --> 00:02:55,200 It's for political dissidents, people who are under oppressive firewalls. 39 00:02:55,220 --> 00:02:59,380 But I think there's a compelling argument for normal people for basic data hygiene 40 00:02:59,380 --> 00:03:04,220 to keep their IP address out of essentially marketing databases. 41 00:03:05,280 --> 00:03:09,620 We don't really yet understand the consequences of having all of our, you know, 42 00:03:09,620 --> 00:03:13,220 essentially thoughts that we enter into Google whenever we come up with some idea 43 00:03:13,900 --> 00:03:17,260 archived and tied to our IP address, which is essentially our identity. 44 00:03:17,640 --> 00:03:18,580 And then... 45 00:03:18,580 --> 00:03:20,160 maybe not in the case of Google. 46 00:03:20,260 --> 00:03:25,280 Google has, you know, they do significant work to try and make sure that they protect 47 00:03:25,880 --> 00:03:28,620 the data that they do massively acquire on all of us. 48 00:03:29,440 --> 00:03:32,600 But in other companies, bought and sold to whoever. 49 00:03:33,900 --> 00:03:38,800 So the second point, you know, like I said, Google might not be that horribly evil, 50 00:03:38,900 --> 00:03:40,840 but I read my ISP's privacy policy. 51 00:03:40,980 --> 00:03:47,380 In fact, they tell me that they do gather my data in aggregate for marketing purposes. 52 00:03:47,600 --> 00:03:48,120 It's not a... 53 00:03:48,580 --> 00:03:51,140 I wouldn't specifically say it's not uniquely attributed to me, 54 00:03:51,240 --> 00:03:56,780 but they do mention that they gather aggregate data on the Internet usage 55 00:03:56,780 --> 00:03:59,140 for marketing and other performance purposes. 56 00:03:59,600 --> 00:04:03,340 So, you know, this sort of infrastructure is already... 57 00:04:03,340 --> 00:04:05,100 people are already thinking about this. 58 00:04:06,120 --> 00:04:10,740 Ways to use our data to either sell us products or see what sort of things we're interested in. 59 00:04:10,880 --> 00:04:13,280 And some things we might want to be able to opt out on. 60 00:04:13,400 --> 00:04:17,500 And if all of this is tied to our IP address, we don't really have a choice without Tor. 61 00:04:17,500 --> 00:04:21,100 And this sort of information can come back to get us in unexpected ways. 62 00:04:21,540 --> 00:04:26,660 If you're involved in a lawsuit, discovery can cause this information to turn up. 63 00:04:26,740 --> 00:04:29,140 If it's subpoenaed and a judge agrees that it's relevant, 64 00:04:29,500 --> 00:04:35,240 the other party that may have that data, to my knowledge of the law, is obliged to comply. 65 00:04:36,040 --> 00:04:38,200 This can also happen in bitter divorce cases. 66 00:04:38,540 --> 00:04:42,040 And, you know, marketing spam can just randomly show up at your door. 67 00:04:42,120 --> 00:04:47,480 Or if you have products shipped to your work, embarrassing catalogs can start showing up at your work. 68 00:04:47,480 --> 00:04:49,040 Which has actually happened to me. 69 00:04:50,420 --> 00:04:53,020 Based on stuff that you have purchased. 70 00:04:53,560 --> 00:04:58,200 And have had shipped to your work because it's convenient to have that southward, you know, 71 00:04:58,220 --> 00:05:01,160 lockpick set sent to your work so you can just pick it up or whatever. 72 00:05:01,420 --> 00:05:04,940 Rather than risk it being stolen at your apartment or whatever. 73 00:05:06,460 --> 00:05:12,020 So, all sorts of sticky issues with privacy that normal people need to be concerned about. 74 00:05:13,000 --> 00:05:15,020 Okay, so what is Tor? Quick overview. 75 00:05:15,620 --> 00:05:17,180 For those of you who might not be familiar with it, 76 00:05:17,480 --> 00:05:21,220 it's been five, no, four hours of Tor talk so far. 77 00:05:21,440 --> 00:05:22,840 But just a quick recap. 78 00:05:23,140 --> 00:05:28,600 You run a client, the Tor client, that acts as a SOX proxy that you connect your applications to. 79 00:05:29,360 --> 00:05:32,140 When your applications connect to this SOX proxy, 80 00:05:32,340 --> 00:05:37,720 they issue, they're translated into what Tor calls streams. 81 00:05:38,280 --> 00:05:46,060 These streams are then multiplexed on top of encrypted paths that are, that Tor calls circuits. 82 00:05:46,060 --> 00:05:53,120 And then these circuits are in turn multiplexed over TLS, SSL connections between the individual relay nodes 83 00:05:53,120 --> 00:05:56,440 that are run by volunteers all over the world. 84 00:05:57,120 --> 00:06:00,200 These circuits, these paths that your client chooses, 85 00:06:00,820 --> 00:06:02,160 consists of three nodes. 86 00:06:02,820 --> 00:06:06,800 What's called the guard node, the relay or middle node, and then the exit. 87 00:06:06,980 --> 00:06:11,840 These nodes are chosen probabilistically by your client proportional to their bandwidth. 88 00:06:13,820 --> 00:06:15,540 So here's a diagram. 89 00:06:16,060 --> 00:06:18,960 And that illustrates some properties, some important, 90 00:06:18,980 --> 00:06:21,580 the important multiplexing properties that I talked about before. 91 00:06:21,880 --> 00:06:27,060 You have two clients essentially choosing two different circuits or paths through the network 92 00:06:27,060 --> 00:06:29,460 going through this first hop called the guard node. 93 00:06:29,640 --> 00:06:31,660 The reason for that term I'll get into later. 94 00:06:31,900 --> 00:06:35,640 These two clients are multiplexed over the same TLS connection 95 00:06:35,640 --> 00:06:38,020 in this middle hop between the guard and the relay. 96 00:06:39,420 --> 00:06:43,540 And then they diverge off at the relay onto different exits. 97 00:06:43,860 --> 00:06:45,560 Now the second client has that, 98 00:06:46,060 --> 00:06:53,700 the TCP SOCKS being multiplexed over the circuit 99 00:06:54,580 --> 00:06:57,760 being routed through the second path and it goes through the single circuit 100 00:06:57,760 --> 00:07:03,140 the individual hops of which are unable to see that there are multiple streams on the circuit 101 00:07:03,140 --> 00:07:04,960 other than timing information 102 00:07:05,800 --> 00:07:09,660 until it is finally split up by the exit node to connect to whatever, 103 00:07:09,820 --> 00:07:13,560 maybe a couple of fetches from the same server or a couple of different servers. 104 00:07:14,760 --> 00:07:19,220 The below diagram illustrates essentially the crypto behind this 105 00:07:19,220 --> 00:07:23,060 and why it is that the guard node doesn't know who your exit node is. 106 00:07:23,320 --> 00:07:28,440 Essentially each node publishes a series of public keys in the Tor directory 107 00:07:28,440 --> 00:07:32,580 and then your client uses these public keys to negotiate 108 00:07:32,580 --> 00:07:37,740 a layered encrypted channel to each successive hop. 109 00:07:38,000 --> 00:07:40,060 So first you negotiate a secret key. 110 00:07:40,360 --> 00:07:43,100 First you make the TLS connection to node X. 111 00:07:43,100 --> 00:07:46,340 Then you negotiate a secret key with node X. 112 00:07:46,700 --> 00:07:48,780 Through that channel you tell node X, 113 00:07:48,960 --> 00:07:54,240 please help me negotiate a secret key and make a connection to node Y. 114 00:07:54,620 --> 00:07:58,680 And then through encrypting with that secret key 115 00:07:58,680 --> 00:08:03,580 you then instruct node Y to extend to node Z 116 00:08:03,580 --> 00:08:05,540 and negotiate another secret key. 117 00:08:05,800 --> 00:08:11,200 This process of adding additional hops to your path in Tor parlance 118 00:08:11,200 --> 00:08:13,540 is known as circuit extending. 119 00:08:13,880 --> 00:08:19,120 And you can iteratively extend your circuit effectively as long as you want. 120 00:08:19,240 --> 00:08:24,940 And I believe there was one attack to try and essentially DOS the network 121 00:08:24,940 --> 00:08:26,100 by making infinite paths. 122 00:08:26,560 --> 00:08:28,980 I think there are some protections against that, 123 00:08:29,020 --> 00:08:32,660 but I'm not entirely familiar with what those are. 124 00:08:33,920 --> 00:08:37,560 Roger can probably offer that up during Q&A or whatever. 125 00:08:40,140 --> 00:08:40,820 Passive attacks. 126 00:08:41,640 --> 00:08:44,620 So as far as how to secure this network. 127 00:08:44,980 --> 00:08:47,720 So in order to secure the Tor network, 128 00:08:47,940 --> 00:08:50,180 we really have to look at it from an attacker's point of view. 129 00:08:50,380 --> 00:08:52,300 We have to understand the types of attacks, 130 00:08:52,480 --> 00:08:53,760 the motivation of the attacker, 131 00:08:54,740 --> 00:08:56,640 what the attacker is going to do, 132 00:08:56,660 --> 00:08:57,740 and how he's going to do it. 133 00:08:58,920 --> 00:09:01,120 So first we should classify these attacks 134 00:09:01,120 --> 00:09:05,140 as to what sort of actions the attacker is going to do. 135 00:09:05,160 --> 00:09:06,540 Are they going to just observe traffic? 136 00:09:06,540 --> 00:09:10,180 Or are they going to actively modify traffic? 137 00:09:10,660 --> 00:09:12,840 So under just observing traffic, 138 00:09:13,120 --> 00:09:17,760 we have things like packet and connection timing correlation. 139 00:09:18,060 --> 00:09:21,140 Looking at things like when does the connection start, 140 00:09:21,400 --> 00:09:22,560 how many packets are involved, 141 00:09:22,840 --> 00:09:24,220 the pattern of those packets, 142 00:09:24,460 --> 00:09:25,560 and when does it finish. 143 00:09:26,580 --> 00:09:28,720 We also have things like fingerprinting, 144 00:09:28,720 --> 00:09:33,680 noting what a particular website fetch looks like through Tor. 145 00:09:33,960 --> 00:09:35,420 Fetch of Wikipedia, 146 00:09:35,420 --> 00:09:37,300 a particular Wikipedia page, 147 00:09:37,580 --> 00:09:41,020 may exhibit a particular fingerprinting pattern, 148 00:09:41,020 --> 00:09:44,660 a particular pattern of cells of encrypted packets 149 00:09:44,660 --> 00:09:49,000 that a guard node or an ISP is able to just recognize. 150 00:09:50,520 --> 00:09:52,860 Intersection attacks are more subtle and more broad. 151 00:09:53,140 --> 00:09:55,640 Basically this is something that you can do passively 152 00:09:55,640 --> 00:10:00,420 to catalog a bunch of different attributes of users 153 00:10:00,420 --> 00:10:02,560 and add all those attributes up. 154 00:10:05,580 --> 00:10:09,300 Active attacks include things like lying about your bandwidth 155 00:10:09,300 --> 00:10:10,160 to get more traffic. 156 00:10:10,220 --> 00:10:13,180 As I said, your path through Tor is 157 00:10:13,180 --> 00:10:16,060 you choose your nodes probabilistically 158 00:10:16,060 --> 00:10:18,540 according to the advertised bandwidth 159 00:10:18,540 --> 00:10:20,940 that a node says it can carry. 160 00:10:21,160 --> 00:10:23,560 So if the node says it can carry more traffic, 161 00:10:23,680 --> 00:10:25,700 then you have a higher probability of choosing them 162 00:10:25,700 --> 00:10:28,620 and that node should get more clients connecting to it. 163 00:10:29,200 --> 00:10:31,100 Failing circuits to bias node selection, 164 00:10:31,260 --> 00:10:31,900 that's another one. 165 00:10:31,900 --> 00:10:37,400 You can try and modify how the path is chosen by a client 166 00:10:37,400 --> 00:10:38,640 by failing circuits arbitrarily. 167 00:10:38,940 --> 00:10:43,600 And you can modify application layer traffic at the exit 168 00:10:43,600 --> 00:10:44,920 to do things like insert plug-ins. 169 00:10:45,040 --> 00:10:47,120 And we'll be getting into more of these specific examples 170 00:10:47,120 --> 00:10:48,240 in more detail later. 171 00:10:48,360 --> 00:10:50,520 This is basically just to understand this classification idea. 172 00:10:52,040 --> 00:10:55,320 So the position of the attack is another variable, 173 00:10:55,440 --> 00:10:58,300 another dimension on the classification of these attacks. 174 00:10:58,620 --> 00:11:00,260 You can have an internal adversary 175 00:11:00,260 --> 00:11:02,480 that is a node operator 176 00:11:02,480 --> 00:11:04,620 that is able to see inside and say, 177 00:11:04,700 --> 00:11:07,260 okay, well, they can see past that TLS multiplexing 178 00:11:07,800 --> 00:11:09,460 and see the individual circuits 179 00:11:09,460 --> 00:11:11,120 that are flowing through their node. 180 00:11:12,760 --> 00:11:14,600 They're also, at the exit node, 181 00:11:14,720 --> 00:11:17,220 they're also able to see past the stream 182 00:11:17,220 --> 00:11:19,180 on top of circuit multiplexing 183 00:11:19,180 --> 00:11:23,040 and be able to determine which streams 184 00:11:23,040 --> 00:11:25,600 are associated to a particular circuit. 185 00:11:26,020 --> 00:11:28,320 This ability gives them, 186 00:11:29,520 --> 00:11:32,120 has certain attacks that sort of fall out of that, 187 00:11:32,220 --> 00:11:33,540 which we'll get to later as well. 188 00:11:34,720 --> 00:11:36,120 The external adversary 189 00:11:36,120 --> 00:11:39,680 is an ISP or echelon-style adversary. 190 00:11:40,000 --> 00:11:44,440 They are able to observe large portions of the Tor network 191 00:11:46,040 --> 00:11:47,440 or multiple nodes, 192 00:11:47,940 --> 00:11:49,620 but they're assumed to be unable to see 193 00:11:49,620 --> 00:11:52,780 inside the node-to-node TLS streams. 194 00:11:54,420 --> 00:11:57,180 And it has yet to be proven, 195 00:11:57,180 --> 00:12:00,940 but it is likely that due to a couple of factors, 196 00:12:01,060 --> 00:12:02,960 in my opinion, 197 00:12:03,040 --> 00:12:06,220 that these sorts of adversaries should be frustrated 198 00:12:06,220 --> 00:12:08,880 by users who run Tor nodes 199 00:12:08,880 --> 00:12:13,300 as both a node and for their client usage. 200 00:12:13,540 --> 00:12:14,820 The reason for this is essentially 201 00:12:14,820 --> 00:12:16,860 the three main characteristics 202 00:12:16,860 --> 00:12:18,320 for a successful timing attack 203 00:12:18,320 --> 00:12:19,620 have been demonstrated to be 204 00:12:20,580 --> 00:12:23,200 the time of the start of the stream, 205 00:12:23,420 --> 00:12:25,120 essentially the number of packets, 206 00:12:25,120 --> 00:12:27,440 and the end of the stream. 207 00:12:27,740 --> 00:12:30,380 And if you are running a node, 208 00:12:30,560 --> 00:12:32,100 you are going to be multiplexing 209 00:12:32,100 --> 00:12:35,340 other people's traffic through that node. 210 00:12:35,480 --> 00:12:36,940 An external adversary is only going to be able 211 00:12:36,940 --> 00:12:38,080 to see these TLS connections. 212 00:12:38,860 --> 00:12:40,960 Queuing delays are going to come into effect 213 00:12:40,960 --> 00:12:44,040 and cause issues with the adversary 214 00:12:44,040 --> 00:12:45,620 being able to tell the exact start 215 00:12:45,620 --> 00:12:47,560 of when your connection started. 216 00:12:48,120 --> 00:12:51,560 They're going to make it difficult 217 00:12:51,560 --> 00:12:52,900 to determine the number of packets 218 00:12:52,900 --> 00:12:53,660 in that connection, 219 00:12:53,660 --> 00:12:55,840 even if they're trying to calculate 220 00:12:55,840 --> 00:12:58,780 the differences between packets entering and leaving. 221 00:12:59,000 --> 00:13:01,840 If your traffic is throttled at a constant rate, 222 00:13:02,040 --> 00:13:04,180 this is going to frustrate them to some degree, 223 00:13:04,320 --> 00:13:05,160 to some unknown degree. 224 00:13:05,420 --> 00:13:07,060 Maybe possibly marginal, 225 00:13:07,200 --> 00:13:08,680 but I think it should be. 226 00:13:09,100 --> 00:13:11,100 There's some hope there. 227 00:13:12,580 --> 00:13:14,020 So where can Tor, 228 00:13:14,180 --> 00:13:14,980 where does this look like 229 00:13:14,980 --> 00:13:16,960 if we look at that same path diagram 230 00:13:16,960 --> 00:13:18,100 that I displayed earlier? 231 00:13:19,760 --> 00:13:21,520 Obviously, there's a lot of places 232 00:13:21,520 --> 00:13:22,500 that Tor can be attacked. 233 00:13:22,620 --> 00:13:23,540 In fact, it can be attacked 234 00:13:23,660 --> 00:13:24,360 pretty much everywhere. 235 00:13:25,140 --> 00:13:26,620 Possibly even there should be some arrows 236 00:13:26,620 --> 00:13:28,480 for these TLS links there. 237 00:13:28,600 --> 00:13:30,540 Only 1024-bit RSA keys, 238 00:13:30,660 --> 00:13:31,820 and some nodes have been around 239 00:13:31,820 --> 00:13:32,960 for a real long time, 240 00:13:33,200 --> 00:13:35,000 five-ish years. 241 00:13:35,460 --> 00:13:37,900 The age of the network is, 242 00:13:37,960 --> 00:13:39,140 I believe, five, six years. 243 00:13:40,660 --> 00:13:42,480 So we're starting to get close to 244 00:13:42,480 --> 00:13:44,120 what, in my opinion, 245 00:13:44,140 --> 00:13:45,120 would be a comfortable lifetime 246 00:13:45,120 --> 00:13:47,180 for a 1024-bit RSA key. 247 00:13:47,260 --> 00:13:47,980 I believe there are plans 248 00:13:47,980 --> 00:13:52,440 to allow versioning of the protocol 249 00:13:52,440 --> 00:13:54,260 and possibly allow multi-sized 250 00:13:54,260 --> 00:13:55,640 and alternate keys. 251 00:13:55,760 --> 00:13:56,980 This was at least discussed 252 00:13:56,980 --> 00:13:58,720 on IRC at one point. 253 00:14:00,760 --> 00:14:02,320 So to break this down 254 00:14:02,320 --> 00:14:03,080 into a bit more detail, 255 00:14:03,180 --> 00:14:04,000 obviously there's a lot of things 256 00:14:04,000 --> 00:14:05,140 going on here. 257 00:14:05,200 --> 00:14:06,560 We're going to look at individual cases 258 00:14:06,560 --> 00:14:08,340 of relevant attacks. 259 00:14:08,500 --> 00:14:09,620 So here's some passive attacks 260 00:14:11,180 --> 00:14:12,220 basically extracted 261 00:14:12,220 --> 00:14:13,440 from that previous diagram. 262 00:14:15,400 --> 00:14:16,460 So at the top, 263 00:14:16,460 --> 00:14:17,400 we have intersection attacks, 264 00:14:17,600 --> 00:14:18,820 and these are essentially performed 265 00:14:19,220 --> 00:14:20,240 independent of the Tor network, 266 00:14:20,500 --> 00:14:22,040 maybe with just the knowledge 267 00:14:22,040 --> 00:14:23,620 of the fact that a user uses Tor. 268 00:14:23,820 --> 00:14:25,520 And then on the other side, 269 00:14:27,840 --> 00:14:29,140 there's a connection made 270 00:14:29,140 --> 00:14:31,700 from a Tor IP to a server. 271 00:14:32,020 --> 00:14:34,020 And the user may do things like 272 00:14:35,460 --> 00:14:37,300 reveal their time zone information 273 00:14:37,300 --> 00:14:39,080 or maybe say that they work 274 00:14:39,080 --> 00:14:39,980 at a particular company 275 00:14:39,980 --> 00:14:43,160 or otherwise reveal 276 00:14:43,160 --> 00:14:44,020 personal information, 277 00:14:44,320 --> 00:14:46,640 some level of vague personal information 278 00:14:46,640 --> 00:14:48,140 that over time can add up 279 00:14:48,140 --> 00:14:49,660 to eventually identify them. 280 00:14:50,340 --> 00:14:51,460 At the bottom, 281 00:14:51,460 --> 00:14:54,720 we have both internal and external 282 00:14:55,420 --> 00:14:56,800 timing correlation attacks. 283 00:14:57,760 --> 00:14:59,740 Now these can be performed by, 284 00:14:59,820 --> 00:15:01,120 as I said, an external adversary 285 00:15:01,120 --> 00:15:02,730 that is either an ISP 286 00:15:02,980 --> 00:15:04,460 or something observing 287 00:15:05,460 --> 00:15:06,880 the internet exchange 288 00:15:06,880 --> 00:15:10,060 or backbone routers. 289 00:15:10,360 --> 00:15:12,100 Or it can also be performed 290 00:15:12,100 --> 00:15:13,120 by the nodes themselves 291 00:15:13,120 --> 00:15:14,600 who are able to see the, 292 00:15:14,680 --> 00:15:16,380 try and match up individual circuits. 293 00:15:18,880 --> 00:15:19,840 Active attacks, 294 00:15:20,200 --> 00:15:20,940 now these are some 295 00:15:20,940 --> 00:15:21,440 of the more down-to-earth 296 00:15:21,460 --> 00:15:21,880 deadly attacks. 297 00:15:22,200 --> 00:15:23,980 A couple of academic papers 298 00:15:24,920 --> 00:15:26,060 revolve around this. 299 00:15:27,020 --> 00:15:29,200 One by Parisa Tabriz, 300 00:15:29,660 --> 00:15:30,780 Nikita Borisov, 301 00:15:30,780 --> 00:15:31,640 and George Danzais 302 00:15:32,270 --> 00:15:34,820 basically argued that reliability 303 00:15:35,460 --> 00:15:38,260 is essentially the same as security 304 00:15:38,260 --> 00:15:39,980 when you're talking about mixed networks. 305 00:15:40,220 --> 00:15:43,000 An adversary who is able to fail 306 00:15:43,000 --> 00:15:44,540 a large amount of circuits 307 00:15:44,540 --> 00:15:45,960 can bias your, 308 00:15:46,020 --> 00:15:47,440 begin to bias your path selection. 309 00:15:47,780 --> 00:15:50,000 And in this case, 310 00:15:50,000 --> 00:15:51,360 you can see that 311 00:15:51,360 --> 00:15:52,960 if they own the guard node, 312 00:15:53,200 --> 00:15:55,020 they can fail circuits at the guard node 313 00:15:55,020 --> 00:15:56,860 if it doesn't extend to a relay node 314 00:15:56,860 --> 00:16:00,580 that they control. 315 00:16:01,140 --> 00:16:02,360 And then at the relay node, 316 00:16:02,500 --> 00:16:03,580 they can fail those circuits 317 00:16:03,580 --> 00:16:05,840 if it doesn't extend to an exit node 318 00:16:05,840 --> 00:16:07,440 that they control. 319 00:16:08,800 --> 00:16:10,800 They can also attempt to find 320 00:16:10,800 --> 00:16:13,840 a side channel in the TOR protocol. 321 00:16:13,980 --> 00:16:15,420 One potential side channel is 322 00:16:15,420 --> 00:16:18,140 to XOR a piece of the, 323 00:16:18,140 --> 00:16:22,480 the protocol stream at the guard node, 324 00:16:22,700 --> 00:16:27,160 and as this packet flows through the network, 325 00:16:27,700 --> 00:16:30,040 when it reaches an exit node, 326 00:16:30,340 --> 00:16:32,680 its digest is verified, 327 00:16:32,840 --> 00:16:35,540 and if the digest verification fails, 328 00:16:35,820 --> 00:16:36,860 that circuit fails. 329 00:16:37,240 --> 00:16:39,160 So a malicious exit node then, 330 00:16:39,220 --> 00:16:40,840 who is colluding with that guard node, 331 00:16:40,940 --> 00:16:42,400 can then potentially on XOR 332 00:16:43,060 --> 00:16:45,800 that same byte in the stream, 333 00:16:46,000 --> 00:16:46,780 and 334 00:16:46,780 --> 00:16:49,520 then those two nodes can guarantee 335 00:16:49,520 --> 00:16:50,960 that they're only going to carry 336 00:16:51,740 --> 00:16:54,040 traffic that they really want to own. 337 00:16:55,000 --> 00:16:56,740 They can also combine this 338 00:16:56,740 --> 00:16:59,600 as Damon McCoy demonstrated, 339 00:17:00,260 --> 00:17:02,240 and a few other researchers 340 00:17:02,240 --> 00:17:03,340 from University of Colorado 341 00:17:03,960 --> 00:17:05,780 demonstrated in his work, 342 00:17:05,820 --> 00:17:06,560 in their work, 343 00:17:06,680 --> 00:17:08,660 that bandwidth lying can come into play here. 344 00:17:09,240 --> 00:17:12,260 And they basically demonstrated 345 00:17:12,260 --> 00:17:14,140 with very few resources, 346 00:17:14,200 --> 00:17:15,900 you can sort of combine these two attacks, 347 00:17:15,900 --> 00:17:20,220 and cause people to try and use you, 348 00:17:20,260 --> 00:17:21,960 and continually fail their circuits, 349 00:17:25,460 --> 00:17:29,600 until they do choose an exit node 350 00:17:29,600 --> 00:17:32,320 that they control. 351 00:17:32,900 --> 00:17:33,660 Now the TOR, 352 00:17:33,720 --> 00:17:34,880 I should clarify that this, 353 00:17:35,000 --> 00:17:38,680 that the TOR exit node, 354 00:17:39,840 --> 00:17:41,220 TOR code does print out, 355 00:17:41,220 --> 00:17:41,920 I believe, a notice, 356 00:17:41,960 --> 00:17:45,000 if the digest fails. 357 00:17:45,000 --> 00:17:46,940 So this is not something that just 358 00:17:46,940 --> 00:17:48,100 can happen all over the place 359 00:17:48,100 --> 00:17:48,760 without us knowing, 360 00:17:48,880 --> 00:17:49,960 even at this point. 361 00:17:50,040 --> 00:17:51,440 This is something that can be detected. 362 00:17:51,800 --> 00:17:54,520 But it's possible that there are 363 00:17:54,520 --> 00:17:55,400 other side channels involving 364 00:17:55,400 --> 00:17:56,140 timing information 365 00:17:56,140 --> 00:17:57,760 that are more difficult to detect. 366 00:17:58,340 --> 00:18:00,120 Guard node bias is another layer 367 00:18:00,120 --> 00:18:01,220 that can be added to this. 368 00:18:01,380 --> 00:18:03,180 An adversary at an organization, 369 00:18:04,080 --> 00:18:07,360 or a government, 370 00:18:07,720 --> 00:18:10,340 can try and either block TOR entirely, 371 00:18:10,540 --> 00:18:13,280 or more sinister approach, 372 00:18:13,520 --> 00:18:14,880 maybe to just allow access 373 00:18:15,000 --> 00:18:16,320 to the guard nodes that they control, 374 00:18:16,660 --> 00:18:20,620 that fail circuits that don't extend 375 00:18:20,620 --> 00:18:22,320 to the nodes that they're colluding with. 376 00:18:25,960 --> 00:18:27,440 Application layer attacks, 377 00:18:28,620 --> 00:18:30,300 surveillance and confiscation is one. 378 00:18:30,440 --> 00:18:32,420 If you live in a country 379 00:18:32,820 --> 00:18:36,240 that may have outlawed TOR, 380 00:18:36,400 --> 00:18:38,060 Germany has some nebulous laws 381 00:18:38,060 --> 00:18:39,180 that were recently passed 382 00:18:39,180 --> 00:18:41,060 that may or may not fall into this category. 383 00:18:41,740 --> 00:18:42,900 Some other countries as well, 384 00:18:43,020 --> 00:18:44,740 actively block TOR. 385 00:18:45,000 --> 00:18:48,320 It's conceivable that others may try 386 00:18:48,320 --> 00:18:51,140 and harass users that try to use TOR. 387 00:18:51,940 --> 00:18:53,680 In these situations, 388 00:18:53,960 --> 00:18:56,280 a confiscation of those TOR users' computers 389 00:18:56,280 --> 00:18:58,340 may prove profitable to try and reveal 390 00:18:58,340 --> 00:18:59,320 browser history information, 391 00:18:59,700 --> 00:19:00,300 cache information, 392 00:19:00,520 --> 00:19:01,000 or what have you. 393 00:19:02,140 --> 00:19:04,160 Client misconfiguration is sort of 394 00:19:04,160 --> 00:19:05,620 a passive attack. 395 00:19:05,780 --> 00:19:11,480 If a user uses the SOX proxy improperly, 396 00:19:11,480 --> 00:19:13,200 uses the SOX4 version 397 00:19:13,200 --> 00:19:14,980 of TOR, 398 00:19:15,000 --> 00:19:15,640 then the user may not be able 399 00:19:15,640 --> 00:19:16,800 of the protocol. 400 00:19:17,140 --> 00:19:18,400 Instead of 4A or 5, 401 00:19:18,760 --> 00:19:20,660 DNS requests can happen locally 402 00:19:20,660 --> 00:19:21,480 over the network, 403 00:19:21,740 --> 00:19:23,720 and then the resolved IP 404 00:19:23,720 --> 00:19:24,760 is then fed to TOR. 405 00:19:26,280 --> 00:19:27,420 In this case, 406 00:19:27,500 --> 00:19:29,440 you've basically leaked the host names 407 00:19:29,440 --> 00:19:31,040 of the sites that you're visiting. 408 00:19:32,420 --> 00:19:34,260 For the web browser scenario, 409 00:19:34,700 --> 00:19:36,820 the TOR extension does verify 410 00:19:36,820 --> 00:19:38,240 that things are configured properly, 411 00:19:38,420 --> 00:19:39,380 but for other applications, 412 00:19:40,400 --> 00:19:41,540 it's up to the user 413 00:19:41,540 --> 00:19:42,320 to essentially ensure 414 00:19:42,320 --> 00:19:43,300 that they're doing this right. 415 00:19:45,000 --> 00:19:46,400 TOR does print out a notice. 416 00:19:46,560 --> 00:19:48,000 However, again, in that case, 417 00:19:48,080 --> 00:19:49,800 if it's being consistently fed 418 00:19:49,800 --> 00:19:50,580 only IP addresses, 419 00:19:50,760 --> 00:19:51,720 so if you're watching 420 00:19:51,720 --> 00:19:53,020 your Vidalia log window 421 00:19:53,020 --> 00:19:53,460 or whatever, 422 00:19:53,520 --> 00:19:55,280 you can see that this is the case, 423 00:19:55,300 --> 00:19:56,840 oh, I've misconfigured things. 424 00:19:59,000 --> 00:20:00,320 Application layer attacks 425 00:20:02,200 --> 00:20:04,080 involve things like, as I said, 426 00:20:04,120 --> 00:20:05,020 injecting plug-ins. 427 00:20:05,040 --> 00:20:07,260 Plug-ins are horrible about bypassing, 428 00:20:07,280 --> 00:20:09,020 obeying your proxy settings, 429 00:20:09,600 --> 00:20:11,460 which I'll discuss in more detail later, 430 00:20:11,480 --> 00:20:12,300 the individual breakdown 431 00:20:12,300 --> 00:20:14,780 of exactly how horrible these plug-ins are. 432 00:20:16,760 --> 00:20:19,700 Also, things like having JavaScript 433 00:20:19,700 --> 00:20:22,080 that waits for events 434 00:20:25,000 --> 00:20:27,780 for when you disable TOR 435 00:20:27,780 --> 00:20:30,000 or just busy waits until you disable TOR, 436 00:20:30,080 --> 00:20:30,700 things like that. 437 00:20:31,620 --> 00:20:32,920 Okay, so that's basically 438 00:20:32,920 --> 00:20:34,540 a rundown of all the attacks 439 00:20:35,700 --> 00:20:38,100 that this presentation is going to discuss. 440 00:20:38,200 --> 00:20:41,000 Are there any questions on, 441 00:20:41,080 --> 00:20:42,840 thoughts on attacks, 442 00:20:43,100 --> 00:20:44,460 anything that pops in your mind 443 00:20:44,460 --> 00:20:44,880 about those? 444 00:20:45,000 --> 00:20:45,120 Yeah. 445 00:20:46,020 --> 00:20:46,700 . 446 00:21:02,880 --> 00:21:04,200 I'm unclear on the question. 447 00:21:04,200 --> 00:21:06,140 Are you asking what sort of information 448 00:21:06,140 --> 00:21:09,060 TOR may be logging at the nodes? 449 00:21:09,160 --> 00:21:09,780 . 450 00:21:11,900 --> 00:21:12,580 No. 451 00:21:13,060 --> 00:21:13,740 . 452 00:21:14,620 --> 00:21:16,200 No, there is actually 453 00:21:16,200 --> 00:21:18,280 a false rumor going on to that effect. 454 00:21:19,380 --> 00:21:22,540 There is no backdoors in TOR 455 00:21:22,540 --> 00:21:23,300 to satisfy that, 456 00:21:24,120 --> 00:21:26,020 and there have been no requirements 457 00:21:26,020 --> 00:21:27,580 on TOR node operators 458 00:21:27,580 --> 00:21:29,940 to actually log any sort of traffic. 459 00:21:30,400 --> 00:21:32,740 There have been a couple of waves 460 00:21:32,740 --> 00:21:35,500 of node seizures of nodes 461 00:21:35,500 --> 00:21:36,160 in the TOR network. 462 00:21:37,040 --> 00:21:38,020 To my knowledge, 463 00:21:38,040 --> 00:21:39,400 all of those machines were returned 464 00:21:39,400 --> 00:21:40,720 within a day or two, 465 00:21:40,860 --> 00:21:43,620 and I believe most of those nodes 466 00:21:43,620 --> 00:21:45,240 are, again, operational, of course, 467 00:21:45,240 --> 00:21:46,880 after rotating their, you know, 468 00:21:46,880 --> 00:21:48,280 refreshing their node keys and whatnot. 469 00:21:49,340 --> 00:21:49,900 Yeah. 470 00:21:50,100 --> 00:21:50,480 . 471 00:21:50,480 --> 00:21:51,540 Just a small note 472 00:21:51,540 --> 00:21:53,280 to the law you were mentioning 473 00:21:53,280 --> 00:21:55,720 regarding the question whether or not 474 00:21:55,720 --> 00:21:58,500 TOR as a software can be possessed 475 00:21:58,500 --> 00:22:00,280 in a legal manner in Germany, 476 00:22:00,440 --> 00:22:02,540 and to answer it, it can. 477 00:22:03,020 --> 00:22:04,440 Of course, there have been 478 00:22:04,440 --> 00:22:05,720 a lot of discussions about it, 479 00:22:05,840 --> 00:22:09,060 but the law is in condition 480 00:22:09,060 --> 00:22:10,680 of a cybercrime prevention 481 00:22:11,400 --> 00:22:12,660 which has been implemented 482 00:22:12,660 --> 00:22:13,940 all over Europe. 483 00:22:14,100 --> 00:22:17,540 The discussion has just been focused in Germany, 484 00:22:17,720 --> 00:22:19,500 but that does mean that, 485 00:22:19,500 --> 00:22:20,640 for example, in Austria, 486 00:22:21,360 --> 00:22:24,140 we have that kind of law for years now, 487 00:22:24,400 --> 00:22:27,160 and we did and established 488 00:22:27,160 --> 00:22:29,020 that it's rather narrow. 489 00:22:30,420 --> 00:22:30,940 Okay. 490 00:22:32,000 --> 00:22:33,600 That is an excellent point, then. 491 00:22:33,640 --> 00:22:34,200 Thank you. 492 00:22:34,780 --> 00:22:36,840 The point was, I guess, for, 493 00:22:36,960 --> 00:22:37,940 I don't know if there are people 494 00:22:37,940 --> 00:22:40,020 who would be viewing the podcast 495 00:22:40,020 --> 00:22:40,820 or whatever this talk, 496 00:22:40,820 --> 00:22:44,160 that essentially all of Europe 497 00:22:44,160 --> 00:22:47,280 has this sort of legislation, 498 00:22:47,600 --> 00:22:49,900 I guess the EU has handed it down, 499 00:22:50,000 --> 00:22:51,740 and several countries have also implemented 500 00:22:51,740 --> 00:22:53,860 similar sorts of legislation. 501 00:22:54,560 --> 00:22:55,940 The European Council. 502 00:22:56,120 --> 00:22:56,800 The European Council. 503 00:22:56,960 --> 00:22:58,000 Oh, okay. 504 00:22:58,140 --> 00:22:58,420 . 505 00:22:59,720 --> 00:23:00,280 Okay. 506 00:23:01,460 --> 00:23:02,020 . 507 00:23:07,040 --> 00:23:08,040 Oh, sorry. 508 00:23:08,400 --> 00:23:08,960 . 509 00:23:08,960 --> 00:23:10,520 . 510 00:23:10,520 --> 00:23:11,560 . 511 00:23:11,560 --> 00:23:12,040 . 512 00:23:12,040 --> 00:23:15,160 The trade there is your 513 00:23:15,160 --> 00:23:15,480 transition 514 00:23:15,480 --> 00:23:16,500 . 515 00:23:20,040 --> 00:23:21,440 . 516 00:23:37,520 --> 00:23:38,920 . 517 00:23:38,920 --> 00:23:38,940 . 518 00:23:38,940 --> 00:23:44,740 relay, it will be using a different IP address. And additionally, the TCP streams are also 519 00:23:46,620 --> 00:23:52,220 essentially reused. So TCP fingerprinting attacks don't apply. The end-to-end TCP fingerprinting 520 00:23:52,220 --> 00:24:02,700 attacks also don't apply. Okay. I think we'll move on to approaches. 521 00:24:02,700 --> 00:24:09,220 How do we address some of these problems? Or how do we address these problems? Well, 522 00:24:09,380 --> 00:24:13,140 the first approach, while the network was smaller, was to try and verify node operators 523 00:24:13,140 --> 00:24:24,340 that the network maintainers would know who they are. And if there was some trouble with 524 00:24:24,340 --> 00:24:27,680 their node, they could be easily contacted. This is no longer the case. Essentially, you 525 00:24:27,680 --> 00:24:32,540 can just go to Vidalia and say, yes, I want to run a Tor node. And then it sets up your 526 00:24:32,540 --> 00:24:32,680 network. And then it sets up your network. And then it sets up your network. And then 527 00:24:32,700 --> 00:24:38,140 it sets up your configuration appropriately. The network has essentially just grown too 528 00:24:38,140 --> 00:24:44,080 large for verification to be applicable at all. And hopefully, we can continue to grow 529 00:24:44,080 --> 00:24:47,540 it larger. Path selection and hacks, there's a couple 530 00:24:47,540 --> 00:24:55,060 of different ways that your path is chosen in a specific manner by the client and certain 531 00:24:55,060 --> 00:25:00,500 restrictions are placed on your path for security. Tor up from the floor up, this is essentially 532 00:25:00,500 --> 00:25:02,340 the slogan of anonymous. 533 00:25:04,640 --> 00:25:12,460 The idea is that if something can fit through Tor, shove it through Tor. And if it doesn't, 534 00:25:12,480 --> 00:25:19,260 drop it on the floor. So any UDP traffic, anything that might be bypassing plug-in settings 535 00:25:19,260 --> 00:25:23,880 or what have you is dropped. And there are a few different projects that do this. 536 00:25:25,240 --> 00:25:29,620 Improving network speed and usability is an important component of anonymity to have large 537 00:25:29,620 --> 00:25:30,920 amounts of users using the network. 538 00:25:33,100 --> 00:25:38,140 And scanning nodes for modification, make sure they're not modifying traffic at the 539 00:25:38,140 --> 00:25:42,800 exit node. And make sure that they are reliable, they're not overloaded, and such things like 540 00:25:42,800 --> 00:25:49,760 that. And then finally, securing the applications, trying to make sure that the web browser is 541 00:25:49,760 --> 00:25:53,440 not going to magically bypass proxy settings, that JavaScript is not going to do mysterious 542 00:25:53,440 --> 00:25:58,500 things. Unfortunately, this requires a different threat model that applications don't often 543 00:25:58,500 --> 00:26:00,900 consider. And we'll get into all of these in just a moment. 544 00:26:00,920 --> 00:26:02,640 We'll get into all of these one by one in a bit more detail. 545 00:26:03,580 --> 00:26:08,140 So starting with path selection hacks, there's a couple of hacks that Tor does. 546 00:26:08,700 --> 00:26:14,580 The slash 16 hack, when you're choosing a path, no two nodes in that path can be from 547 00:26:14,580 --> 00:26:20,860 the same slash 16 net mask. So the idea is if someone is trying to do what's called a 548 00:26:20,860 --> 00:26:28,120 Sybil attack, which is running multiple nodes from a colo provider or even on their cable 549 00:26:30,920 --> 00:26:36,760 network, this prevents them from easily being able to have a large number of nodes on their 550 00:26:36,760 --> 00:26:44,180 network that are going to be able to actively compromise users in this way. It also prevents 551 00:26:45,680 --> 00:26:53,560 ISPs from being able to easily surveil traffic. Now, the caveat is obviously that some ISPs 552 00:26:53,560 --> 00:26:58,940 have disjoint, especially the larger ISPs, have disjoint IP ranges, and they're not always 553 00:26:58,940 --> 00:27:00,620 in the same slash 16, but it does. 554 00:27:00,920 --> 00:27:05,260 That's not to say that this is completely ineffective. It is some measure of protection 555 00:27:05,260 --> 00:27:12,280 against somebody mounting a trivial Sybil attack with multiple nodes, all from the same 556 00:27:12,280 --> 00:27:16,400 rack or whatever. Guard nodes, as you notice, the first node 557 00:27:16,400 --> 00:27:20,580 in that path is called a guard. These are chosen from the top 50 percent uptime and 558 00:27:20,580 --> 00:27:28,900 top 50 percent bandwidth of the network. The idea is that, well, initially, I believe 559 00:27:28,900 --> 00:27:30,900 they were designed, they were called HATS. 560 00:27:30,920 --> 00:27:38,040 Helper nodes. And the idea was to mitigate profiling attacks. So essentially, as Nick 561 00:27:38,040 --> 00:27:43,620 Mathewson mentioned in his talk, essentially, you don't want, if you never want somebody 562 00:27:43,620 --> 00:27:49,060 to know that if you're, you know, some Harley Rider, it was his example, and you like to 563 00:27:49,060 --> 00:27:54,800 visit queued overload, and you can continually visit, you continually visit this site every 564 00:27:54,800 --> 00:27:59,140 morning, you never want anybody to be able to determine this. If you are continually 565 00:27:59,140 --> 00:28:00,900 choosing new entry and exit points all the time, you're not going to be able to determine 566 00:28:00,920 --> 00:28:00,960 which entry is good or bad. You're going to be able to determine which entry is good 567 00:28:00,960 --> 00:28:04,120 or bad if you do this all the time. Eventually, with some probability, someone will notice 568 00:28:04,120 --> 00:28:10,340 that you're visiting queued overload, and will, you know, be able to tell all your 569 00:28:10,340 --> 00:28:13,900 biker buddies and embarrass you or what have you, however you want to generalize that example. 570 00:28:14,440 --> 00:28:20,420 So having a fixed set of guard nodes between two and three is the goal, can make sure 571 00:28:20,420 --> 00:28:25,280 that you're not going to be exposed to the whole network in this way. And you can, in 572 00:28:25,980 --> 00:28:28,580 essence, build up sort of trust in your guards. 573 00:28:30,920 --> 00:28:35,080 where some guards try and capture and harass a bunch of users. 574 00:28:35,280 --> 00:28:36,780 If you're not harassed in this way, 575 00:28:37,220 --> 00:28:38,540 your rational response is, 576 00:28:38,600 --> 00:28:42,020 oh, well, I trust my guards even more than I can trust Tor 577 00:28:42,020 --> 00:28:46,080 even more than assuming that it was an end-to-end attack. 578 00:28:48,980 --> 00:28:53,700 The problem is that nodes can go up and down in general, 579 00:28:54,660 --> 00:28:56,780 so this can be difficult to do right. 580 00:28:56,780 --> 00:29:02,360 You can have basically a time trade-off of risk. 581 00:29:02,620 --> 00:29:04,780 If you are still rotating through the network 582 00:29:04,780 --> 00:29:06,300 because these things are going up and down, 583 00:29:06,500 --> 00:29:10,240 you can still be exposed to a large amount of the network 584 00:29:10,240 --> 00:29:11,520 for a short period of time. 585 00:29:11,620 --> 00:29:14,780 There are a couple of hacks in how Tor remembers guard nodes 586 00:29:14,780 --> 00:29:16,340 to try and prevent this now. 587 00:29:17,380 --> 00:29:21,480 This is less of an issue than it was about a month or so ago. 588 00:29:24,560 --> 00:29:26,020 Tor routers and live CDs. 589 00:29:26,780 --> 00:29:27,540 There are a few of these. 590 00:29:27,680 --> 00:29:30,960 One is being presented immediately following this talk. 591 00:29:32,380 --> 00:29:36,220 JanusVM is an anonymous and the ZeroBank virtual machine 592 00:29:36,220 --> 00:29:38,800 are, I think, the major examples of these guys. 593 00:29:39,960 --> 00:29:43,280 Again, basically drop everything that doesn't go through Tor. 594 00:29:43,420 --> 00:29:46,900 The major issue with these is that circuit reuse 595 00:29:46,900 --> 00:29:49,820 can be a very problematic situation. 596 00:29:50,320 --> 00:29:52,280 If you are using antivirus software 597 00:29:52,280 --> 00:29:53,860 that updates with a unique identifier, 598 00:29:54,240 --> 00:29:56,760 if you have other ID-based software, 599 00:29:56,780 --> 00:29:58,340 software updates where you use AIM 600 00:29:58,340 --> 00:30:02,040 or you SSH into a shell that has your name in the domain name 601 00:30:02,040 --> 00:30:04,880 or you connect to an email account 602 00:30:04,880 --> 00:30:08,660 that you don't want linked with your anonymous traffic, 603 00:30:08,980 --> 00:30:10,580 an exit node can figure this out 604 00:30:10,580 --> 00:30:11,660 and begin to associate them. 605 00:30:13,220 --> 00:30:16,460 Now, there is a new NIM functionality in Vidalia 606 00:30:16,460 --> 00:30:17,460 that you can click on and say, 607 00:30:17,540 --> 00:30:19,940 okay, I want a new identity now. 608 00:30:22,680 --> 00:30:24,460 But that's sort of up to the user 609 00:30:24,460 --> 00:30:26,660 to be able to differentiate and remember to click on that. 610 00:30:26,780 --> 00:30:29,600 And it can be problematic, 611 00:30:30,560 --> 00:30:32,440 especially if you are routing all of your applications 612 00:30:32,440 --> 00:30:34,360 through like a Tor router, for example. 613 00:30:38,060 --> 00:30:41,140 Now, speed and usability, as I touched on, 614 00:30:41,260 --> 00:30:43,720 is a key component to Tor security. 615 00:30:44,300 --> 00:30:46,320 You want as large a user base as possible. 616 00:30:46,460 --> 00:30:48,120 In fact, there have been cases in the past 617 00:30:48,120 --> 00:30:51,920 where users have been harassed because they... 618 00:30:52,520 --> 00:30:55,360 In fact, there's an example of a professor who was harassed 619 00:30:55,360 --> 00:30:56,560 because there were only... 620 00:30:56,780 --> 00:30:58,440 Two Tor users from his university 621 00:30:58,440 --> 00:31:01,280 and it was suspected that one of them 622 00:31:01,280 --> 00:31:04,200 was engaging in an online scam. 623 00:31:04,760 --> 00:31:06,320 And so the campus police 624 00:31:06,320 --> 00:31:08,760 and possibly some state or federal police 625 00:31:09,620 --> 00:31:13,700 contacted him and asked him if... 626 00:31:13,700 --> 00:31:16,140 He was a professor who taught about censorship 627 00:31:16,140 --> 00:31:17,180 and censorship resistance 628 00:31:17,180 --> 00:31:21,140 and they asked him if any students he knew of 629 00:31:21,140 --> 00:31:22,500 were still actively using Tor 630 00:31:22,500 --> 00:31:25,780 and basically interrogated him. 631 00:31:25,880 --> 00:31:26,680 So there's this risk. 632 00:31:26,780 --> 00:31:27,080 There's this risk of harassment 633 00:31:27,080 --> 00:31:29,800 and there's also the risk of, say, a blogger 634 00:31:29,800 --> 00:31:31,500 who wants to blog about work 635 00:31:31,500 --> 00:31:33,600 but then brings their laptop to work 636 00:31:33,600 --> 00:31:38,200 and they're the only Tor user at their workplace. 637 00:31:38,680 --> 00:31:40,980 It's very easy for the system administrator to see, 638 00:31:41,040 --> 00:31:43,480 okay, this is the only internal IP address that we have 639 00:31:43,480 --> 00:31:45,300 connecting to the Tor network. 640 00:31:47,140 --> 00:31:49,980 We have a pretty good idea of who this anonymous blogger 641 00:31:49,980 --> 00:31:52,200 who may or may not be causing us problems is 642 00:31:52,920 --> 00:31:55,020 and what their identity is. 643 00:31:55,440 --> 00:31:56,760 So how do you improve this? 644 00:31:56,780 --> 00:32:00,020 Basically, users want speed, the network to be fast, 645 00:32:00,180 --> 00:32:01,520 and they want it to be easy. 646 00:32:01,920 --> 00:32:04,700 So it's my argument that a lot of them 647 00:32:04,700 --> 00:32:07,500 don't need such high-grade anonymity. 648 00:32:07,600 --> 00:32:10,540 I suspect that a lot of them are concerned 649 00:32:10,540 --> 00:32:12,760 about the data hygiene issue, 650 00:32:12,900 --> 00:32:15,640 like they want to just opt out of a few Google queries 651 00:32:15,640 --> 00:32:18,900 or they want to opt out of ordering something. 652 00:32:18,960 --> 00:32:21,500 They don't want marketers to have their IP address 653 00:32:21,500 --> 00:32:25,320 or they don't want IMDB or whatever 654 00:32:25,320 --> 00:32:26,760 to have what movies they like. 655 00:32:26,780 --> 00:32:28,080 Or these sorts of things. 656 00:32:28,980 --> 00:32:33,660 So for this reason, I proposed a two-hop pass proposal. 657 00:32:34,660 --> 00:32:41,960 The most deadly attack from a high-level point of view 658 00:32:41,960 --> 00:32:43,120 or from a theoretical point of view 659 00:32:43,120 --> 00:32:44,460 is the timing correlation attack. 660 00:32:44,680 --> 00:32:50,040 Now, this is effective between 95% and 99.9% in simulation. 661 00:32:51,000 --> 00:32:54,360 You can get that much certainty to correlate streams 662 00:32:54,360 --> 00:32:55,680 that are entering and exiting. 663 00:32:58,160 --> 00:33:00,340 So from a theoretical point of view, 664 00:33:00,380 --> 00:33:03,180 there's little reason why there should be three hops 665 00:33:03,180 --> 00:33:04,020 as opposed to two. 666 00:33:04,100 --> 00:33:05,820 But there are a lot of implementation details 667 00:33:05,820 --> 00:33:08,200 that can complicate these things. 668 00:33:08,740 --> 00:33:12,060 On the conference CD, I have included this proposal. 669 00:33:12,240 --> 00:33:13,020 If you want to look through that, 670 00:33:13,160 --> 00:33:17,500 I have a reasoning of what some of these major issues are 671 00:33:17,500 --> 00:33:19,760 and what can be done about them 672 00:33:20,920 --> 00:33:23,940 to try and improve things from an implementation perspective. 673 00:33:24,120 --> 00:33:25,240 These include things like, 674 00:33:25,680 --> 00:33:27,440 the active circuit failure issue. 675 00:33:27,680 --> 00:33:33,480 They include things like a user using an exit 676 00:33:33,480 --> 00:33:35,120 with a specific exit policy 677 00:33:35,120 --> 00:33:37,820 that exits to a particular IP address. 678 00:33:39,480 --> 00:33:43,780 And basically, those sorts of issues. 679 00:33:45,100 --> 00:33:47,620 Intelligent path selection is something that's being worked on 680 00:33:47,620 --> 00:33:50,980 by one of our Google Summer of Code students. 681 00:33:52,160 --> 00:33:53,880 This is basically that... 682 00:33:55,680 --> 00:33:58,620 You can try and have the client intelligently determine 683 00:33:58,620 --> 00:34:02,040 what the latency is between different Tor nodes 684 00:34:02,040 --> 00:34:04,960 and try and build lower latency paths 685 00:34:04,960 --> 00:34:07,940 and higher bandwidth paths for users that say, 686 00:34:08,040 --> 00:34:10,380 well, we don't need as much anonymity. 687 00:34:10,420 --> 00:34:12,980 We just want to be able to fetch websites fast. 688 00:34:13,500 --> 00:34:16,020 And we just want IP address obfuscation, essentially. 689 00:34:17,540 --> 00:34:19,880 Last point to improving speed and usability, 690 00:34:20,080 --> 00:34:21,240 which we're going to go into in a bit more detail, 691 00:34:21,380 --> 00:34:24,780 is ensuring the network is evenly balanced and reliable. 692 00:34:24,940 --> 00:34:25,280 It turns out, 693 00:34:25,280 --> 00:34:26,880 there's a lot of balancing issues with Tor, 694 00:34:27,040 --> 00:34:32,060 which is why it's slow for a large amount... 695 00:34:32,060 --> 00:34:35,620 A certain percentage of the users experience rough Tor performance. 696 00:34:36,920 --> 00:34:41,560 So how can we try and detect some of these mischievous nodes 697 00:34:41,560 --> 00:34:42,880 and what have we found so far? 698 00:34:43,840 --> 00:34:46,480 So centralized network scanning is essentially 699 00:34:46,480 --> 00:34:49,000 using what's called the Tor control port 700 00:34:49,000 --> 00:34:51,340 to determine... 701 00:34:52,340 --> 00:34:54,440 The Tor control port is a... 702 00:34:54,440 --> 00:34:56,320 Is a port that... 703 00:34:56,320 --> 00:34:58,920 The Tor exports that allows you to build your own circuits through Tor 704 00:34:58,920 --> 00:35:01,280 and get events on circuit failure 705 00:35:01,280 --> 00:35:03,400 and get events on... 706 00:35:04,120 --> 00:35:06,780 And attach streams to circuits that you build 707 00:35:06,780 --> 00:35:10,300 and get events on bandwidth usage and so on. 708 00:35:11,030 --> 00:35:14,840 So Snakes on a Tor was a node scan... 709 00:35:14,840 --> 00:35:16,600 Or is a node scanner that I've built. 710 00:35:16,960 --> 00:35:19,740 And Torflow is a Python library 711 00:35:19,740 --> 00:35:22,780 that interacts with the Tor control port 712 00:35:22,780 --> 00:35:24,360 and allows you to selectively build paths. 713 00:35:25,100 --> 00:35:25,980 Snakes on a Tor, 714 00:35:27,180 --> 00:35:29,720 essentially the goal of that scanner 715 00:35:29,720 --> 00:35:32,000 is to get the motherfucking snakes off the motherfucking Tor. 716 00:35:33,240 --> 00:35:36,920 To verify MD5 sums of URLs that you fetch, 717 00:35:37,020 --> 00:35:40,720 make sure that nobody is inserting malicious plug-ins or JavaScript 718 00:35:40,720 --> 00:35:45,580 or modifying, inserting exploits into documents 719 00:35:45,580 --> 00:35:48,640 or Firefox extensions or what have you. 720 00:35:50,540 --> 00:35:51,480 This all... 721 00:35:51,480 --> 00:35:54,200 We also, at the same time, we'll verify... 722 00:35:54,200 --> 00:35:54,420 This all... We also, at the same time, we'll verify... 723 00:35:54,420 --> 00:35:56,280 Is node reliability and bandwidth 724 00:35:56,280 --> 00:35:59,180 to try and detect those circuit failure attacks. 725 00:36:01,300 --> 00:36:03,720 And it has found some things. 726 00:36:04,040 --> 00:36:07,260 For the most part it works against 727 00:36:08,440 --> 00:36:11,100 adversaries that are attacking pretty much everybody. 728 00:36:11,860 --> 00:36:14,100 But it is vulnerable to detection 729 00:36:14,100 --> 00:36:17,120 and there are some issues with adversaries that are only... 730 00:36:17,120 --> 00:36:21,100 There are issues with adversaries that are only targeting a select portion of the userbase 731 00:36:21,100 --> 00:36:23,120 like users who speak a particular language 732 00:36:23,120 --> 00:36:30,760 that the scanner does not speak like Chinese so what does this look like from 733 00:36:30,760 --> 00:36:34,000 you know from a network diagram point of view again what is the scanner doing 734 00:36:34,000 --> 00:36:39,720 what's it able to detect is outlaid on the top you can detect node bias and 735 00:36:39,720 --> 00:36:45,300 connectivity issues circuit failure and bandwidth as I said and content 736 00:36:45,300 --> 00:36:51,800 modification but at the bottom we have the arms race essentially the adversary 737 00:36:51,800 --> 00:36:56,960 is able to tell that you're not making circuits the same way as then as you as 738 00:36:57,380 --> 00:37:00,640 a normal tor user because you're not using guard nodes anymore you're 739 00:37:00,640 --> 00:37:05,440 connecting to every tor know that you can to try and verify its reliability so 740 00:37:05,440 --> 00:37:09,780 the tour the guard nodes are going to be able to set to tell oh well this was a 741 00:37:09,780 --> 00:37:13,580 short-lived connection from this IP and it continually connects to me for only 742 00:37:13,580 --> 00:37:18,960 short period of time and then moves on it can then note this IP and provide its 743 00:37:18,960 --> 00:37:21,700 special selective service higher bandwidth not fail at circuit 744 00:37:21,700 --> 00:37:27,280 circuits or what-have-you similarly the exit node can detect behavioral issues 745 00:37:27,280 --> 00:37:31,560 in the URLs that you fetch maybe you don't fetch the images for a page maybe 746 00:37:31,560 --> 00:37:37,480 you don't interpret JavaScript or you're missing some HTTP headers so and it can 747 00:37:37,480 --> 00:37:44,120 also try and evade your your scanning again you either using this detection or 748 00:37:44,120 --> 00:37:51,260 targeting only specific users likewise dynamic and localized content is a 749 00:37:51,260 --> 00:37:51,680 problem for a lot of users so it's a problem for a lot of users so it's a problem for a lot of users so it's a 750 00:37:51,680 --> 00:37:55,040 scanning if you're just verifying md5s and the content of the page is 751 00:37:55,040 --> 00:38:01,680 continually changing like Google News or localized certain localized websites 752 00:38:01,680 --> 00:38:06,400 for in particular languages these become both false positive either false 753 00:38:06,400 --> 00:38:11,380 positives for the scanner and or opportune targets for malicious nodes to 754 00:38:11,380 --> 00:38:17,320 just sort of attack essentially with impunity but stuff we found anyway that 755 00:38:17,320 --> 00:38:21,380 some of this is this is pretty interesting we found a a Chinese ISP man 756 00:38:21,380 --> 00:38:25,840 in the middling SSL so it was a particular tour node that exhibited 757 00:38:25,840 --> 00:38:33,860 self-signed SSL certificates to every SSL site that it visited and tour tour 758 00:38:33,860 --> 00:38:37,420 that the same senator does in fact verify these as cell certificates and 759 00:38:37,420 --> 00:38:40,800 stores a bunch of them for a handful of sites and verifies of the same we 760 00:38:40,800 --> 00:38:45,760 detected this this ISP doing it wasn't the node it turned out that this ISP for 761 00:38:45,760 --> 00:38:51,240 some reason was just trying to own all of its clients pop-up blocks 762 00:38:51,240 --> 00:38:55,320 some of these some nodes run antivirus software so far as it's been exhibited 763 00:38:55,320 --> 00:38:59,320 in Windows users only so it must be some sort of antivirus software inserts 764 00:38:59,320 --> 00:39:05,620 JavaScript into pages that are fetched to hook the window dot open call to 765 00:39:05,620 --> 00:39:12,000 block some some forms of JavaScript pop-ups so that's sort of helpful but 766 00:39:12,000 --> 00:39:15,160 then it also may makes things problematic do we whitelist these nodes 767 00:39:15,160 --> 00:39:18,620 and then maybe from scanning but then maybe they have the opportunity to do 768 00:39:18,620 --> 00:39:21,160 other malicious activity or malicious nodes can 769 00:39:21,240 --> 00:39:25,780 look like this behavior so that complicates things a bit so one node in 770 00:39:25,780 --> 00:39:32,360 particular one node was also blocking Google Analytics JavaScript which I 771 00:39:32,360 --> 00:39:37,320 thought was amusing so that do the Google Analytics JavaScript wasn't able 772 00:39:37,320 --> 00:39:43,100 to tell or you'll add there toward that that IP to whatever statistics that 773 00:39:43,100 --> 00:39:50,500 website owner would want to get about you know their users DNS spoofing has 774 00:39:50,500 --> 00:39:51,020 been detected 775 00:39:51,700 --> 00:39:56,220 SSH and SSL man-in-the-middle there was a few tour nodes that could they 776 00:39:56,220 --> 00:40:00,560 seem to come in pairs that were man-in-the-middle SSH and SSL these 777 00:40:00,560 --> 00:40:06,920 were detected and and listed as bad exits and overloaded nodes have also 778 00:40:06,920 --> 00:40:10,900 been detected and some balancing issues as well were detected which we'll get 779 00:40:10,900 --> 00:40:14,120 into in a bit turns out that there's quite a should be quite a bit more 780 00:40:14,120 --> 00:40:17,220 capacity on the network than a lot of users are currently experiencing 781 00:40:18,820 --> 00:40:21,020 incidentally when we do find these nodes we are 782 00:40:21,240 --> 00:40:25,340 able to label them as malicious and prevent clients from actually choosing 783 00:40:25,340 --> 00:40:28,300 them in the future so we have two different tags that that that can do 784 00:40:28,300 --> 00:40:34,240 that the bad exit tag and the of the removing of the valid tag which the bad 785 00:40:34,240 --> 00:40:38,300 exit prevents them from being used as a as an exit and removing the valid tag 786 00:40:38,300 --> 00:40:45,120 prevents them from being used as either a guard or an exit so how do we how do 787 00:40:45,120 --> 00:40:48,780 we address some of the the issues of trying to of this arms race of 788 00:40:48,780 --> 00:40:51,140 adversaries that are able to detect scanning and 789 00:40:51,240 --> 00:40:58,640 provide selective service so from there there are a couple of different 790 00:40:58,640 --> 00:41:02,860 perspectives that we can approach this from a client based decentralized 791 00:41:02,860 --> 00:41:06,640 scanning and node based decentralized scanning client based decentralized 792 00:41:06,640 --> 00:41:11,620 scanning we can use the reliability averages from Tor flow and then alert 793 00:41:11,620 --> 00:41:15,980 the user if a guard if their guard is failing more than that percentage of 794 00:41:15,980 --> 00:41:20,180 circuits or that percentage of circuits times you know the you know two times 795 00:41:20,180 --> 00:41:20,940 this standard 796 00:41:21,240 --> 00:41:27,080 deviation or whatever also we can alert them if they can only connect to two 797 00:41:27,080 --> 00:41:31,500 guards for example or two guards that fit with their whatever firewall 798 00:41:31,500 --> 00:41:38,060 restrictions that they may have we can also potentially observe the bandwidth 799 00:41:38,060 --> 00:41:41,900 and latency of their connection but that gets a little nebulous for different 800 00:41:41,900 --> 00:41:47,520 types of users node based scanning can do things like gather statistics from on 801 00:41:47,520 --> 00:41:51,180 average capacity and queue lengths and compare that to the node rankings and 802 00:41:51,240 --> 00:41:56,660 make sure that nodes match up to you know what what their expected capacity 803 00:41:56,660 --> 00:42:01,040 should be and they don't have large disparity between their their how much 804 00:42:01,040 --> 00:42:07,520 they DQ and and how much is being enqueued to them and then the this sort 805 00:42:07,520 --> 00:42:11,520 of node based information can be used as a feedback loop to improve balancing as 806 00:42:11,520 --> 00:42:19,300 well so passive client node node based scanning looks essentially like this you 807 00:42:19,300 --> 00:42:21,120 have three different clients 808 00:42:21,240 --> 00:42:25,180 here in this example that are able to detect a few different things 809 00:42:25,180 --> 00:42:29,160 about their network. In this top case, you have this client 810 00:42:29,160 --> 00:42:31,840 who's able to detect that he's got a high rate of failure 811 00:42:32,660 --> 00:42:36,680 to this first hop 812 00:42:37,480 --> 00:42:40,180 that's maliciously failing circuits. The second 813 00:42:41,040 --> 00:42:44,820 node is able to say, well, I can only connect to a few guard nodes 814 00:42:44,820 --> 00:42:48,660 and all the other connections seem to fail. No other explanation like 815 00:42:48,660 --> 00:42:52,360 restrictive firewalls for port-based firewalls or 816 00:42:52,360 --> 00:42:56,840 anything else seems to explain this. Print out a warning, alert 817 00:42:56,840 --> 00:43:00,580 the user. And in the bottom is the more nebulous case, doubtful 818 00:43:00,580 --> 00:43:04,740 to what degree this may be successful, trying to detect 819 00:43:06,820 --> 00:43:08,300 a lying node 820 00:43:08,300 --> 00:43:12,640 that is lying about its bandwidth that may exhibit lower 821 00:43:12,640 --> 00:43:15,920 stream rates or maybe higher amounts of timeouts than normal. 822 00:43:17,520 --> 00:43:18,640 In this 823 00:43:18,640 --> 00:43:22,580 center, you have a node scanner that is again listening to those events on their 824 00:43:22,580 --> 00:43:25,740 control port. Potential events that we can add are 825 00:43:25,740 --> 00:43:30,720 queue size, rate of increase and rate of 826 00:43:30,720 --> 00:43:34,800 drain. To detect overloaded 827 00:43:34,800 --> 00:43:38,600 nodes and lying nodes will probably end up appearing pretty much 828 00:43:38,600 --> 00:43:41,500 the same. We can also 829 00:43:43,060 --> 00:43:46,340 gather statistics on what is the rate of failure to 830 00:43:47,050 --> 00:43:48,460 circuits that are created through 831 00:43:48,640 --> 00:43:54,320 me and report nodes of failed circuits that way as well. 832 00:43:55,760 --> 00:43:59,660 So balancing issues, as I mentioned, through scanning we were able to 833 00:44:00,560 --> 00:44:03,960 determine the Tor network is unbalanced. There is in fact a guard, 834 00:44:04,100 --> 00:44:14,120 a bug in versions less than 0-1-2-15, bug number 440 on the Tor project, 835 00:44:16,560 --> 00:44:21,860 bug flyspray, bugzilla equivalent. Essentially the issue is that nodes, guard nodes were 836 00:44:21,860 --> 00:44:26,440 accidentally being chosen uniformly across the guard node space rather than weighted 837 00:44:26,440 --> 00:44:30,380 by their bandwidth and this has several issues as far as reliability and user experience. 838 00:44:31,980 --> 00:44:37,680 Also there is a bandwidth clipping issue. There is a limit on how high we are going 839 00:44:37,680 --> 00:44:43,800 to believe what the bandwidth of a given node is in order, you know, so that nodes 840 00:44:43,800 --> 00:44:47,740 can't show up and say, oh I have a terabyte of bandwidth, send me all your Tor traffic. 841 00:44:48,400 --> 00:44:55,360 It's currently clipped at 1.5 megabytes a second. There are about 32 nodes that have 842 00:44:55,360 --> 00:45:03,000 capacities in excess of 1.5 megabytes a second. So that's essentially wasted capacity. 843 00:45:04,500 --> 00:45:12,120 So what are the results from scans? It turns out that the top 5% of these nodes have essentially 844 00:45:12,120 --> 00:45:20,400 have room for about 7 times more capacity and the next 10% have room for about 3 times 845 00:45:20,400 --> 00:45:24,720 more capacity. We're going to grab the breakdowns of that by percentile and how that was done 846 00:45:24,720 --> 00:45:29,000 in these successive slides. There are also high circuit failure rates 847 00:45:29,000 --> 00:45:36,280 that drop off, that stop at about the point where nodes are no longer considered for guard 848 00:45:36,280 --> 00:45:42,100 status. There are also high extension rates, you know, 849 00:45:42,100 --> 00:45:45,480 higher than normal extend times beyond this 50% mark as well. 850 00:45:46,220 --> 00:45:47,600 So how is this scanning done? 851 00:45:48,060 --> 00:45:51,500 Essentially, we divide the Tor network into five percentile ranges, 852 00:45:52,140 --> 00:45:54,260 about 80 nodes per range, 853 00:45:54,620 --> 00:45:58,700 and build, in the case of circuit scanning and scanning for circuit failures, 854 00:45:58,900 --> 00:46:02,920 build about 500 three-hop paths for each of these 80 nodes 855 00:46:02,920 --> 00:46:06,460 and fetch a small file through each path. 856 00:46:06,460 --> 00:46:12,040 We count the number of failures and track the extend times through this. 857 00:46:12,340 --> 00:46:13,600 Bandwidth scanning is similar. 858 00:46:13,820 --> 00:46:17,300 Fetch a 512K file 200 times over two-hop paths 859 00:46:17,300 --> 00:46:20,360 and average the bandwidth that we observe through them. 860 00:46:21,120 --> 00:46:22,900 So what does this look like? 861 00:46:22,940 --> 00:46:24,200 What does this misbalancing look like? 862 00:46:24,240 --> 00:46:25,460 And what are some of the effects for users? 863 00:46:26,440 --> 00:46:31,360 This is the breakdown of node bandwidth by these five percentile ranges. 864 00:46:31,700 --> 00:46:34,540 You can see it follows the typical power law statistics, 865 00:46:35,800 --> 00:46:36,320 exponential. 866 00:46:36,460 --> 00:46:40,900 This is the exponential drop-off of the amount of bandwidth that nodes are able to provide. 867 00:46:41,120 --> 00:46:45,360 It turns out the first 5% of the nodes provide about 45% of the bandwidth. 868 00:46:45,600 --> 00:46:49,180 The next 10% after that provide about 30% of the bandwidth, 869 00:46:49,360 --> 00:46:52,560 and the rest of these guys provide the remainder, 25%. 870 00:46:52,560 --> 00:46:58,220 Now, the average stream bandwidth also seems to follow this statistic, 871 00:46:58,460 --> 00:47:00,100 even though in a balanced network, 872 00:47:00,380 --> 00:47:06,440 every node should be receiving traffic proportional to its bandwidth. 873 00:47:06,460 --> 00:47:08,180 It's capacity. 874 00:47:09,880 --> 00:47:15,140 So you have, again, the 7x more capacity. 875 00:47:15,280 --> 00:47:19,320 The average stream capacity for the rest of the network past this range 876 00:47:19,320 --> 00:47:24,840 is about 10 kilobytes a second, as you can see from this diagram. 877 00:47:25,140 --> 00:47:30,100 And the first 5%, the average capacity is 75 kilobytes a second for some reason. 878 00:47:30,440 --> 00:47:35,140 And then the next 10% after that, 879 00:47:37,000 --> 00:47:38,640 it's about 30 kilobytes a second. 880 00:47:40,380 --> 00:47:42,820 So what does this look like in terms of circuit failure? 881 00:47:42,960 --> 00:47:45,000 Again, you can see steadily rising circuit failure 882 00:47:45,340 --> 00:47:49,760 till about the 50th percentile of the network 883 00:47:49,760 --> 00:47:51,780 where nodes stop being considered for guard status, 884 00:47:52,020 --> 00:47:52,960 and then it drops off. 885 00:47:53,240 --> 00:47:56,240 There's a mysterious blip on the radar here at about 25%. 886 00:47:56,240 --> 00:47:59,700 I looked at a number of factors that I'll show in successive slides. 887 00:47:59,760 --> 00:48:03,740 Still, I'm still not sure exactly what the cause of this is. 888 00:48:03,980 --> 00:48:06,440 It remains a mystery. 889 00:48:07,300 --> 00:48:10,380 It's not time of day or uptime or anything like this. 890 00:48:10,460 --> 00:48:13,140 It could be that this just happens to be a sweet spot 891 00:48:13,140 --> 00:48:16,480 for a certain class of users for rate-limiting their Tor node, 892 00:48:16,700 --> 00:48:19,660 and for some reason these users don't exhibit that circuit failure. 893 00:48:19,980 --> 00:48:22,780 You can also see that extend times are reasonable, again, 894 00:48:22,840 --> 00:48:24,460 in this top 15% of the network, 895 00:48:24,680 --> 00:48:27,640 but then they start to spike and continue to rise 896 00:48:27,640 --> 00:48:34,040 up until about the point where their nodes are no longer considered for guard status, 897 00:48:34,380 --> 00:48:36,420 and then they drop sharply off. 898 00:48:36,420 --> 00:48:41,520 After the guard status flag is no longer possible. 899 00:48:42,980 --> 00:48:45,340 So what does this mean from a usability standpoint? 900 00:48:46,720 --> 00:48:50,160 I actually did a couple of calculations, 901 00:48:50,880 --> 00:48:57,580 and it turns out that there's a 70% chance of choosing a pretty badly unbalanced guard, 902 00:48:57,780 --> 00:48:59,680 and where that number comes from, as you see here, 903 00:48:59,840 --> 00:49:02,120 from where the extend times really begin to pick up, 904 00:49:02,160 --> 00:49:05,640 is around this 15 and then all the way up to the 50th percentile. 905 00:49:06,420 --> 00:49:09,480 And every user is going to choose a guard from the 0 to 50th percentile. 906 00:49:09,600 --> 00:49:16,740 So 15 to 50 is 35% double that is 70. 907 00:49:17,200 --> 00:49:20,180 The goal of Tor is to maintain three guards. 908 00:49:20,940 --> 00:49:23,620 So for existing clients that have already chosen their guards, 909 00:49:23,780 --> 00:49:29,720 they have a 34% chance of choosing three unbalanced guards. 910 00:49:30,020 --> 00:49:32,360 So what this means is for 34% of the users, 911 00:49:32,540 --> 00:49:34,380 Tor is likely unbearable. 912 00:49:34,520 --> 00:49:36,400 And anecdotally, this is the case as well. 913 00:49:36,420 --> 00:49:39,980 A friend of mine actually convinced her to install Tor. 914 00:49:41,100 --> 00:49:43,680 She comes back to me about a month later and she says, 915 00:49:43,760 --> 00:49:46,940 well, you know what, my internet connection was, 916 00:49:47,040 --> 00:49:48,880 I thought it was broken for a week. 917 00:49:49,040 --> 00:49:52,040 It turns out I just had left Tor on. 918 00:49:52,500 --> 00:49:59,820 So for 34% of the users, they are likely experiencing some pretty extreme pain 919 00:50:00,360 --> 00:50:06,260 until users begin to update and choose guards based on this bandwidth. 920 00:50:06,420 --> 00:50:08,100 And then further statistics, 921 00:50:09,040 --> 00:50:15,300 three choose two times the probability of choosing one not so highly loaded guard. 922 00:50:15,540 --> 00:50:24,940 You have a three times 0.7 times 0.3 or 44% chance of choosing two out of three bad guards. 923 00:50:25,040 --> 00:50:30,060 So for 44% of users, Tor is going to build circuits, 924 00:50:31,300 --> 00:50:33,700 66% of the circuits are going to be slow, 925 00:50:33,880 --> 00:50:35,620 33% are going to be reasonable. 926 00:50:36,420 --> 00:50:38,600 And then 19% are going to have one bad guard. 927 00:50:38,720 --> 00:50:41,980 And only 3% of the users are probably going to have a reasonable guard. 928 00:50:42,680 --> 00:50:44,900 So other factors of load balancing, 929 00:50:45,400 --> 00:50:46,760 insane exit policies, 930 00:50:47,920 --> 00:50:48,800 allowing BitTorrent, 931 00:50:49,300 --> 00:50:51,780 peer-to-peer traffic and SMTP are big factors 932 00:50:51,780 --> 00:50:53,500 and nodes that are failing a lot of circuits as well. 933 00:50:53,540 --> 00:50:54,680 I was able to determine that. 934 00:50:55,920 --> 00:50:59,680 Unfortunately, some of these are also hard to see beyond that initial noise 935 00:51:00,220 --> 00:51:04,460 of the circuit failure due to this balancing issue. 936 00:51:04,860 --> 00:51:06,400 High uptime versus low uptime, 937 00:51:06,420 --> 00:51:08,820 this is probably a factor in that if you're a guard node 938 00:51:08,820 --> 00:51:10,180 and you're running for a while, 939 00:51:10,600 --> 00:51:13,440 users are going to choose you and hold onto you for as long as they can. 940 00:51:13,600 --> 00:51:16,320 After a while, if you run for longer than everybody else in the network, 941 00:51:16,440 --> 00:51:18,300 you're going to attract a disproportional number of users. 942 00:51:18,580 --> 00:51:19,520 They're going to use you. 943 00:51:20,480 --> 00:51:24,960 So far, this doesn't seem to be a definitive statistic, 944 00:51:25,260 --> 00:51:29,520 probably because guard nodes do go up and down. 945 00:51:30,100 --> 00:51:33,620 But I haven't looked at this in a lot of detail, 946 00:51:33,720 --> 00:51:35,260 but again, because it's hard to see through the noise. 947 00:51:36,720 --> 00:51:37,860 Scarce guard bandwidth. 948 00:51:40,540 --> 00:51:44,680 Guard node bandwidth turns out makes up about 40% of the network bandwidth. 949 00:51:44,980 --> 00:51:47,440 It would be nice to avoid these things for the relay choice. 950 00:51:47,580 --> 00:51:48,380 That's just a possibility. 951 00:51:49,180 --> 00:51:52,260 Just so that they're not being used in positions where 952 00:51:53,480 --> 00:51:57,540 or lower their probability of being chosen for non-guard positions 953 00:51:57,540 --> 00:52:01,020 because they are a somewhat scarce resource. 954 00:52:01,220 --> 00:52:02,340 They're greater than a third of the bandwidth, 955 00:52:02,540 --> 00:52:05,200 but that remainder should probably be weighted accordingly 956 00:52:05,200 --> 00:52:07,880 to that 7% that's left over. 957 00:52:08,240 --> 00:52:09,540 Directory versus node traffic. 958 00:52:09,780 --> 00:52:11,060 Nodes that are directory mirrors. 959 00:52:12,080 --> 00:52:14,600 The balancing between those two may or may not be an issue. 960 00:52:15,360 --> 00:52:18,080 And time of day and location are potential possibilities 961 00:52:18,080 --> 00:52:19,820 that could explain some of these blips. 962 00:52:20,040 --> 00:52:23,620 Like in here, I did run these scans over a number of days. 963 00:52:23,700 --> 00:52:26,460 It's possible this was daytime, nighttime, 964 00:52:26,700 --> 00:52:28,440 daytime, nighttime, daytime, nighttime. 965 00:52:29,540 --> 00:52:30,860 So that's a possibility. 966 00:52:31,040 --> 00:52:33,560 I did try rerunning this one at a 12-hour offset 967 00:52:33,560 --> 00:52:34,920 from when it first showed up. 968 00:52:35,200 --> 00:52:37,640 And that was not an issue on this blip. 969 00:52:40,700 --> 00:52:42,800 So questions about the balancing issues, 970 00:52:42,880 --> 00:52:45,740 usability issues of guards? 971 00:52:46,760 --> 00:52:48,980 Or any network scanning questions? 972 00:52:51,980 --> 00:52:52,480 Yeah? 973 00:52:53,800 --> 00:52:54,300 . 974 00:52:57,140 --> 00:53:00,100 Oh, yeah, so if you want to try and 975 00:53:01,040 --> 00:53:03,200 if you use TOR and you think that, yeah, 976 00:53:03,280 --> 00:53:04,400 a lot of the time it is slow, 977 00:53:05,200 --> 00:53:07,300 and it's variations on slowness, 978 00:53:07,420 --> 00:53:10,380 what you can do is try and find this state file. 979 00:53:10,660 --> 00:53:11,800 And just remove that. 980 00:53:12,060 --> 00:53:13,880 TOR will choose new guards proportionally. 981 00:53:13,880 --> 00:53:16,060 That's probably the best thing for you. 982 00:53:16,180 --> 00:53:18,140 And then guard TOR, the newer versions of TOR 983 00:53:18,140 --> 00:53:20,600 will choose guards proportionally bandwidth. 984 00:53:20,760 --> 00:53:22,600 And you have a higher probability of choosing 985 00:53:22,600 --> 00:53:24,660 those lessly weighted guards. 986 00:53:25,000 --> 00:53:30,100 And at some point, I believe we will expire the guards 987 00:53:30,100 --> 00:53:34,520 that, you know, of users that it chose them prior to that. 988 00:53:34,520 --> 00:53:37,300 That 02115 version. 989 00:53:38,020 --> 00:53:40,380 So at that point, the network should just, 990 00:53:41,140 --> 00:53:43,460 as far as I can tell, should magically rebalance. 991 00:53:43,860 --> 00:53:46,000 And then hopefully everything will be a lot better. 992 00:53:46,260 --> 00:53:49,160 And there should be four, oh, the other piece of math 993 00:53:49,160 --> 00:53:51,380 is that there should be about four times more capacity 994 00:53:51,380 --> 00:53:54,580 either for more users or more bandwidth per user. 995 00:53:54,880 --> 00:53:57,700 So a current estimate is 200,000 users. 996 00:53:58,180 --> 00:54:00,260 Should be room for maybe 800,000. 997 00:54:00,260 --> 00:54:01,980 But there's a lot of factors in there that, 998 00:54:02,000 --> 00:54:03,240 you know, you can't really say that for sure. 999 00:54:03,240 --> 00:54:04,340 There's an economic factor. 1000 00:54:05,460 --> 00:54:07,740 Some users will put up with a certain amount of speed. 1001 00:54:07,920 --> 00:54:10,300 And then you have that sort of supply versus demand type curve. 1002 00:54:10,760 --> 00:54:13,140 Steven Murdock posted some nice graphs 1003 00:54:13,140 --> 00:54:17,020 on that sort of behavior to the OR talk list. 1004 00:54:38,140 --> 00:54:41,060 Yeah, so it is done probabilistically. 1005 00:54:41,320 --> 00:54:43,780 So if you weight it by the bandwidth, 1006 00:54:43,900 --> 00:54:46,420 unfortunately the only metric we have right now 1007 00:54:46,420 --> 00:54:48,920 is what nodes say that they are observing 1008 00:54:48,920 --> 00:54:50,580 that they are carrying. 1009 00:54:51,320 --> 00:54:53,480 But we are able to detect liars, as I said, 1010 00:54:53,480 --> 00:54:57,720 by the fact that they exhibit the lower stream bandwidth. 1011 00:54:57,840 --> 00:55:00,240 Now there's potential for sort of a feedback loop there. 1012 00:55:00,420 --> 00:55:03,000 So you can say, oh, well, these guys are exhibiting 1013 00:55:03,000 --> 00:55:04,240 a higher amount of circuit failure 1014 00:55:04,740 --> 00:55:07,180 via those decentralized mechanism scanning. 1015 00:55:07,860 --> 00:55:08,700 Avoid them. 1016 00:55:09,080 --> 00:55:12,360 These have more capacity and sort of dynamically rebalance 1017 00:55:12,360 --> 00:55:14,040 to try and deal with the nuances 1018 00:55:15,660 --> 00:55:18,000 of what might not be accounted for 1019 00:55:18,000 --> 00:55:20,840 by that just basic probabilistic weighting. 1020 00:55:20,880 --> 00:55:22,420 But that's something that's further down the road 1021 00:55:22,420 --> 00:55:25,000 after we fix, you know, these basic issues. 1022 00:55:31,180 --> 00:55:31,660 Yeah? 1023 00:55:31,660 --> 00:55:31,920 . 1024 00:55:35,560 --> 00:55:35,980 Scan. 1025 00:55:37,560 --> 00:55:41,320 I believe if you search the OR talk archives, 1026 00:55:41,660 --> 00:55:42,980 its name was one. 1027 00:55:43,500 --> 00:55:45,900 So the subject was, oh, my God, I found one 1028 00:55:45,900 --> 00:55:46,800 or something like this 1029 00:55:47,660 --> 00:55:50,100 right after I had announced the snakes on the tour. 1030 00:55:50,400 --> 00:55:52,700 So I found a snake and I was all excited. 1031 00:55:52,860 --> 00:55:55,400 So there's that post where you can laugh at me or whatever. 1032 00:56:04,660 --> 00:56:05,100 . 1033 00:56:06,900 --> 00:56:09,120 The SSH, I should clarify, though, 1034 00:56:09,200 --> 00:56:11,380 the SSH man in the middle was actually observed 1035 00:56:11,920 --> 00:56:13,840 initially independent of the scanner. 1036 00:56:14,020 --> 00:56:16,380 Somebody, I have a day job, 1037 00:56:16,440 --> 00:56:19,000 not able to consistently watch this stuff. 1038 00:56:19,180 --> 00:56:21,040 Turns out somebody found the SSH man in the middle. 1039 00:56:21,120 --> 00:56:22,840 We were able to detect it reappearing 1040 00:56:22,840 --> 00:56:24,920 at other dates under different names. 1041 00:56:25,140 --> 00:56:28,780 So they gave up shortly after the person found them 1042 00:56:28,780 --> 00:56:30,940 on the mailing list, and then they tried again a bit later, 1043 00:56:30,940 --> 00:56:31,660 and we found them then. 1044 00:56:32,260 --> 00:56:32,520 So... 1045 00:56:36,620 --> 00:56:38,640 Okay, so the application layer. 1046 00:56:38,820 --> 00:56:40,400 This is, I've done some work on TorButton 1047 00:56:40,400 --> 00:56:41,720 to try and secure the web browser. 1048 00:56:43,300 --> 00:56:48,040 So what sort of things go into securing 1049 00:56:48,040 --> 00:56:49,500 the application layer of Tor? 1050 00:56:50,320 --> 00:56:54,540 Tor has basically a superset of threat model 1051 00:56:54,540 --> 00:56:56,840 that most applications were written for. 1052 00:56:57,420 --> 00:56:59,880 No UDP, unique identifiers are bad. 1053 00:57:00,100 --> 00:57:00,840 Have to obey. 1054 00:57:00,940 --> 00:57:01,700 Have to obey the proxy settings. 1055 00:57:02,820 --> 00:57:05,940 Location information is... 1056 00:57:06,540 --> 00:57:07,960 It shouldn't be translated. 1057 00:57:08,120 --> 00:57:09,200 It shouldn't leak your time zone. 1058 00:57:09,640 --> 00:57:10,620 Updates are dangerous. 1059 00:57:12,100 --> 00:57:15,840 And, you know, it's a hostile network, essentially. 1060 00:57:16,060 --> 00:57:17,160 This last one is... 1061 00:57:17,160 --> 00:57:20,420 A couple of these do apply to other scenarios as well. 1062 00:57:20,820 --> 00:57:24,660 Proxy settings for web are kind of important, I think, 1063 00:57:24,740 --> 00:57:26,720 from JavaScript malware these days. 1064 00:57:26,780 --> 00:57:30,140 If you have a corporate internet that you would like to protect 1065 00:57:30,140 --> 00:57:34,540 from JavaScript that is able to scan the host on your network, 1066 00:57:34,700 --> 00:57:37,180 proxy settings and a browser that obeys them 1067 00:57:37,180 --> 00:57:39,360 would be a nice thing to have. 1068 00:57:40,020 --> 00:57:41,660 Firefox does have this property. 1069 00:57:42,940 --> 00:57:47,460 Past versions of IAE have questionable behavior in this regard. 1070 00:57:47,620 --> 00:57:50,300 We haven't yet reexamined the current behavior of it. 1071 00:57:50,780 --> 00:57:55,060 But updates, again, some Firefox extensions aren't sent over SSL. 1072 00:57:55,140 --> 00:57:56,340 That was in the press recently. 1073 00:57:57,160 --> 00:57:59,440 So what sort of things are... 1074 00:58:00,140 --> 00:58:05,520 are dangerous from a web-based attacker? 1075 00:58:06,460 --> 00:58:08,240 Bypassing proxy settings is the main one. 1076 00:58:08,340 --> 00:58:13,520 This can be done with essentially JavaScript events 1077 00:58:14,140 --> 00:58:18,000 and plugins. 1078 00:58:18,280 --> 00:58:21,500 Plugins are horrible at obeying even their own proxy settings. 1079 00:58:23,440 --> 00:58:25,960 Metarefresh is another one waiting for Tor to be disabled 1080 00:58:25,960 --> 00:58:27,760 and setting a really long metarefresh timer 1081 00:58:27,760 --> 00:58:30,120 or a continual refresh loop. 1082 00:58:30,860 --> 00:58:32,600 Correlation of Tor versus non-Tor. 1083 00:58:32,660 --> 00:58:34,400 This can be done some surprising ways. 1084 00:58:35,040 --> 00:58:36,320 Cache is one. 1085 00:58:36,640 --> 00:58:40,400 You can embed a unique identifier in a document you serve 1086 00:58:40,400 --> 00:58:44,520 through a Tor node 1087 00:58:44,520 --> 00:58:48,020 and then you can inspect the DOM of pages later 1088 00:58:48,020 --> 00:58:53,160 to see if that particular content element 1089 00:58:53,160 --> 00:58:56,280 has that unique identifier that you've embedded into it. 1090 00:58:56,440 --> 00:58:57,780 Cookies are another big one. 1091 00:59:00,340 --> 00:59:05,760 Cookies of several websites do not tie themselves to SSL. 1092 00:59:06,000 --> 00:59:09,420 So if you visit gmail.google.com is one of them. 1093 00:59:09,500 --> 00:59:12,580 If you visit the HTTPS version of Google 1094 00:59:13,520 --> 00:59:15,840 and you log in through HTTPS 1095 00:59:15,840 --> 00:59:17,800 and then you continue to use it through HTTPS, 1096 00:59:18,060 --> 00:59:22,400 you will have a number of cookies. 1097 00:59:22,500 --> 00:59:23,880 One of them is this GX cookie. 1098 00:59:24,480 --> 00:59:27,080 This cookie can be... 1099 00:59:27,080 --> 00:59:30,400 You can use that to access mail.google.com 1100 00:59:30,400 --> 00:59:33,060 outside of SSL. 1101 00:59:33,240 --> 00:59:38,000 Now this also means that you can insert a content element 1102 00:59:38,600 --> 00:59:41,360 when a user on the local network 1103 00:59:41,360 --> 00:59:44,200 or through the Tor network visits cnn.com. 1104 00:59:44,460 --> 00:59:48,560 And you can cause the browser to transmit that cookie, 1105 00:59:49,340 --> 00:59:51,920 grab it, and then fetch their inbox behind their back 1106 00:59:51,920 --> 00:59:53,060 or send mails to them or whatever. 1107 00:59:53,400 --> 00:59:56,020 Several websites have this sort of property. 1108 00:59:56,020 --> 00:59:59,140 I just ordered some stuff a bit ago, 1109 00:59:59,280 --> 01:00:01,380 and the shopping cart had the same problem 1110 01:00:01,380 --> 01:00:03,920 where I was through SSL, 1111 01:00:03,980 --> 01:00:07,300 but if you used the Firefox extension, 1112 01:00:07,840 --> 01:00:08,920 cookie color or whatever, 1113 01:00:09,020 --> 01:00:11,040 to inspect the properties of the cookies, 1114 01:00:11,260 --> 01:00:13,580 their cookies were any type of session. 1115 01:00:13,780 --> 01:00:16,620 They could be sent outside of an SSL connection. 1116 01:00:17,240 --> 01:00:20,660 So it's possible that in those cases 1117 01:00:20,660 --> 01:00:22,420 somebody can go back and review my order 1118 01:00:22,420 --> 01:00:25,040 and try and grab my credit card information or whatever. 1119 01:00:25,040 --> 01:00:28,220 So those sorts of things are a danger 1120 01:00:28,220 --> 01:00:30,500 both for Tor and non-Tor usage. 1121 01:00:31,440 --> 01:00:33,200 History disclosure is another big one. 1122 01:00:33,720 --> 01:00:39,160 JavaScript can examine the DOM attributes of links 1123 01:00:39,160 --> 01:00:45,280 and determine if they have the visited attribute or not. 1124 01:00:46,160 --> 01:00:48,160 It can do this with a very high rate of speed, 1125 01:00:48,300 --> 01:00:50,540 10,000 queries a second. 1126 01:00:50,720 --> 01:00:51,840 See if you have been to... 1127 01:00:51,840 --> 01:00:53,460 issued particular Google queries. 1128 01:00:53,460 --> 01:00:56,480 See if you have visited certain websites. 1129 01:00:56,720 --> 01:00:59,520 The Great Firewall can do this against Tor users 1130 01:00:59,520 --> 01:01:02,900 to see if they've Googled for censored Google queries. 1131 01:01:04,640 --> 01:01:06,320 You can even do this without JavaScript. 1132 01:01:06,500 --> 01:01:07,300 You can do it with CSS 1133 01:01:07,300 --> 01:01:12,380 and set the style for visited to fetch an image. 1134 01:01:12,680 --> 01:01:14,780 And without any JavaScript at all, 1135 01:01:14,840 --> 01:01:16,360 examine people's history 1136 01:01:16,360 --> 01:01:19,100 and see if they've queried it for certain URLs. 1137 01:01:20,920 --> 01:01:22,840 And then general anonymity set reduction. 1138 01:01:22,840 --> 01:01:28,120 Essentially comes about because of user agent, 1139 01:01:28,320 --> 01:01:30,740 location, locale information, 1140 01:01:31,140 --> 01:01:36,420 and other information like 1141 01:01:36,420 --> 01:01:38,620 if you're the only Ice Weasel Debian user, 1142 01:01:39,740 --> 01:01:41,840 there's probably not very many of them. 1143 01:01:41,900 --> 01:01:46,060 That definitely cuts down your anonymity set considerably. 1144 01:01:46,320 --> 01:01:48,460 And history records for that search and seizure case 1145 01:01:48,460 --> 01:01:50,140 that I discussed before. 1146 01:01:51,400 --> 01:01:52,740 So the plugin wall of shame 1147 01:01:52,840 --> 01:01:55,260 all these plugins can bypass proxy settings 1148 01:01:55,260 --> 01:01:55,980 in one way or another. 1149 01:01:56,140 --> 01:01:57,400 Flash is pretty great 1150 01:01:57,400 --> 01:01:58,640 because you'll look at it 1151 01:01:58,640 --> 01:02:00,280 and you'll look at it in Wireshark. 1152 01:02:00,400 --> 01:02:01,240 You'll say, oh, hey, 1153 01:02:01,360 --> 01:02:03,640 it did fetch this thing through my proxy. 1154 01:02:03,680 --> 01:02:04,140 That's great. 1155 01:02:04,320 --> 01:02:05,660 And you'll use it for a while 1156 01:02:05,660 --> 01:02:06,680 and then all of a sudden 1157 01:02:06,680 --> 01:02:07,520 it'll start making some connections 1158 01:02:07,520 --> 01:02:08,460 outside your proxy. 1159 01:02:10,220 --> 01:02:14,420 And then it just disobeys them for some reason. 1160 01:02:15,620 --> 01:02:16,680 So I'm not sure. 1161 01:02:16,720 --> 01:02:17,980 I don't know the details of ActionScript 1162 01:02:17,980 --> 01:02:19,380 that maybe you can just say 1163 01:02:19,380 --> 01:02:20,820 whether you want to listen to the proxy settings 1164 01:02:20,820 --> 01:02:21,760 from the browser or not 1165 01:02:21,760 --> 01:02:22,540 or maybe it has to do 1166 01:02:22,840 --> 01:02:24,620 with how the embedded object 1167 01:02:24,620 --> 01:02:25,920 is referenced in the page 1168 01:02:25,920 --> 01:02:28,860 or if that flash thing 1169 01:02:28,860 --> 01:02:31,040 is first the movie 1170 01:02:31,040 --> 01:02:32,680 that then fetches other content itself 1171 01:02:32,680 --> 01:02:33,560 through ActionScript. 1172 01:02:33,820 --> 01:02:34,920 Those are possibilities. 1173 01:02:35,760 --> 01:02:37,600 QuickTime has a proxy 1174 01:02:37,600 --> 01:02:39,080 for real-time streaming protocol 1175 01:02:39,080 --> 01:02:41,240 which is primarily UDP media protocol. 1176 01:02:41,920 --> 01:02:43,340 So that's really irrelevant. 1177 01:02:43,640 --> 01:02:46,520 And that proxy setting doesn't apply to web streams. 1178 01:02:46,660 --> 01:02:47,380 There's no other settings. 1179 01:02:47,780 --> 01:02:49,960 Windows Media Player is probably the most amusing one. 1180 01:02:50,140 --> 01:02:51,500 It does have proxy settings. 1181 01:02:51,500 --> 01:02:53,240 It even has a no bypass option. 1182 01:02:53,960 --> 01:02:55,240 It still ignores it. 1183 01:02:55,460 --> 01:02:58,260 So you can set that in that application 1184 01:02:58,260 --> 01:03:01,900 and it'll still use both proxy and not proxy 1185 01:03:02,500 --> 01:03:03,760 if you watch it in ethereal. 1186 01:03:04,800 --> 01:03:07,420 Adobe Acrobat Reader will leak DNS. 1187 01:03:07,660 --> 01:03:09,540 Mplayer plugin obeys proxy settings 1188 01:03:09,540 --> 01:03:11,980 for AVI files and stuff that you fetch 1189 01:03:11,980 --> 01:03:13,380 just via straight HTTP. 1190 01:03:13,660 --> 01:03:15,740 But it does support this real-time streaming protocol 1191 01:03:15,740 --> 01:03:17,340 which is UDP and some other things 1192 01:03:17,340 --> 01:03:20,420 that it's unclear how those proxy settings 1193 01:03:20,420 --> 01:03:21,820 really apply. 1194 01:03:23,740 --> 01:03:25,140 So what's the solution to this? 1195 01:03:25,720 --> 01:03:28,500 As I said, I did some work on improving TorButton 1196 01:03:28,500 --> 01:03:30,600 which is a Firefox extension for Tor 1197 01:03:30,600 --> 01:03:31,980 so you can toggle your Tor usage. 1198 01:03:33,780 --> 01:03:36,380 Essentially, I disable all plugins 1199 01:03:36,380 --> 01:03:37,680 while Tor is enabled. 1200 01:03:40,060 --> 01:03:42,820 I isolated the dynamic content of a page 1201 01:03:42,820 --> 01:03:43,860 in a couple of number of ways. 1202 01:03:44,240 --> 01:03:48,760 CSS can fetch elements based on your hover 1203 01:03:48,760 --> 01:03:50,400 or whatever to do CSS-based projects 1204 01:03:50,420 --> 01:03:51,760 without any JavaScript involved. 1205 01:03:52,100 --> 01:03:54,480 So I wrote an NSI content policy 1206 01:03:54,480 --> 01:03:59,280 that basically I tag every tab 1207 01:03:59,280 --> 01:04:03,120 with the Tor state of the load for that tab. 1208 01:04:03,320 --> 01:04:08,400 And if a successive document fetch 1209 01:04:08,400 --> 01:04:11,360 tries to happen through that tab 1210 01:04:11,360 --> 01:04:15,140 and the load state of that tab 1211 01:04:15,140 --> 01:04:16,360 is different than the current Tor state, 1212 01:04:16,560 --> 01:04:17,540 that fetch is blocked. 1213 01:04:17,780 --> 01:04:20,300 Also, similarly, I disable JavaScript 1214 01:04:20,920 --> 01:04:23,920 based on the Tor state of the initial load. 1215 01:04:24,020 --> 01:04:25,500 And as soon as you toggle Tor, 1216 01:04:25,740 --> 01:04:29,160 I disable JavaScript in all the tabs 1217 01:04:29,160 --> 01:04:31,360 with the state different than the current one 1218 01:04:31,360 --> 01:04:33,860 and re-enable it in all the tabs 1219 01:04:34,420 --> 01:04:36,720 with the state that is the same as the current one. 1220 01:04:38,060 --> 01:04:38,840 Cookie jars. 1221 01:04:39,160 --> 01:04:42,460 I have an option via code contributed by Colin Jackson 1222 01:04:42,460 --> 01:04:45,700 that saves all your cookies to a cookie jar 1223 01:04:45,700 --> 01:04:49,260 that can't be accessed through Tor usage. 1224 01:04:49,260 --> 01:04:52,020 And is restored when you turn off Tor. 1225 01:04:53,580 --> 01:04:54,720 Cache management. 1226 01:04:55,000 --> 01:04:57,100 Make sure the cache never writes to disk. 1227 01:04:57,380 --> 01:05:02,680 Make sure that it's wiped when you toggle Tor. 1228 01:05:03,200 --> 01:05:04,260 History management. 1229 01:05:06,980 --> 01:05:17,000 This is essentially another interface 1230 01:05:17,000 --> 01:05:18,820 that was implemented by Colin Jackson 1231 01:05:19,260 --> 01:05:20,060 in one of his extensions 1232 01:05:22,040 --> 01:05:24,840 to prevent at the rendering engine level 1233 01:05:27,080 --> 01:05:29,720 to inform it whether a link is visited or not. 1234 01:05:29,840 --> 01:05:33,980 So it blocks both the CSS and the JavaScript methods 1235 01:05:36,860 --> 01:05:39,740 of determining whether or not you have visited a site. 1236 01:05:40,040 --> 01:05:41,800 And user agent spoofing during Tor 1237 01:05:44,420 --> 01:05:47,620 is done a little bit better than the other extensions for that. 1238 01:05:47,620 --> 01:05:51,460 User agent spoofer is a Firefox extension 1239 01:05:51,460 --> 01:05:53,020 that tries to do this, 1240 01:05:53,080 --> 01:05:55,440 but it misses a couple of JavaScript ways 1241 01:05:55,440 --> 01:05:57,800 of determining the user agent through the navigator object. 1242 01:05:59,180 --> 01:06:02,340 Firefox itself has user agent settings 1243 01:06:02,340 --> 01:06:04,260 that it doesn't apply to certain elements 1244 01:06:04,260 --> 01:06:05,300 of this navigator object 1245 01:06:05,300 --> 01:06:07,160 that you have to hook the methods of 1246 01:06:07,160 --> 01:06:10,000 in order to return appropriate versions 1247 01:06:10,620 --> 01:06:15,600 for when those methods and attributes are examined. 1248 01:06:17,420 --> 01:06:19,420 Time zone and locale spoofing. 1249 01:06:19,480 --> 01:06:21,240 Another thing, this is a bit tricky. 1250 01:06:21,480 --> 01:06:26,620 Turns out there's no way to specify your time zone in Firefox. 1251 01:06:26,820 --> 01:06:31,000 You actually have to actively hook the date object 1252 01:06:31,000 --> 01:06:33,780 and make it return UTC times. 1253 01:06:34,500 --> 01:06:39,720 The example snippet of code for that is on the conference CD. 1254 01:06:39,800 --> 01:06:42,020 If you're a JavaScript guru, please have a look at that. 1255 01:06:42,160 --> 01:06:45,240 I did try and vet it pretty much every way I could think of 1256 01:06:45,240 --> 01:06:49,920 to try and examine ways to access the original wrapped date object 1257 01:06:49,920 --> 01:06:51,800 that I wrapped via lexical scoping 1258 01:06:52,380 --> 01:06:54,720 to try and determine what the original time zone was 1259 01:06:54,720 --> 01:06:57,860 and various ways of copying objects and so on. 1260 01:06:58,020 --> 01:07:00,860 As far as I can tell, 1261 01:07:00,940 --> 01:07:02,840 the method that I used to wrap that object, 1262 01:07:03,700 --> 01:07:05,500 according to every JavaScript reference I read, 1263 01:07:05,680 --> 01:07:10,120 is a valid method of obfuscating private member variables 1264 01:07:10,120 --> 01:07:14,080 or protecting private member variables 1265 01:07:14,080 --> 01:07:15,820 from external access. 1266 01:07:16,840 --> 01:07:20,220 It's possible I may have missed something. 1267 01:07:20,820 --> 01:07:22,740 Please do have a look at that. 1268 01:07:22,900 --> 01:07:26,920 The ideal solution is for Firefox to provide a time zone setting 1269 01:07:26,920 --> 01:07:29,240 that we can guarantee applies. 1270 01:07:32,460 --> 01:07:37,100 A demo of these sorts of things with Tor button is probably in order. 1271 01:07:37,860 --> 01:07:40,500 I have a few websites loaded over here 1272 01:07:42,740 --> 01:07:44,480 with basic information. 1273 01:07:44,920 --> 01:07:47,480 This particular page has user agent information. 1274 01:07:47,960 --> 01:07:49,860 I don't know if you can see this font. 1275 01:07:50,760 --> 01:07:52,560 I can make that a little bit bigger. 1276 01:07:53,340 --> 01:07:56,960 After a while, their CSS starts to fail. 1277 01:08:03,380 --> 01:08:08,660 Here you can see various properties of that navigator object. 1278 01:08:11,020 --> 01:08:12,140 They're queried. 1279 01:08:12,580 --> 01:08:14,840 Then they report that I'm using Linux, 1280 01:08:15,060 --> 01:08:16,540 a particular build of Firefox, 1281 01:08:16,940 --> 01:08:19,440 and operating system and CPU. 1282 01:08:20,420 --> 01:08:22,800 If I then turn on Tor 1283 01:08:22,800 --> 01:08:31,660 and fetch this via a Tor fetch, 1284 01:08:31,960 --> 01:08:34,300 you can see as soon as that loads, 1285 01:08:34,360 --> 01:08:35,740 we'll see that it has been reset. 1286 01:08:36,280 --> 01:08:38,180 The other example I have is, 1287 01:08:38,660 --> 01:08:39,220 CSS exploit, 1288 01:08:39,400 --> 01:08:42,420 able to verify that I've been to Google and Slashdot. 1289 01:08:44,340 --> 01:08:45,320 Time zone information. 1290 01:08:45,640 --> 01:08:48,340 Here's the fact that I'm on Pacific time. 1291 01:08:50,080 --> 01:08:51,880 Plugin information, a list of my plugins. 1292 01:08:52,280 --> 01:08:57,360 Here's a CSS-only history disclosure. 1293 01:08:57,700 --> 01:08:58,840 No JavaScript involved. 1294 01:08:59,060 --> 01:09:00,460 They're able to tell that I visit Google. 1295 01:09:00,880 --> 01:09:03,340 I probably should have loaded all of these. 1296 01:09:04,520 --> 01:09:06,720 If I run through all of these, 1297 01:09:14,960 --> 01:09:15,520 they're able to tell that I've been to Google or Slashdot. 1298 01:09:15,520 --> 01:09:16,060 I'll just do that one. 1299 01:09:16,260 --> 01:09:20,460 Here you see that the user agent has been reset to Windows. 1300 01:09:20,820 --> 01:09:22,540 All these properties are Win32. 1301 01:09:24,200 --> 01:09:26,420 The user agent is pretty much taken care of. 1302 01:09:26,880 --> 01:09:29,420 All the CSS exploit stuff fails. 1303 01:09:30,900 --> 01:09:35,160 The JavaScript method of detecting history fails 1304 01:09:36,060 --> 01:09:37,900 to tell that I've been to Google 1305 01:09:37,900 --> 01:09:40,160 or Slashdot. 1306 01:09:40,320 --> 01:09:42,020 My history has not been cleared. 1307 01:09:44,240 --> 01:09:46,020 Again, it's through the rendering engine. 1308 01:09:47,560 --> 01:09:49,020 Time and date information. 1309 01:09:49,680 --> 01:09:52,020 This one, did that reload through Tor? 1310 01:09:53,320 --> 01:09:54,100 Plugin information. 1311 01:09:56,760 --> 01:09:58,340 No plugins have been loaded. 1312 01:09:58,640 --> 01:10:04,160 CSS history isn't able to tell that I've been through Google. 1313 01:10:09,440 --> 01:10:11,420 CSS pop-ups. 1314 01:10:11,560 --> 01:10:14,100 This, I should redo this one. 1315 01:10:30,640 --> 01:10:33,340 Oh, slowly, slowly, slowly. 1316 01:10:36,060 --> 01:10:37,380 And then there. 1317 01:10:37,380 --> 01:10:40,540 The time zones are all reset to GMT on this one. 1318 01:10:44,320 --> 01:10:48,900 So the CSS pop-up will behave a little bit differently. 1319 01:10:49,020 --> 01:10:49,740 I have to reload this. 1320 01:10:51,040 --> 01:10:54,520 Here you can see that this thing fetches images 1321 01:10:54,520 --> 01:10:57,760 for whenever I mouse over these elements 1322 01:10:57,760 --> 01:11:01,100 based on the hover CSS attribute. 1323 01:11:01,700 --> 01:11:04,880 If I reload this again and don't hover over those 1324 01:11:04,880 --> 01:11:06,520 and then turn on Tor 1325 01:11:06,520 --> 01:11:08,820 and then hover over them, they don't fetch. 1326 01:11:11,340 --> 01:11:13,100 So via the content policy. 1327 01:11:16,320 --> 01:11:17,760 Interesting technical details. 1328 01:11:18,040 --> 01:11:21,540 I think probably the most interesting one of these 1329 01:11:21,540 --> 01:11:22,800 is the JavaScript hooking. 1330 01:11:24,420 --> 01:11:26,220 If you are a JavaScript guru, 1331 01:11:26,320 --> 01:11:29,060 again, have a look at the Black Hat handout 1332 01:11:29,060 --> 01:11:30,900 on the conference CD 1333 01:11:31,300 --> 01:11:32,720 and have a look at that JavaScript. 1334 01:11:33,540 --> 01:11:35,740 To my knowledge, it is solid, 1335 01:11:35,740 --> 01:11:40,420 but I tried about a dozen ways of attacking it, 1336 01:11:40,500 --> 01:11:41,640 accessing the scope variable, 1337 01:11:42,220 --> 01:11:44,940 trying to access the JavaScript source code 1338 01:11:44,940 --> 01:11:47,980 via modifying the to string and such things, 1339 01:11:48,980 --> 01:11:51,200 and copying various data objects, 1340 01:11:51,360 --> 01:11:54,620 and all those seem to fail. 1341 01:11:56,120 --> 01:11:58,120 So all of those different attacks. 1342 01:11:59,740 --> 01:12:01,720 So final thoughts, I guess. 1343 01:12:03,340 --> 01:12:05,660 Oh, we're wrapping up quite a bit early. 1344 01:12:06,780 --> 01:12:07,780 Final thoughts. 1345 01:12:07,840 --> 01:12:11,620 Tor security is not equal to Internet security. 1346 01:12:11,920 --> 01:12:13,140 It's a superset. 1347 01:12:13,580 --> 01:12:15,500 Adversary has different goals. 1348 01:12:16,460 --> 01:12:18,800 A lot of apps don't consider privacy vulnerabilities 1349 01:12:18,800 --> 01:12:20,460 the same as regular vulnerabilities. 1350 01:12:20,860 --> 01:12:22,540 They are, you know, 1351 01:12:22,540 --> 01:12:25,900 again, it's a different sort of threat model involved. 1352 01:12:26,540 --> 01:12:27,860 So credits and contributions. 1353 01:12:28,040 --> 01:12:30,500 The following people have contributed. 1354 01:12:30,860 --> 01:12:31,780 We've got Scott Squires, 1355 01:12:31,860 --> 01:12:32,820 the original Tor button author. 1356 01:12:33,240 --> 01:12:35,640 Colin Jackson did the history 1357 01:12:35,660 --> 01:12:37,920 hooking and cookie jars, borrowed his code. 1358 01:12:38,280 --> 01:12:41,900 Johannes Renner is the Google Summer of Code student 1359 01:12:42,360 --> 01:12:44,800 working on Tor flow and intelligent path selection. 1360 01:12:45,200 --> 01:12:47,460 Nick and Roger for advice and Tor in general. 1361 01:12:48,340 --> 01:12:50,580 And then shout out to my coworkers, I guess, 1362 01:12:50,660 --> 01:12:53,280 for, well, at least one of them signs the expense reports 1363 01:12:53,280 --> 01:12:57,040 and the other two are pretty good guys in general. 1364 01:12:58,760 --> 01:13:00,900 So what can you do if you're interested in helping Tor? 1365 01:13:01,080 --> 01:13:02,640 On the conference CD is a Linux script 1366 01:13:02,640 --> 01:13:04,700 for doing load balancing 1367 01:13:05,660 --> 01:13:06,820 and you can prioritize Tor traffic 1368 01:13:06,820 --> 01:13:09,100 below all your other node traffic. 1369 01:13:10,440 --> 01:13:12,440 I use this on my own Tor node. 1370 01:13:12,840 --> 01:13:14,440 It doesn't... 1371 01:13:14,980 --> 01:13:17,220 I notice no impact from the Tor traffic 1372 01:13:17,220 --> 01:13:19,760 over my SSH traffic or other web traffic. 1373 01:13:20,320 --> 01:13:23,700 Basically, it's used the Linux QoS support, 1374 01:13:23,920 --> 01:13:25,540 so it's pretty handy. 1375 01:13:26,080 --> 01:13:28,380 A nice way to run a Tor node without really interfering 1376 01:13:28,380 --> 01:13:30,340 with your other activity on your shell server 1377 01:13:30,340 --> 01:13:32,880 or whatever hosting you might be using. 1378 01:13:35,660 --> 01:13:38,040 And then, again, please try and raise awareness. 1379 01:13:38,900 --> 01:13:42,980 Post some, you know, plug-ins or patches to your apps 1380 01:13:42,980 --> 01:13:44,380 to protect against information disclosure. 1381 01:13:44,480 --> 01:13:47,920 You know, work to raise awareness about privacy issues. 1382 01:13:49,360 --> 01:13:50,400 Consider it part... 1383 01:13:50,400 --> 01:13:52,180 It should be considered part of security measures, I think. 1384 01:13:52,220 --> 01:13:54,940 There's a lot of arguments for some of these issues 1385 01:13:54,940 --> 01:13:57,580 with proxy settings that can be made independent of Tor. 1386 01:13:58,480 --> 01:13:59,480 Similar to those things, 1387 01:13:59,560 --> 01:14:01,300 that's probably the best way to convince somebody 1388 01:14:01,300 --> 01:14:03,660 that an issue with Tor 1389 01:14:05,120 --> 01:14:05,640 is a good one. 1390 01:14:05,640 --> 01:14:08,000 Is a good thing to fix is to find the example 1391 01:14:08,440 --> 01:14:11,260 that outside of Tor where it's still a problem. 1392 01:14:12,880 --> 01:14:15,480 So, that pretty much wraps it up. 1393 01:14:16,440 --> 01:14:19,780 Questions, comments on those sorts of... 1394 01:14:19,780 --> 01:14:20,820 Those protection mechanisms? 1395 01:14:25,400 --> 01:14:25,920 Yeah. 1396 01:14:27,880 --> 01:14:28,400 Okay. 1397 01:14:35,880 --> 01:14:37,500 That is still... 1398 01:14:38,580 --> 01:14:39,940 It's pre-proposal form. 1399 01:14:40,040 --> 01:14:41,360 So, there's a proposal system in Tor 1400 01:14:41,360 --> 01:14:43,100 where people write up proposals 1401 01:14:43,100 --> 01:14:47,200 to essentially work on, you know, proposed features. 1402 01:14:47,520 --> 01:14:48,860 There's a lot of subtleties there 1403 01:14:48,860 --> 01:14:50,660 and anonymity issues with providing that. 1404 01:14:50,700 --> 01:14:52,280 There's also issues where, you know, 1405 01:14:53,620 --> 01:14:56,420 dissidents in China that are trying to bypass their firewall 1406 01:14:56,820 --> 01:14:59,820 aren't able to, you know, do this sort of thing. 1407 01:14:59,920 --> 01:15:01,520 So, do that mean do they get no service 1408 01:15:01,520 --> 01:15:02,340 or are they going to be... 1409 01:15:02,340 --> 01:15:05,100 You know, is it going to be horribly abysmal service? 1410 01:15:05,100 --> 01:15:06,060 I don't know. 1411 01:15:12,640 --> 01:15:13,920 Other general questions? 1412 01:15:22,340 --> 01:15:22,860 All right. 1413 01:15:24,140 --> 01:15:25,080 Yeah, I guess that... 1414 01:15:25,080 --> 01:15:27,920 I guess we wrapped up quite a bit early. 1415 01:15:35,100 --> 01:15:35,220 Right. 1416 01:15:35,360 --> 01:15:35,380 Okay. 1417 01:15:35,380 --> 01:15:35,580 No more questions.