Information Security Stack Exchange is a question and answer site for information security professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does Tor have any protection against an adversary simply running a very large number of nodes?

Someone with the necessary resources could just run thousands of relay nodes (including exit nodes). If they were an organization like the NSA, they could also make the major hosting companies running nodes turn over the private keys, or install backdoors, without the "owner" of the node noticing.

I know tor employs entry guards as a protection - a client chooses a set of entry guards at random, and only ever connects to those as entry nodes. If the entry guards are uncompromised, the user is safe. This gives the user at least the chance of not being profiled; without entry guards the user would eventually be caught.

However, what if the adversary is not interested in busting all users that access a certain site, or targeting a specific user. if they just want to identify some random portion of users that access that site, couldn't they do this by running a few thousand nodes and waiting?

I can imagine they could even target specific users, and force them to use only compromised nodes. Compromise one guard node of the user (wiretap his line, observe what server he connects to and send them a court order or some thugs, or just be lucky and control the right nodes by chance). Then run thousands of modified clients. Once the targeted user goes online, flood the network momentarily. In cooperation with your compromised nodes, keep the compromised paths free, so that the client will eventually build a circuit only on your nodes. Voila, you can eavesdrop on the user.

Are there any protections against this in Tor? Can you give an estimation on how many nodes the attacker would have to run? Are there any non-technical countermeasures, e.g. would someone intervene if 3000 new suspicious nodes would pop up on AWS?

(Note this is different from other questions on this site. For example my previous question asks about the case where the attacker can completely control your line; he fakes the whole network. Tor guards against this by using a list of known good nodes, and using signatures.)

share|improve this question

Tor provides privacy only under the assumption that at least one node in the randomly selected chain is not attacker-controlled (since we are talking about traffic analysis, simply eavesdropping on traffic entering and exiting this node, without trying to decrypt it, counts as "control"). This is probabilistic. If the attacker controls, say, 50% of all nodes, and your browser uses a chain of length 5, then the attacker wins with probability 0.55 = 1/32.

To mitigate such attacks, you can configure your client to choose chains non-uniformly, but instead to enforce a "global spread" so that the chain will go through nodes in several countries who don't like each other.

share|improve this answer
Unless GeoIP can be somehow faked. – Deer Hunter Aug 30 '13 at 15:55
Which it easily can in your part of the internet backbone (that you, as a government control). – Lolums Dec 13 '15 at 8:53

It doesn't, running a large number of nodes is one of the main weaknesses of TOR. It's important to choose your nodes well and to try to avoid misbehaving ones as a path routed entirely through colluding nodes is not secure and each colluding node reduces the effective security some.

Delays on transmissions would help, but would increase latency and aren't currently supported by TOR.

share|improve this answer
Too many statements about TOR lately have been faith based. When one of the major creators starts off what should be a statement of fact with "I believe that...", I start to worry a bit about the underlying peer review. – Fiasco Labs Sep 1 '13 at 3:38
@FiascoLabs - that's always the case with Cryptography though. There are simply too many possible attack vectors. A mathematical proof of security isn't possible, so the security provided by any mechanism is always based on what we believe to be true. It seems like AES should be hard to break, but we can't know for sure that it is. In TOR however, we know of some critical weaknesses, though it's still one of the best options available for anonymity. – AJ Henderson Sep 1 '13 at 18:45
@FiascoLabs: All Public Key Cryptography is based on an unproven mathematical assumptions. Yet, people do various things with it quite successfully. – Lie Ryan Jun 29 at 6:02

Are there any non-technical countermeasures, e.g. would someone intervene if 3000 new suspicious nodes would pop up on AWS?

Yes. There are systems and people monitoring the network, and the directory authority operators will block floods of blatantly suspicious new relays. This happens regularly, with questionable academic research projects, unusually generous new relay operators, and more nefarious actors.

In fact, your hypothetical scenario happened almost literally in December 2014. Some people went and fired up 3300 relays on Google cloud servers for some reason or another. Nothing happened. The relays were blocked; they received almost no traffic; and it's hard to say what the operators were even trying to accomplish.

The RELAY_EARLY attack is probably the worst example. For the first half of 2014, an attacker, apparently American academic/government researchers at Carnegie Mellon University SEI CERT, combined a hundred fast relays and a security bug to deanonymize untold users, leading to multiple arrests in the US and potential risk from any other party recording traffic at the time.

share|improve this answer

In addition to running thousands of nodes, an attacker would have to run those thousands of nodes for a long time because part of the decision process about what nodes to use consdiders consensus weight, which includes uptime as a factor. Additionally, there are flags that can be added to nodes by the highest ranked (by consensus) relays that mark a relay as a bad-relay, which negatively impacts how much use it would get.

Most of Tor's protections against this kind of attack would be related to the restrictions on how old a relay must be to get a sizable portion of traffic.

share|improve this answer

The only way this could help an attacker is if they ran every relay node, and furthermore that they were sure of this fact. The strength of Tor is that a given node does not know if the node that it relays data back to is another relay node or the end user. I could not find information online whether Tor uses a specified number of jumps per connection, because if, for example, an attacker knew for a fact that Tor connects 5 relay nodes between a user and an endpoint, and the attacker saw 5 of their relay nodes in a chain, they would know the IP of the endpoint and user.

For this reason, I would guess that Tor does not use a constant number of jumps.

Having said all this, if the attacker ran an exit node and you used it to connect to a plain HTTP clearnet site they would be able to see all the data you sent across, although even then you can't see the IP of the user.

share|improve this answer
Tor uses 3 nodes between user and endpoint, Entry -> middle relay -> Exit – IceyEC Apr 23 '15 at 11:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.