How Tor Prevents Sybil Attacks

A Sybil attack occurs when an adversary creates a large number of pseudonymous identities to gain disproportionate control over a decentralized network. In the Tor network, a massive Sybil attack could allow an attacker to control both the entry (Guard) and exit relays of a circuit, effectively deanonymizing user traffic. To defend against this threat, Tor relies on a trusted group of Directory Authorities (DirAuths) that manage relay admission, validate relay capabilities, and reach a cryptographic consensus every hour to neutralize attempts at mass infiltration.

1. Consensus Voting and Relay Flags

The Tor network is governed by a small, geographically distributed set of Directory Authorities operated by independent, trusted individuals. Every hour, these authorities independently evaluate the state of the network and produce a signed document known as the consensus.

For a newly created relay to participate in the network, authorities must vote to assign it specific status flags, primarily Valid and Running. Without these flags, clients will not select the relay for circuits. Because individual authorities independently probe and verify relays, an attacker cannot simply register thousands of fake nodes simultaneously and have them instantly routed into user circuits.

2. Earning Guard and Exit Status

The most dangerous Sybil attacks require controlling both the entry and exit points of a Tor circuit. Directory authorities enforce strict performance and stability requirements before granting relays the critical Guard and Exit flags:

3. IP Subnet and Family Grouping

To prevent an entity from launching thousands of relays from a single cloud provider or IP block, Tor enforces network diversity rules:

4. Active Bandwidth Measurement

In early versions of Tor, relays self-reported their available bandwidth, creating a vulnerability where an attacker could advertise massive capacity to attract traffic without spending real resources. Today, directory authorities utilize dedicated bandwidth measurement scanners (such as sbws).

These scanners continuously measure the actual throughput of relays from the outside. Authorities assign relay weights based on measured capacity rather than self-reported claims, forcing attackers to invest genuine, sustained bandwidth to attract significant amounts of network traffic.

5. Automated Heuristics and Manual Vetting

Tor Directory Authority operators and the Tor Network Health Team actively monitor the network for anomalies. They utilize heuristic analysis tools to detect suspicious registration patterns, including:

When coordinated Sybil clusters are detected, directory authority operators can quickly reject or blacklist the offending relays by adding them to bad-relay lists (BadExit or outright exclusion from the consensus), neutralizing the attack before it can compromise user privacy.