Skip to content

Tor and Anonymity Networks

Tor, I2P, and similar overlay networks route encrypted traffic through chains of volunteer relays to conceal users' IP addresses from servers and observers. This topic explains how these networks function, why they attract both legitimate users and criminal actors, and the deanonymisation techniques available to law enforcement investigators.

Last updated:

Share

Tor (The Onion Router) is a free, open-source anonymity network that conceals a user's IP address by routing encrypted traffic through a chain of three volunteer-operated relay nodes before it reaches its destination. Each relay peels one layer of encryption and knows only the adjacent hop in the chain, so no single node can see both the sender and the destination. I2P (the Invisible Internet Project) uses a similar multi-hop design but is optimised for internal hidden services rather than general web access. Both networks have legitimate uses, including protecting journalists, dissidents, and whistleblowers, but they also host criminal marketplaces, ransomware command-and-control infrastructure, and child exploitation material. For cyber investigators, understanding how these networks function is a prerequisite to any meaningful investigation of dark web activity.

The term 'dark web' specifically refers to websites reachable only through Tor or similar overlay networks, using addresses like .onion that are not registered in the public DNS system. These sites are distinct from the broader 'deep web', which is simply content not indexed by search engines, such as banking portals or medical record systems. Dark web marketplaces have been used to sell narcotics, weapons, stolen credentials, and forged documents. Law enforcement agencies in multiple countries have dismantled major marketplaces, including Silk Road (US, 2013), AlphaBay and Hansa (Europol-led operation, 2017), and DarkMarket (Europol, 2021), using a combination of technical, financial, and human intelligence methods.

Tor was originally developed by the US Naval Research Laboratory in the mid-1990s and released as open-source software in 2002. The Tor Project, a US-registered non-profit, maintains the software today. The network relies on more than 7,000 volunteer relays worldwide. A key design constraint is that Tor protects against a passive observer watching any single point in the network, but it is vulnerable to an adversary who can observe large portions of internet traffic simultaneously. This vulnerability underpins the most serious deanonymisation attacks that investigators have used in real operations.

User(origin)Guard NodeMiddle RelayExit NodeDestination3 layers encrypted2 layers encrypted1 layer encryptedplaintext (or HTTPS)Sees: user IP.Does NOT seedestination.Sees: neitheruser IP nordestination.Sees:destination.Does NOT seeuser IP.What eachrelay knows:Guard / Exit node (partial knowledge)Middle relay (no endpoint knowledge)User / Destination (outside Tor)Guard node keeps user IP for 10 minutes per circuit; middle and exit nodes never learn it.
In a Tor circuit each relay peels one encryption layer: the guard node sees the user's IP but not the destination, the middle relay sees neither, and the exit node sees the destination but not the user's IP. The destination server only ever sees the exit node's address.

By the end of this topic you will be able to:

  • Explain how Tor's onion routing protocol conceals a user's IP address from the destination server and from network observers.
  • Distinguish Tor from I2P and describe the investigative scenarios where each network appears.
  • Identify the main deanonymisation techniques used by law enforcement, including traffic correlation attacks, operational security failures, and exploit-based approaches.
  • Describe how investigators trace cryptocurrency payments linked to dark web activity using blockchain analysis.
  • Outline the legal frameworks in India, the US, and the EU that govern the collection of evidence from anonymity networks and cryptocurrency exchanges.
Key terms
Onion routing
A technique in which a message is encrypted in multiple layers, one per relay node, so that each relay decrypts only its own layer, forwards the remainder, and learns only its immediate predecessor and successor in the chain. Tor uses this design to prevent any single node from knowing both the sender and the destination.
Onion service (hidden service)
A server reachable through Tor using a .onion address derived from its public key. The server's real IP address is never exposed to clients. Both the client and the server route their connection through Tor rendezvous points, so neither party reveals its location to the other.
Exit node
The third relay in a Tor circuit, which forwards decrypted traffic to the public internet destination. The destination server sees the exit node's IP address, not the user's. Exit node operators can read unencrypted traffic passing through them, which is why HTTPS is still required when using Tor.
Traffic correlation attack
A deanonymisation technique that compares timing patterns and traffic volume at the entry point of a Tor circuit and at the destination, allowing an observer with visibility at both ends to probabilistically identify the user. Also called an end-to-end timing attack. It does not require breaking Tor's encryption.
I2P (Invisible Internet Project)
A peer-to-peer anonymity network that routes traffic through a distributed mesh of volunteer nodes using unidirectional tunnels. Unlike Tor, I2P is primarily designed for communication within the network (eepsites) rather than access to the public web, and it uses a garlic routing variant that bundles multiple messages together.
Blockchain analysis
The forensic examination of a cryptocurrency's public transaction ledger to trace the flow of funds between addresses, cluster addresses controlled by the same entity, and identify cash-out points at regulated exchanges. Used extensively in dark web investigations to link on-chain activity to real-world identities.

How Tor works: onion routing and circuit construction

When a user opens the Tor Browser, the client software fetches a list of available relays from Tor directory servers and builds a three-hop circuit: a guard node (also called an entry node), a middle relay, and an exit node. The client encrypts the outbound data three times, once with the exit node's key, then with the middle relay's key, then with the guard node's key. Each relay strips one layer of encryption, forwards the result to the next hop, and cannot read the remaining layers.

The guard node knows the user's real IP address but not the destination. The exit node knows the destination but not the user's IP address. The middle relay knows neither. This design means that compromising any single relay reveals only a partial picture. The destination server sees the exit node's IP address in the connection log, not the user's.

Onion services (hidden services) extend the model further. The server generates a public/private key pair, and its .onion address is a hash of the public key. To connect, the client and server each build partial Tor circuits toward a shared rendezvous point. The server's real IP address is never in the circuit. This two-sided routing means .onion sites are harder to locate than regular Tor exits because there is no exit node whose address can be traced back.

FeatureTorI2P
Primary useAnonymous access to public internet and .onion sitesInternal network services (eepsites) and peer-to-peer applications
Routing modelThree-hop onion routing, centralised directoryDistributed garlic routing, no central directory
Exit to public webYes, via exit nodesLimited; most traffic stays inside I2P
Address system.onion (public-key hash).i2p (internal DNS-like naming)
Investigative prevalenceVery common; most dark web cases involve TorLess common; seen in some peer-to-peer crime and forums

The dark web: structure, content, and criminal use

The dark web is not a separate network but a layer on top of Tor: websites that configure themselves as onion services and publish their .onion addresses. These sites are reachable only by Tor users who know the address. The content ranges from legitimate privacy services (SecureDrop for whistleblowers, BBC Tor mirror, Facebook's .onion site) to criminal marketplaces. The criminal segment is dominated by narcotics sales, followed by fraud and stolen financial data, counterfeit documents, and malware.

Major dark web marketplaces operate on a model borrowed from legitimate e-commerce platforms: seller ratings, buyer feedback, escrow payments in cryptocurrency, dispute resolution, and vendor trust tiers. Silk Road, operational from 2011 to 2013, was the first large marketplace of this kind. Its seizure by the FBI established the template for dark web investigations: combine financial tracing, undercover purchasing, and operational security (OPSEC) failures to identify administrators and vendors. The same pattern recurred in the takedowns of AlphaBay (2017), Dream Market (2019), and Wall Street Market (2019).

Ransomware groups use Tor-hosted sites for two purposes: command-and-control communication with infected machines, and leak sites where they publish stolen data to pressure victims into paying. Because these sites are onion services, taking them offline requires either locating the server's real IP address (through deanonymisation) or obtaining cooperation from the hosting infrastructure. In 2021, US law enforcement recovered $2.3 million of the Colonial Pipeline ransom by tracing Bitcoin payments; the recovery did not require breaking Tor but instead used blockchain tracing to find a wallet whose private key the investigators obtained.

Deanonymisation techniques

Tor's security model protects against a local observer (an ISP, a network administrator) and against a compromised relay. It does not protect against a global passive adversary who can observe traffic patterns across the network simultaneously. Law enforcement and intelligence agencies have exploited this in real operations, though the exact methods used in specific cases are often classified or under appeal.

Traffic correlation attacks work by observing the timing and volume of packets entering the Tor network at the guard node and leaving toward the destination at the exit node. If the same pattern appears at both ends within a short window, the user and the destination can be linked statistically without breaking any encryption. The attack requires visibility at both ends simultaneously. Researchers have shown that even a modest fraction of Tor relays, controlled by a single entity, can achieve this visibility over time because Tor clients periodically rebuild their circuits.

Operational security failures account for a large proportion of successful identifications. The Silk Road administrator Ross Ulbricht was identified not through traffic analysis but because he posted on a public forum using a username linked to his personal email address, years before the marketplace launched. Dark web vendors have been identified by writing style analysis, by shipping packages with real return addresses, by reusing usernames across platforms, and by logging into accounts without Tor. Investigators treat OPSEC failures as the most productive investigative avenue.

Server location techniques include monitoring for DNS leaks (applications that bypass Tor for DNS queries), exploiting misconfigured server software that includes real IP addresses in headers or error messages, and using side-channel timing attacks against .onion services. Academic research has demonstrated that a sufficiently resourced adversary can measure response-time variations to locate a hidden service's hosting region within hours. In practice, investigators often find the server by obtaining cooperation from a marketplace insider or by tracking cryptocurrency payments to an identifiable cash-out point.

Cryptocurrency tracing on the dark web

Most dark web marketplaces have required payment in Bitcoin or privacy-focused alternatives such as Monero. Bitcoin's pseudonymity, not true anonymity, is the critical investigative feature: every transaction is recorded permanently on a public ledger, and the entire history of every coin can be traced. Address clusters, groups of addresses controlled by the same entity identified through common-input-ownership heuristics, allow investigators to build a picture of a marketplace's financial flows even without knowing who controls each address.

The investigative chain typically runs from marketplace to exchange. A vendor receives Bitcoin on a marketplace address, consolidates the funds, sends them through one or more hops, and eventually cashes out at a cryptocurrency exchange. Regulated exchanges in most jurisdictions are required to collect identity documents for accounts above certain transaction thresholds (know-your-customer rules). A legal process demand to the exchange returns the account holder's identity. Commercial blockchain analytics platforms including Chainalysis and Elliptic automate the clustering and tracing steps; investigators then direct legal process at the identified exchange accounts.

Mixing services (also called tumblers) attempt to break the tracing chain by pooling funds from multiple users and redistributing them in a way that obscures the origin. Investigators have successfully traced through mixers by identifying the structural patterns mixers leave, by subpoenaing mixer operators for logs (when the mixer is in a reachable jurisdiction), and by tracing the pre-mixing and post-mixing flows separately and identifying the same cash-out entity. Monero presents a harder tracing challenge because its protocol uses ring signatures and stealth addresses to obscure transaction graphs by design.

Investigative approach and evidence collection

A practical dark web investigation typically combines multiple evidence streams: open-source intelligence (OSINT) on marketplace activity and vendor profiles, undercover purchasing operations, financial tracing of cryptocurrency payments, and technical collection targeting the hosting infrastructure. These streams must be coordinated carefully because an error in one (for example, a premature arrest that tips off co-conspirators) can compromise the others.

Evidence from dark web platforms must be preserved in a forensically sound manner before the platform is seized or goes offline. Screenshots are insufficient for court purposes. Investigators use specialised tools to capture full HTTP response headers, page source, file metadata, and server response timing. Where possible, a hash of the captured page is computed and stored contemporaneously so that the integrity of the evidence can be verified later. Chain of custody documentation for digital evidence follows the same principles as physical evidence, with the added requirement of documenting the technical capture method and the software tools used.

When a hidden service server is physically seized, the forensic analysis follows standard digital forensics procedure: bit-for-bit imaging before any examination, write-blocking, hash verification, and documented examination. The server's configuration files may reveal the Tor private key for the .onion address (confirming control of that site), database files containing user accounts and transaction records, and server logs that, if logging was not disabled, record circuit activity. In several major takedowns, including Hansa Market in 2017, law enforcement seized servers covertly and continued operating the marketplace for weeks to collect evidence on vendors and buyers before making arrests.

Check your understanding
Question 1 of 4· 0 answered

In a standard Tor circuit, which relay node knows the user's real IP address?

Key Takeaways

  • Tor conceals a user's IP address by routing encrypted traffic through three relay nodes; no single relay knows both the sender and the destination, but a global adversary observing traffic at both ends can use timing correlation to deanonymise users.
  • Dark web onion services conceal the server's IP address as well as the user's, requiring investigators to locate the physical server through deanonymisation, OPSEC failures, or seized infrastructure rather than simple IP lookup.
  • Operational security failures, including username reuse, unencrypted communications, and real return addresses on physical shipments, account for the majority of successful dark web identifications; direct attacks on Tor's encryption are rare and difficult.
  • Bitcoin's pseudonymity means all transactions are traceable on the public blockchain; blockchain analytics tools cluster related addresses and trace fund flows to regulated exchanges where identity records can be obtained through legal process.
  • Cross-border dark web investigations require legal process under MLATs or the Budapest Convention framework; in India, the IT Act 2000, BNSS 2023, and PMLA (as amended) govern interception, seizure, and cryptocurrency-related evidence; US investigators use ECPA, the Stored Communications Act, and Rule 41 warrants.
How does Tor conceal a user's IP address?
Tor routes traffic through three volunteer-operated relay nodes: a guard (entry) node, a middle relay, and an exit node. Each relay decrypts one layer of encryption to learn only the previous and next hop in the chain. The destination server sees only the exit node's IP address, not the originating user's address. No single relay knows both the sender and the destination.
What is the dark web?
The dark web refers to websites hosted as onion services (also called hidden services) that are accessible only through Tor. These sites use .onion addresses, which are cryptographic identifiers rather than DNS names. The content ranges from privacy-focused services and journalism to illegal marketplaces. The dark web is a small subset of the deep web, which simply means content not indexed by public search engines.
What is a traffic correlation attack?
A traffic correlation attack, sometimes called an end-to-end timing attack, involves observing network traffic at both the entry point into an anonymity network and the exit point toward the destination. By comparing timing patterns and packet volumes at both ends, an attacker with sufficient network visibility can probabilistically link a Tor user to the destination they are visiting, even without breaking the encryption.
How do investigators trace cryptocurrency payments on the dark web?
Investigators use blockchain analysis tools to trace cryptocurrency transactions. Bitcoin transactions are pseudonymous, not anonymous: all transfers are recorded on a public ledger. Blockchain analysis techniques include clustering addresses controlled by the same entity, tracing coin flows across multiple hops, and identifying cash-out points at regulated exchanges that have know-your-customer records. Mixing services attempt to obscure these trails but leave their own traceable patterns.
What legal powers allow law enforcement to access Tor-related data in India, the US, and the EU?
In India, the Information Technology Act 2000 (as amended) and the Bharatiya Nagarik Suraksha Sanhita 2023 authorise interception orders and preservation requests to service providers. In the US, the Electronic Communications Privacy Act and court-issued warrants allow data demands from hosting providers and exchanges. EU investigators use the European Investigation Order framework for cross-border data sharing, and the proposed e-Evidence Regulation aims to streamline direct requests to service providers in other member states.

Test yourself on Cyber Forensics with free, timed mocks.

Practice Cyber Forensics questions

Found this useful? Pass it along.

Share

Spotted an error in this page? Report a correction or read our editorial standards.

Your journey to becoming a forensic professional starts here.

Practice with mock tests, learn from structured notes, and get your questions answered by a global forensic community, all in one place.