DeepCorr: Strong Flow Correlation Attacks on Tor Using Deep Learning

Milad Nasr, Alireza Bahramali, Amir Houmansadr

TL;DR

DeepCorr is a sophisticated flow correlation attack that uses Convolutional Neural Networks (CNNs) to deanonymize Tor users with unprecedented accuracy. By learning the specific "noise" patterns of the Tor network, it can link entry and exit traffic using significantly less data than previous statistical methods—achieving 96% accuracy where state-of-the-art systems previously hit only 4%.

What Problem Does This Paper Address?

Tor (The Onion Router) protects user privacy by bouncing traffic through three layers of relays, making it difficult to link a user's IP address to their destination. However, Tor is a "low-latency" network, meaning it doesn't significantly delay or reorder packets to hide timing patterns.

An adversary who can see both the entry point (ingress) and the exit point (egress) of a Tor connection can perform a flow correlation attack. By comparing packet timings and sizes at both ends, they can statistically "match" the flows and deanonymize the user.

The challenge is that the Tor network is naturally "noisy." Congestion and relay processing create jitters that distort these patterns. Existing statistical attacks (like RAPTOR or Pearson correlation) struggle with this noise unless they observe very long-lived connections with massive amounts of data (e.g., 100MB over 5 minutes), which isn't realistic for typical web browsing.

Methods

The authors introduce DeepCorr, the first system to apply deep learning to this problem. Instead of using a generic mathematical formula to calculate correlation, DeepCorr uses a CNN to learn the complex, non-linear relationship between ingress and egress flows.

  • Feature Representation: The model takes a bidirectional flow and represents it as a 2D array of inter-packet delays (IPD) and packet sizes for both "upstream" and "downstream" directions.
  • Architecture: The system uses a CNN with two convolutional layers followed by three fully connected layers.
  • The "Aha" Moment: Convolutional layers are traditionally used for image recognition because they are "translation invariant"—they can find a pattern regardless of where it appears in the frame. In Tor, this is perfect for finding matching traffic patterns that have been shifted in time due to network lag.
  • Learning the Ecosystem: Unlike website fingerprinting (which learns what specific sites look like), DeepCorr learns the general features of Tor’s noise. This allows it to correlate flows on circuits and destinations it has never seen before.

Datasets

The researchers collected what they believe to be the largest dataset of correlated Tor flows to date:

  • Tor Traffic: They browsed the top 50,000 Alexa websites over Tor using 1,000 arbitrary circuits.
  • Training/Testing: They used 25,000 flows for training and another 25,000 for testing.
  • Pluggable Transports: A smaller dataset was collected using Tor "bridges" (like obfs4 and meek) to test if these obfuscation tools could stop the attack.
  • Non-Tor Data: They also used CAIDA anonymized internet traces to demonstrate the model's effectiveness in detecting "stepping stone" attacks (where hackers bounce through compromised servers).

Key Insights and Ideas

  • Noise is a Feature, Not a Bug: Previous methods treated Tor's network jitter as an obstacle. DeepCorr treats it as a pattern to be modeled. By training on actual Tor traffic, the CNN learns to "see through" the specific types of congestion common to the network.
  • Short-Window Correlation: DeepCorr's biggest breakthrough is its ability to work with very little data. It can correlate flows using only 300 to 900 packets. This makes the attack viable for standard web page loads, not just large file downloads.
  • Generalization: The model is "destination-agnostic." Once trained on the Tor ecosystem, it can link an entry flow to an exit flow even if the user is visiting a website the model has never encountered.

Key Results

  • Massive Accuracy Gains: In a head-to-head comparison using 900 packets, DeepCorr achieved 96% accuracy, while the previous state-of-the-art (RAPTOR) achieved only 4%.
  • Low False Positives: With only 300 packets, DeepCorr reached a True Positive Rate (TPR) of 0.8 while maintaining a False Positive Rate (FPR) of just $10^{-3}$.
  • Speed: DeepCorr is computationally efficient once trained. It can perform a correlation check in just 2ms, which is 10x faster than RAPTOR when aiming for similar accuracy levels.
  • Longevity: The model doesn't need constant retraining. The authors found that a model trained today remains highly effective for about three weeks before Tor's shifting network conditions require a "refresher" training session.

Limitations and Future Work

  • The Training Requirement: Unlike statistical methods that work "out of the box," DeepCorr requires a significant labeled dataset and a day of GPU training. This limits the attack to resourceful adversaries (like ISPs or nation-states).
  • Pluggable Transports: The authors found that Tor's obfs4 transport, when used with "IAT mode" (which actively obfuscates inter-arrival times), significantly reduces DeepCorr's accuracy. This suggests that more aggressive timing obfuscation is a viable defense.
  • Base Rate Fallacy: While the FPR is low, in a real-world scenario with millions of concurrent Tor users, even a $10^{-3}$ error rate could result in many false accusations. Scaling the attack to the entire Tor network remains a challenge.
  • Future Work: The authors suggest the Tor community should prioritize deploying traffic obfuscation across all relays, not just bridges, to counter the rising threat of deep learning-based analysis.

Summary updated

BibTeX
@inproceedings{nasr2018deepcorr,
  author = {Milad Nasr and Alireza Bahramali and Amir Houmansadr},
  title = {{DeepCorr: Strong Flow Correlation Attacks on Tor Using Deep Learning}},
  booktitle = {CCS},
  year = {2018},
  url = {https://openreview.net/forum?id=tHmnHkDkH-},
}

Loading related content...

Figure