ToR
From The Black OP Security Wiki
Main Page >> ToR
Long Story Short: ToR passes your data (except flash java etc) encrypted trough a certain number of computers, the last one decrypts it and sends it to the whatever you wanted to send it, so you must be aware that your data can be stolen and your IP could be tracked. It's slow as hell too. So false sensation of "anonimity" at cost of reduced performance.
This is a page dedicated to the workings of ToR, if you want to skip straight to the Install walk-through please see the following pages.
How To Install (WinXP)
How To Install (Mac OS X)
How To Install (Ubuntu)
Install Hidden Service: CentOS
Contents |
How It Works
FAQ
Q. I hear that only [The government, Scammers, Identity thieves, Bad people] run Tor nodes.
A. Almost anyone with a computer and an internet connection can run a Tor node. Although it is quite likely some Tor nodes are run by government agencies, scammers, identity thieves and other generally malicious people, a great many are also run by people just like you. Another thing to keep in mind is that for every node a government agency is running, another agency of another government is likely running one as well. And the chances of the two governments cooperating to launch an attack on your Tor connection are slim. This combined with the type of math involved with Tor shows that it is perhaps not a big deal if a great many nodes are run by a variety of malicious entities. For every node that an adversary adds to the network in an attempt to break someones anonymity, that same node will be used to save the anonymity of thousands of others.
Q. I hear that if I use the Tor network, random people who run nodes can see everything that I am saying.
A. This has some amount of truth in it. If you are using Tor and are not either using SSL, self encryption or only accessing Hidden Services, then the person who runs your exit node can see what you are saying if they bother to look (probably many are in fact going to look, but also many are not going to in the first place). This threat is easily countered however. Simply make sure that when you are using Tor, you are only connecting to websites with SSL, sending information that you have pre-encrypted, or accessing a Hidden Service. You should keep an eye on your SSL certificate as a malicious exit node could attempt to spoof one, but in most cases you will notice this as your browser will likely give you a warning.
Q. Is Tor supposed to go this slow?!
A. Tor is not known for going very fast. There are two main reasons for this. The first reason is that your communications are being relayed through at least three computers around the world. The second reason is that while over a hundred thousand people a day use Tor, there are only around two thousand Tor nodes. So a little bandwidth is being divided up for a lot of people. Keep in mind that you don't need to use Tor for everything you do, just things that you want to keep anonymous.
Q. I hear that if I use the Tor network, my internet traffic will be mixed in with pedophiles.
A. The Tor network has well over a hundred thousand people use it every single day. Some of these people are pedophiles. Some of them are Chinese Dissenters. Some of them are people trying to keep their ISP from gathering information on them and then selling it to marketers. Lots of different people use Tor. Even law enforcement and military agents use Tor. Journalists use Tor. Bloggers who write on controversial subjects use Tor. A lot of the people using Tor are just trying to protect their right to freedom of speech. So although it is true that Tor does attract pedophiles and similar people you would not want to be associated with, just because you use Tor does not by any means make you associated with them.
Another way I have heard this question asked is in the terms of Hidden Services. As many people know that Hidden Services are frequently used by pedophiles, they are hesitant to use Hidden Services themselves, thinking it will mix them in with pedophiles. This is also an incorrect understanding of how Hidden Services work. A Hidden Service is set up on a traditional server that the owner of the Hidden Service has control over. There are not special Tor Hidden Services in some magical building (at the exclusion of all other servers) that just happen to be full of pedophiles. Hidden Services are no more used by pedophiles than traditional servers are. The Tor Hidden Service protocol was designed with military servers in mind in the first place. And as I said before, near any server can be configured as a Tor Hidden Service.
Tor Basics + Attacks
Tor is what is referred to as an anonymity network. It attempts to allow a person to communicate online with out being traceable. Tor consists of a software program and a network. The software program was originally developed by the Navy, but is now developed by a non-profit organization. The Tor network consists of volunteer donated bandwidth and CPU cycles. Almost anyone with a computer and internet connection can set up to be a node for the Tor network. Tor sends your internet traffic through three nodes before it reaches the destination, in an attempt to prevent the destination from being able to find out who you are.
Tor.No.SSL
In addition to routing your traffic through three nodes, Tor encrypts the communications in layers. This prevents your ISP, and the first two nodes (and their ISPs) from being able to see what you are doing. Unfortunately, the design of the internet does not allow for native end to end encryption using systems such as Tor. This means that the Exit node needs to be able to see what you are saying, and who you are saying it to. For this reason, it is best to use SSL constantly when using Tor, otherwise a random volunteer donating bandwidth and CPU cycles to Tor could eavesdrop on a portion of your communications (although they could not trace you back, unless of course you leak personally identifying information in the contents of your communications). With Tor hidden services, there is end to end encryption and SSL is not required (and is suggested against, for anonymity reasons).
ToR with SSL.
Tor has a few weaknesses. The easiest way for the adversary (meaning the person trying to trace you, the enemy, whoever that may be) to find your location, is to use what is called a side channel attack. Side channel attacks do not strictly speaking break Tor, rather they go around Tor to find your real IP address. Such side channel attacks include using Flash, Java applets, Javascript, Quicktime, DNS leaks, FTP leaks, Word plugins, I-tunes plugins and more to bypass Tor and get your real IP address. For this reason, you should disable all plugins when you are using Tor. You should also make sure to point FTP connections at Tor, even though it can't manage them it is better than leaking your real IP address to FTP servers. You should also make sure to disable Flash, Java and Javascript with the browser/application you are using Tor with.
Another attack on Tor, which actually breaks its anonymity rather than goes around it, is node poisoning. The more nodes the adversary owns on your circuit (a circuit is three nodes together), the more info he can gather on you.
Timing Attack
Trace-Back
ISP_retention
Another attack on Tor, the most deadly to its anonymity, is international ISP cooperation. A more detailed illustration of how the Tor network functions would look something like this:
NSA logging
In countries such as the United States, data retention laws have not yet reached the ISP level. The data logging that takes place in the USA is done at Exchange Points, likely by military intelligence agencies such as the NSA. Here is an illustration of how this sort of logging appears:
Another noteworthy attack on Tor is the adversary being able to see that you are even using it. In some countries even using Tor is illegal, China being the first that comes to mind. If you are using a laptop and stealing WiFi from different random access points, this may not be quite as big of a deal to your anonymity, as anyone who sees the use of Tor will see it as the people whose WiFi you are borrowing using Tor. Tor might simply be blocked though (this is quite likely), or you may not want to haphazardly play with the lives of people whose WiFi you are borrowing. Tor has some basic anti-censorship measures. For one, you can find a bridge in various ways. A bridge is a node that is not in the publicly listed node directories, but which allows you to connect to the Tor network. You can find bridges from the Tor website, or from friends who get them from the Tor website for you. These bridges are better than using a publicly listed directory node, as they are much less likely to be blocked or noticed. But a determined adversary (Such as the government of China) may be able to find the majority of these nodes by posing as those who wish to use them. Another possibility is to set up, or have a friend set up, a tor relay on a VPS (or home computer) and only share the IP address with you or a few others. This node will most likely not be found by the Chinese government as a Tor node, and is unlikely to be blocked. It should be noted however that if your actual traffic is analyzed it shouldn't be too hard for the Chinese government to tell that it is tor traffic, but this is not near as likely of an attack as them gathering a comprehensive node list. Tor does take a few minor security precautions against the actual traffic being fingerprinted, it semi-disguises your traffic as a different protocol.
It should be noted that you can gain slight anonymity benefits against some attacks by running a relay node. This will make it so a person with a limited amount of nodes can not tell if data coming from your machine originated with you of if it originated with someone else and was merely relayed though you. It might be a bad idea to run a relay on your laptop if you are hitting up random WiFi access points. But it is a good idea to run a relay on your home computer, simply because you contribute to the Tor network and can offer a steady stream of bandwidth. Relays are weaker against some attacks than standard clients. For example, there are hundreds of thousands of Tor clients, and at the peak there are rarely more than two thousand tor nodes at a given time. So your anonymity set is decreased in some ways, against adversaries who know you run a relay, but a crowd of over a thousand is pretty good still. I suggest you run a relay on your home computer but not on your laptop.
Tor Hidden Services
Another feature of Tor is the ability to set up hidden services. A hidden service allows a person to publish content on the internet, or host services (such as IRC), with out revealing the physical location of the server. A Tor hidden service model looks like this:
Hidden services provide significantly stronger anonymity to a system than simply having the clients use Tor does. For one, there are twice as many nodes between the client and the server (six or seven instead of three). This exponentially decreases the chances of someone breaking Tors anonymity with node poisoning. For two, more nodes than exit nodes can be rendezvous points. This also greatly increases the amount of possible circuits, and thus greatly reduces the chances of node poisoning breaking the anonymity of the circuit to traceback. A third advantage is that users absolutely must use Tor to access the hidden service; that means no accidentally forgetting to use Tor, which is an anonymity protection (protects against user error). Fourth, and perhaps most importantly of all, as there are twice as many nodes between the client and the server, that means that in the pure sense (attacks on client to server node circuits), an adversary will need the cooperation of up to twice as many ISPs to do ISP collusion attacks on Tor (although it is at a maximum twice as many, as multiple nodes may use the same ISP, and there are only a few hundred exchange points in the world). The chances of all ISPs of all nodes on the circuit retaining data also decreases significantly. Thus, Tor hidden services provide greatly enhanced anonymity against virtually all attacks that break Tor (but not against side channel attacks).
Tor hidden services have a variety of other advantages as well. Communications between the client and server are end to end encrypted, meaning there is virtually no chance that they will be eavesdropped on by a third party. Tor hidden services also offer (comparatively to SSL) a moderate amount of authentication (although it should be noted the authentication is resistant to some attacks SSL is not). One of the biggest benefits of Tor hidden services is that they are extremely resistant to DDOS attacks. An adversary wishing to DDOS a service will only be able to do so if they find the services IP address (break Tor). Otherwise, they can merely DDOS the entry guards the hidden service is using. Since there are over a thousand possible entry guards, this will require a massive amount of bandwidth. Essentially, to DDOS a single hidden service, an adversary must DDOS the entire Tor network. In addition to techniques which help defend the actual Tor network against DDOS (such as rate limiting and burstable bandwidth settings on tor relays), the Tor network itself is robust enough to handle large amounts of bandwidth.
There are a few attacks on the anonymity of Tor hidden services that go outside the range of attacks on Tor clients. This does not mean that a Tor client accessing a hidden service is more vulnerable than a Tor client accessing a standard web service; actually it is more secure and anonymous. It does however mean, that in some ways it is easier to find a Tor hidden service than it is to find a standard Tor client.
In addition to the standard attacks on Tor clients, (Side channel [although in this case it is more likely to be the software running on the service, such as apache, leaking information], node poisoning [reduced risk], ISP correlation and timing attacks [which in the standard sense are harder to do against hidden services than they are normal clients]), a hidden service is at risk of being found with time skew attacks , sophisticated DDOS / node poisoning attacks and 'special' side channel attacks.
A computer measures time with vibrating quartz crystals. As the temperature of the environment the computer is in changes, minor changes to the speed the quartz crystals vibrate come about. An adversary who can measure the time skew of the hidden service, can use that information to statistically find some information about the server. Certain time skews are more common in a server rack setting (such as most commercial hosting services) than they are in a home computer setting (running on a dedicated box, or on a personal computer). Also, temperature variation through out the day can help an adversary who can see the temperature patterns from the time skew narrow down geographic locations of hidden services. This attack will not fully break the anonymity of Tor, but it can be used to significantly narrow down possible locations of the hidden service.
A possible, albeit relatively unlikely, attack on the anonymity of Tor hidden services involves the use of bandwidth flooding (most likely botnet style DDOS) to down entry guards, while flooding the network with nodes in the hopes that the hidden service will pick one of the poisoned nodes as a new entry guard. Before this attack can properly be explained, entry guards need explained. When a Tor client (including the client used to provide a hidden service) first connects to the Tor network, it selects a couple of entry guards randomly. If they are up and reachable, entry guards will always be used by the client as the first node on a circuit (the entry node). Although the exit and the relay node change randomly every few minutes, the entry node is selected from the same very small pool of nodes that were selected to be entry guards when the client was first set up. This reduces the chance that an adversary with a relatively small amount of nodes will be able to poison an entire circuit, or even be able to do timing attacks. This is because, if the entry guards are not owned by the adversary, the adversary will never be able to trace the clients connect back (via node poisoning) . If the adversary does own one or more of the entry guards used (even all of them), their ability to do a node poisoning attack is based on statistical formulas (and still not very favorable for them).
Entry guards are used by all Tor clients, but with hidden services they are arguably more of a target. Hidden services are up for long periods of time, and will accept a great many connections to them (You visiting a hidden service is one connection from your anonymity perspective, but from the hidden services perspective you are one of many. Plus you decided to open the connection to the hidden service, not vice versa; the hidden service is much more vulnerable to an adversary opening up dozens of connections to it in an attempt to get multiple poisoned nodes in the circuit). Although an entry guard offers a hidden service better anonymity from node poisoning, just as it does for you, it is easier to attack this defense mechanism against a hidden service than it is against a standard client. An adversary with a great deal of bandwidth, such as a large bot net, can flood the Tor network with hundreds of nodes at no expense to themselves (uses the resources of the botnet). They can then force connections to the hidden service via many of the botnet nodes, and eventually they are likely to own two of the three nodes in the circuit coming from the server ; how long it will take for this to happen is based on statistics and greatly depends on how many nodes the adversary owns. With two nodes on the circuit path the adversary can find the IP of the hidden services entry guards, and DDOS them offline with bandwidth from the botnet.
When the entry guards have all been knocked offline, the hidden service will pick new ones. As the adversary has the network flooded with nodes from a botnet, there is a significant chance that at least one of the new entry guards selected by the hidden service will belong to the adversary. The adversary can then flood the hidden service with requests from the botnet, and find the hidden services IP address if they do in fact own the entry guard.
This attack on hidden services is not very likely to be launched by government agencies. Government agencies are much more likely to try and break the anonymity of hidden services with international ISP data retention laws. This attack could however be used by sophisticated non-government affiliated adversaries (people who have an easier time getting a ten thousand node botnet than they do getting ISPs to retain data, or share retained data with them even if they did). However, due to the complexity and sophistication of this attack (as well as the highly questionable legality), it is unlikely to be encountered.
Another attack that is mostly specific to hidden services, is the fact that all traffic to most hidden service servers is going to be from the Tor network. It is possible that if a servers general location can be narrowed down, perhaps by time skew, that with proper cooperation (or illegal activity) various hosting services and/or upstream ISPs with data retention, could find the specific location of the hidden service by viewing where traffic from known Tor exits is going. Another thing that could be done, is upstream ISPs could find the location of multiple hidden services (or highly suspected hidden services) with out necessarily knowing their content. It is important to only bind to localhost to help defend against this attack.




