A potential technique to deanonymise users of the TOR network

Open PDF
Creating agency: GCHQ Government Communications Headquarters (UK)
Document date: -
Pages: 23
Genre: slides
Banner:
Classification: UK TOP SECRET STRAP 1 COMINT
Dissemination: -

A TOP SECRET GCHQ research presentation describing a traffic correlation attack against Tor — using cumulative packet counts observed simultaneously at a controlled exit node and at SIGINT collection points near a target's guard node to deanonymise Tor users without breaking the encryption — with GTE and JTRIG having adapted owned exit nodes to collect the required data for live deployment.

Long Description:
This is a UK TOP SECRET STRAP1 COMINT GCHQ research presentation, produced by OPC-MCR. The document describes a traffic correlation attack against the Tor anonymity network that exploits the statistical relationship between packet timing at the exit node and packet timing between the client and guard node, without attacking the encryption itself. The attack operates on a simple insight: while Tor re-encrypts traffic and routes it through multiple hops, the cumulative packet counts at the exit node and at the client-to-guard-node link are statistically correlated. By controlling a Tor exit node — allowing observation of all traffic associated with a particular circuit — and simultaneously collecting packet timing data from SIGINT collection on internet bearers near the client's guard node, GCHQ can correlate the two streams to identify the client's IP address. The technique bins time into one-second intervals, computes cumulative packet counts at both observation points, measures the correlation between them using an r² statistic with a threshold of 0.998 for server-to-client direction, fits a linear model to filter out sessions with packet count ratios outside the range 0.5 to 2, and slides the traces against each other to account for unknown timing offsets from relay delays and unsynchronised clocks. Circuit tracing through each Tor hop was considered and rejected: GCHQ tested spotting all links in GCHQ-created circuits and found only 13 out of 8294 potential inter-router links were visible — far too low for a practical attack. The direct correlation approach between exit node and guard-to-client traffic was therefore adopted instead. An ICTR-NE researcher is credited with observing that Tor's rate-limiting store-and-forward procedure can flatten timing patterns, which the cumulative packet count approach addresses by preserving the overall packet volume relationship even when individual timing is disrupted. False positive testing used 2027 bearer hours of logs from four 10G internet bearers, filtered to traffic involving Tor nodes, with time slides of up to two hours permitted. The server-to-client direction showed low false positive rates — 540 false hits identified across the entire dataset, with 92% of those against a single large download session with little correlation structure. The client-to-server direction showed more false positives due to lower data volume in web browsing scenarios. The operational status section is significant: GTE and JTRIG had already adapted some Tor exit nodes owned by GCHQ to collect the required exit node data, and the presentation notes a desire to engage with others holding exit nodes. SIGINT collection of guard-to-client packet times was being set up for live deployment. The document notes that the attack would "basically work" but some additional filtering may be needed to restrict queries to sessions with sufficient correlation structure, pending availability of bulk data. The document was presented as first-place work, with a full paper and R package available internally. The R package includes the algorithm and collected web-browsing test data, described as runnable examples with documentation and unit tests. Taken together this document shows GCHQ had developed a practically deployable Tor deanonymisation technique based entirely on external traffic analysis — requiring no cryptographic attack, no compromise of the Tor software, and no visibility into the encrypted content — relying instead on SIGINT collection infrastructure already in place on internet bearers combined with operational control of Tor exit nodes through GTE and JTRIG.
Programs:
JTRIG, GTE

People mentioned:
-

Countries:
-

Tags:
Tor, OPC-MCR, GTE, JTRIG, de-anonymization, traffic correlation, exit node, traffic analysis, timing analysis, externals-based attack, bearers, 10G, internet bearers, statistical analysis, anonymity, passive attack

Identifier:
spiegel_-_media-35538

PDF SHA-256:
990706c8cb0ae6f0d4cbbda031f3ad5a5426ba91e2e34a9972b1af8ae571c08d

UK TOP SECRET STRAP1 COMINT

A potential technique to deanonymise users of the TOR network

[REDACTED]
[REDACTED]

OPC-MCR, GCHQ

This information is exempt from disclosure under the Freedom of Information Act 2000 and may be subject to exemption under other UK information legislation. Refer disclosure requests to GCHQ on [REDACTED]
© Crown Copyright. All rights reserved.


UK TOP SECRET STRAP1 COMINT

Outline

  • TOR and the need for deanonymisation
  • Data transformation
  • Scoring
  • Results
  • Current status
  • Software

This information is exempt from disclosure under the Freedom of Information Act 2000 and may be subject to exemption under other UK information legislation. Refer disclosure requests to GCHQ on [REDACTED]
© Crown Copyright. All rights reserved.


UK TOP SECRET STRAP1 COMINT

What is TOR?

  • "The Onion Router"
  • Hides source of traffic by passing encrypted versions of your internet traffic between multiple TOR routers
  • Notation:
    • "Client" – the initiator of communication
    • "Guard node" – the TOR router the client contacts
    • "Exit node” – the TOR router that relays your traffic to the final destination (with no extra encryption so this link can be exploited by SIGINT system)

This information is exempt from disclosure under the Freedom of Information Act 2000 and may be subject to exemption under other UK information legislation. Refer disclosure requests to GCHQ or [REDACTED]
© Crown Copyright. All rights reserved.


UK SECRET STRAP1 COMINT

What is TOR?

Client
Guard Node
Onion Router A
Onion Router
Onion Router B
Onion Router
Onion Router C
Exit Node
Server

This information is exempt from disclosure under the Freedom of Information Act 2000 and may be subject to exemption under other UK information legislation. Refer disclosure requests to GCHQ or [REDACTED]
© Crown Copyright. All rights reserved.


UK TOP SECRET STRAP1 COMINT

Who uses TOR?

  • TOR was created by the US government and is now maintained by the Electronic Frontier Foundation (EFF)
  • EFF will tell you there are many pseudo-legitimate uses for TOR
  • We're interested as bad people use TOR, in particular:
    • Terrorists
    • Paedophiles

This information is exempt from disclosure under the Freedom of Information Act 2000 and may be subject to exemption under other UK information legislation. Refer disclosure requests to GCHQ or [REDACTED]
© Crown Copyright. All rights reserved.


UK TOP SECRET STRAP1 COMINT

Aim

  • Find client IP address associated with TOR exit node traffic
  • Attack based on externals – specifically packet timings
    • Strong crypt is being used

This information is exempt from disclosure under the Freedom of Information Act 2000 and may be subject to exemption under other UK information legislation. Refer disclosure requests to GCHQ on [REDACTED]
© Crown Copyright. All rights reserved.


UK TOP SECRET STRAP1 COMINT

Aim

  • We'll make our task easier by assuming we own the exit node being used
    • Allows us to see all the traffic associated with a TOR circuit
    • Demultiplex traffic by (unknown) user

This information is exempt from disclosure under the Freedom of Information Act 2000 and may be subject to exemption under other UK information legislation. Refer disclosure requests to GCHQ on [REDACTED]
© Crown Copyright. All rights reserved.


UK TOP SECRET STRAP1 COMINT

Side note: Circuit tracing

  • One suggestion was to track packets through each hop in the TOR network
  • We experimented with spotting all links in circuits created by GCHQ
  • Visibility was too low to be a sensible approach
    • 13 out of 8294 potential inter-TOR-router links were seen
  • We will directly correlate:
    • exit node traffic, and
    • traffic between client and guard node

This information is exempt from disclosure under the Freedom of Information Act 2000 and may be subject to exemption under other UK information legislation. Refer disclosure requests to GCHQ on [REDACTED]
© Crown Copyright. All rights reserved.


UK SECRET STRAP1 COMINT

Client

Collect through SIGINT

Onion Router A
Guard Node

Onion Router B

Onion Router C
Exit Node
Own this node

Server

This information is exempt from disclosure under the Freedom of Information Act 2000 and may be subject to exemption under other UK information legislation. Refer disclosure requests to GCHQ on [REDACTED]
© Crown Copyright. All rights reserved.


UK TOP SECRET STRAP1 COMINT

Test data collection

  • Used the standard "TOR button" web-browser package to access TOR
  • Made minor changes to ensure we could collect exit node traffic
    1. "News": Search for news, visit news websites
    2. "TOR": Browse the TOR website and then use a privacy checking website
      • Split into 2a and 2b as TOR changed circuit mid-way through
    3. "Download": visit to SlashDot followed by downloading a large PDF file.
    4. "Forum”: Search on Google followed by browsing a PC technical help forum.

This information is exempt from disclosure under the Freedom of Information Act 2000 and may be subject to exemption under other UK information legislation. Refer disclosure requests to GCHQ on [REDACTED]
© Crown Copyright. All rights reserved.

UK TOP SECRET STRAP1 COMINT


UK TOP SECRET STRAP1 COMINT

Flattening of timing patterns

  • [REDACTED] (ICTR-NE) observed that TOR can flatten out timing patterns
  • TOR uses a rate-limiting store-and-forward procedure at each TOR router
  • Graph shows bytes of exit node traffic in green and client traffic in red whilst downloading a 1MB file (figure from [REDACTED])
50000
25000
0
0s
50s
100s
150s
200s

This information is exempt from disclosure under the Freedom of Information Act 2000 and may be subject to exemption under other UK information legislation. Refer disclosure requests to GCHQ on [REDACTED]
© Crown Copyright. All rights reserved.


UK TOP SECRET STRAP1 COMINT

Cumulative packet counts

  • Our new insight is to use cumulative packet counts
  • Hope packets are approximately preserved
    • Approximate as TOR repacketises data
  • See strong correlation
Exit
Guard

Cumulative packet count

CtoS  1
15:46 15:48 15:50 15:52 15:54 15:56
StoC  1
15:46 15:48 15:50 15:52 15:54 15:56
CtoS  2a
16:02 16:04 16:06
StoC  2a
16:02 16:04 16:06
CtoS 2b
16:02 16:04 16:06 16:08
StoC 2b
16:02 16:04 16:06 16:08
CtoS 3
16:12 16:14 16:16 16:18
StoC 3
16:12 16:14 16:16 16:18
CtoS 4
16:22 16:24 16:26 16:28
StoC 4
16:22 16:24 16:26 16:28
Time (hh:mm)

This information is exempt from disclosure under the Freedom of Information Act 2000 and may be subject to exemption under other UK information legislation. Refer disclosure requests to GCHQ or [REDACTED]
© Crown Copyright. All rights reserved.


UK TOP SECRET STRAP1 COMINT

Scoring: basic idea

  • An idea of [REDACTED]
    • Bin time into intervals
    • For each interval get a pair (Ei, Gi)
      • Cumulative exit node packets upto time i
      • Cumulative guard node packets upto time i
    • Measure the correlation between these pairs
  • We use 1s time-windows
    • Easy for the SIGINT system
    • Seems to work

This information is exempt from disclosure under the Freedom of Information Act 2000 and may be subject to exemption under other UK information legislation. Refer disclosure requests to GCHQ on [REDACTED]
© Crown Copyright. All rights reserved.


UK TOP SECRET STRAP1 COMINT

Scoring: refinements

  • We also expect counts to be similar
    • Fit a linear model
      • G = α+ βEᵢ
    • Only accept sessions where ½ < β < 2

This information is exempt from disclosure under the Freedom of Information Act 2000 and may be subject to exemption under other UK information legislation. Refer disclosure requests to GCHQ on [REDACTED]
© Crown Copyright. All rights reserved.


UK TOP SECRET STRAP1 COMINT

Scoring: refinements

  • There may be an unknown time-offset
    • Traffic takes time to relay through the TOR network
    • SIGINT clocks may not be synchronised
    • We slide the traces against each other and find the best match
    • Truncate to exit node trace (we know that it is a complete TOR circuit)

This information is exempt from disclosure under the Freedom of Information Act 2000 and may be subject to exemption under other UK information legislation. Refer disclosure requests to GCHQ on [REDACTED]
© Crown Copyright. All rights reserved.


UK TOP SECRET STRAP1 COMINT

Self-comparison

  • We show how the score behaviour as a function of time slide
  • See high correlation (pink) at small time offset
  • Also generally see β (blue) in a sensible range
beta
r^2

-500  0  500
CtoS 1
2.0 1.5 1.0 0.5 0.0
StoC 1
CtoS 2a
StoC 2a
2.0 1.5 1.0 0.5 0.0
CtoS 2b
StoC 2b
2.0 1.5 1.0 0.5 0.0
CtoS 3
StoC 3
2.0 1.5 1.0 0.5 0.0
CtoS 4
StoC 4
2.0 1.5  1.0 0.5 0.0

-500
0
500
Time offset / s

This information is exempt from disclosure under the Freedom of Information Act 2000 and may be subject to exemption under other UK information legislation. Refer disclosure requests to GCHQ on [REDACTED]
© Crown Copyright. All rights reserved.

UK TOP SECRET STRAP1 COMINT


UK TOP SECRET STRAP1 COMINT

False positives

  • Want an algorithm with very low false positive rate
  • Used 2 hours of (timestamp, source IP, destination IP) tuples captured from 4 10G internet bearers
  • Filtered to tuples between a guard node and a non-TOR node
  • Allow time to arbitrarily slide +/- 2 hours
    • In real redeployment one would restrict this slide
  • Allow us to plot ROC curves for the technique

This information is exempt from disclosure under the Freedom of Information Act 2000 and may be subject to exemption under other UK information legislation. Refer disclosure requests to GCHQ on [REDACTED]
© Crown Copyright. All rights reserved.


UK TOP SECRET STRAP1 COMINT

False positives

  • Linear – log ROC curve plot
  • Server-to-client good
    • We miss the very short "2a" session with no false-positives
    • Threshold r²=0.998
      • High as comparing increasing functions
  • Client-to-server direction – many false positives
    • There's less structure in data as less data flows in this direction when web-browsing
Server to client
1.0 0.8 0.6 0.4 0.2 0.0
True positive rate
1e-06 1e-04 1e-02 1e+00
False positive rate

Client to server
1.0 0.8 0.6 0.4 0.2 0.0
True positive rate
1e-06 1e-04 1e-02 1e+00
False positive rate

This information is exempt from disclosure under the Freedom of Information Act 2000 and may be subject to exemption under other UK information legislation. Refer disclosure requests to GCHQ on [REDACTED]
© Crown Copyright. All rights reserved.


UK TOP SECRET STRAP1 COMINT

A larger experiment

  • We want to find some false hits to understand worst case accuracy for the server-to-client direction
  • Let's open the aperture very wide
    • 2027 bearer hours of logs with any time slide
    • Filter to all traffic involving a TOR node
      • Not just likely guard-to-client traffic as before
  • We find some false hits (540) but rate is assessed to be low enough.
  • 92% of false hits are against the big download session which has little structure

This information is exempt from disclosure under the Freedom of Information Act 2000 and may be subject to exemption under other UK information legislation. Refer disclosure requests to GCHQ on [REDACTED]
© Crown Copyright. All rights reserved.


UK TOP SECRET STRAP1 COMINT

The next step

  • We are collecting the required logs of packet times with TOR guard nodes in SIGINT
  • GTE / JTRIG have adapted some TOR exit nodes we own to collect the required exit node data
    • We are keen to engage with others with exit nodes too
  • Then run the attack
    • Expect to basically work
    • Some extra work might be required to only allow queries on sessions with enough structure
      • Need the bulk data first to progress this question

This information is exempt from disclosure under the Freedom of Information Act 2000 and may be subject to exemption under other UK information legislation. Refer disclosure requests to GCHQ on [REDACTED]
© Crown Copyright. All rights reserved.


UK TOP SECRET STRAP1 COMINT

R package

  • An R package can be downloaded from [REDACTED]
  • Includes algorithm and the collected web-browsing data
  • Recommend R packages for sharing analytics, can contain:
    • R / C / Fortran code
    • Example data
    • Runnable examples and documentation
    • Unit tests

This information is exempt from disclosure under the Freedom of Information Act 2000 and may be subject to exemption under other UK information legislation. Refer disclosure requests to GCHQ on [REDACTED]
© Crown Copyright. All rights reserved.


UK TOP SECRET STRAP1 COMINT

Conclusion

  • Have shown a potential externals-based deanonymisation attack for TOR
    • Requires SIGINT collection of guard-to-client packet times
    • Requires TOR collection from exit nodes we own
  • Hope to get this running live at GCHQ soon
  • Full paper and software available from [REDACTED]

This information is exempt from disclosure under the Freedom of Information Act 2000 and may be subject to exemption under other UK information legislation. Refer disclosure requests to GCHQ on [REDACTED]
© Crown Copyright. All rights reserved.


UK TOP SECRET STRAP1 COMINT

Questions?

1st

  • Work by [REDACTED]
  • [REDACTED]

This information is exempt from disclosure under the Freedom of Information Act 2000 and may be subject to exemption under other UK information legislation. Refer disclosure requests to GCHQ on [REDACTED]
© Crown Copyright. All rights reserved.