Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24...
-
Upload
adela-atkinson -
Category
Documents
-
view
214 -
download
0
Transcript of Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24...
![Page 1: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/1.jpg)
Toward Understanding Congestion in Tor
DC-area Anonymity, Privacy, and Security Seminar
January 24th, 2014
Rob JansenU.S. Naval Research Laboratory
*Joint with John Geddes, Chris Wacek, Micah Sherr, Paul Syverson
![Page 2: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/2.jpg)
Tor for Awesomeness Anonymity
![Page 3: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/3.jpg)
Tor is Slow!!! Research*
● PCTCP: Per-Circuit TCP-over-IPsec Transport for Anonymous Communication Overlay Networks (CCS ‘13)
● Reducing Latency in Tor Circuits with Unordered Delivery (FOCI ‘13)
● How Low Can You Go: Balancing Performance with Anonymity in Tor (PETS ‘13)
● The Path Less Travelled: Overcoming Tor's Bottlenecks with Traffic Splitting (PETS ’13)
● An Empirical Evaluation of Relay Selection in Tor (NDSS ‘13)
● LIRA: Lightweight Incentivized Routing for Anonymity (NDSS ‘13)
● Improving Performance and Anonymity in the Tor Network (IPCCC ‘12)
● Enhancing Tor's Performance using Real-time Traffic Classification (CCS ’12)
● Torchestra: Reducing interactive traffic delays over Tor (WPES ‘12)
● Throttling Tor Bandwidth Parasites (USENIX Sec ‘12)
● LASTor: A Low-Latency AS-Aware Tor Client (Oakland ‘12)
● Congestion-aware Path Selection for Tor (FC ‘12)
*Not a comprehensive list
![Page 4: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/4.jpg)
Tor is Slow!!! Research*
● PCTCP: Per-Circuit TCP-over-IPsec Transport for Anonymous Communication Overlay Networks (CCS ‘13)
● Reducing Latency in Tor Circuits with Unordered Delivery (FOCI ‘13)
● How Low Can You Go: Balancing Performance with Anonymity in Tor (PETS ‘13)
● The Path Less Travelled: Overcoming Tor's Bottlenecks with Traffic Splitting (PETS ’13)
● An Empirical Evaluation of Relay Selection in Tor (NDSS ‘13)
● LIRA: Lightweight Incentivized Routing for Anonymity (NDSS ‘13)
● Improving Performance and Anonymity in the Tor Network (IPCCC ‘12)
● Enhancing Tor's Performance using Real-time Traffic Classification (CCS ’12)
● Torchestra: Reducing interactive traffic delays over Tor (WPES ‘12)
● Throttling Tor Bandwidth Parasites (USENIX Sec ‘12)
● LASTor: A Low-Latency AS-Aware Tor Client (Oakland ‘12)
● Congestion-aware Path Selection for Tor (FC ‘12)
*Not a comprehensive list
Where?
![Page 5: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/5.jpg)
Outline
● Where is Tor slow?
– Understand Tor relay architecture
– Measure and analyze relay congestion in realistic Tor networks
● Design focused solutions
![Page 6: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/6.jpg)
Outline
● Where is Tor slow?
– Understand Tor relay architecture
– Measure and analyze relay congestion in realistic Tor networks
● Design focused solutions
![Page 7: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/7.jpg)
The Tor Network
![Page 8: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/8.jpg)
Relay Overview
![Page 9: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/9.jpg)
Relay Overview
![Page 10: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/10.jpg)
Relay Overview
Onion routing connections
![Page 11: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/11.jpg)
Relay Overview
TCP
TCP
TCP
TCP
TCP
TCP Transport
![Page 12: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/12.jpg)
Relay Overview
TCP
TCP
TCP
TCP
TCP
TCP
TCP
Multiplexed Circuits and Streams
![Page 13: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/13.jpg)
Relay Overview
TCP
TCP
TCP
TCP
TCP
TCPTCP
![Page 14: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/14.jpg)
Relay InternalsKernel Input Kernel OutputTor Input Tor Output
Tor Circuits
Network Input
![Page 15: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/15.jpg)
Relay InternalsKernel Input Kernel OutputTor Input Tor Output
Tor Circuits
Split data into socket buffers
![Page 16: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/16.jpg)
Relay InternalsKernel Input Kernel OutputTor Input Tor Output
Tor Circuits
Read data from sockets into Tor
![Page 17: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/17.jpg)
Relay InternalsKernel Input Kernel OutputTor Input Tor Output
Tor Circuits
Process data (encrypt/decrypt)
![Page 18: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/18.jpg)
Relay InternalsKernel Input Kernel OutputTor Input Tor Output
Tor Circuits
Split cells into circuit queues
![Page 19: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/19.jpg)
Relay InternalsKernel Input Kernel OutputTor Input Tor Output
Tor Circuits
Circuits linked to outgoing connection
![Page 20: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/20.jpg)
Relay InternalsKernel Input Kernel OutputTor Input Tor Output
Tor Circuits
Schedule cells
![Page 21: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/21.jpg)
Relay InternalsKernel Input Kernel OutputTor Input Tor Output
Tor Circuits
Write data from Tor into sockets
![Page 22: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/22.jpg)
Relay InternalsKernel Input Kernel OutputTor Input Tor Output
Tor Circuits
Schedule data for sending
![Page 23: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/23.jpg)
Relay InternalsKernel Input Kernel OutputTor Input Tor Output
Tor Circuits
Opportunities for traffic management
![Page 24: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/24.jpg)
Outline
● Where is Tor slow?
– Understand Tor relay architecture
– Measure and analyze relay congestion in realistic Tor networks
● Design focused solutions
![Page 25: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/25.jpg)
Kernel Congestion: libkqtimeKernel Input Kernel OutputTor Input Tor Output
Tor Circuits
![Page 26: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/26.jpg)
Kernel Congestion: libkqtimeKernel Input Kernel OutputTor Input Tor Output
Tor Circuits
tag match
![Page 27: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/27.jpg)
Kernel Congestion: libkqtimeKernel Input Kernel OutputTor Input Tor Output
Tor Circuits
tag match tag match
![Page 28: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/28.jpg)
Kernel Congestion: libkqtimeKernel Input Kernel OutputTor Input Tor Output
Tor Circuits
tag match tag matchtrack cells
![Page 29: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/29.jpg)
Congestion Analysis
![Page 30: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/30.jpg)
Congestion Analysis
![Page 31: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/31.jpg)
Analyzing the DesignKernel Input Kernel OutputTor Input Tor Output
Tor Circuits
![Page 32: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/32.jpg)
Analyzing the DesignKernel Input Kernel OutputTor Input Tor Output
Tor Circuits
Queuing delays in kernel output buffer
![Page 33: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/33.jpg)
Analyzing the DesignKernel Input Kernel OutputTor Input Tor Output
Tor Circuits
Queuing delays in kernel output buffer
Circuit scheduling design flaws
![Page 34: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/34.jpg)
Outline
● Where is Tor slow?
– Understand Tor relay architecture
– Measure and analyze relay congestion in realistic Tor networks
● Design focused solutions
![Page 35: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/35.jpg)
Ineffective Priority
Kernel OutputTor OutputTor Circuits
Circuit schedulers are ineffective at prioritization
![Page 36: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/36.jpg)
Ineffective PriorityKernel OutputTor Output
Tor Circuits
Libevent schedules one connection at a time
![Page 37: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/37.jpg)
Ineffective PriorityKernel OutputTor Output
Tor Circuits
Libevent schedules one connection at a time
Tor only considers a subset of writable
circuits
![Page 38: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/38.jpg)
Ineffective PriorityKernel OutputTor Output
Tor Circuits
Libevent schedules one connection at a time
Tor only considers a subset of writable
circuits
Circuits from different connections are not prioritized correctly
![Page 39: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/39.jpg)
Scheduling Problems
Scenario A Scenario B
No Shared ConnectionShared Connection
![Page 40: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/40.jpg)
Scheduling Problems
Scenario A Scenario B
![Page 41: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/41.jpg)
Global Circuit SchedulingKernel OutputTor Output
Tor Circuits
Choose among ALL writable
circuits
![Page 42: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/42.jpg)
Kernel Buffer BloatKernel OutputTor Output
Tor Circuits
Queuing delays in kernel output buffer
![Page 43: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/43.jpg)
Kernel Buffer BloatKernel OutputTor Output
Tor Circuits
Queuing delays in kernel output buffer
● Too many large kernel queues
● More data in kernel than it can send
● Circuit scheduler timing issues
![Page 44: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/44.jpg)
Tor Output Auto-tuning
● Don’t write what the kernel can’t send
● Smartly write to kernel using– Socket queue lengths and sizes– TCP windows– Node bandwidth capacity
● Check again before kernel starvation
Increase effectiveness of circuit scheduler
![Page 46: Toward Understanding Congestion in Tor DC-area Anonymity, Privacy, and Security Seminar January 24 th, 2014 Rob Jansen U.S. Naval Research Laboratory *Joint.](https://reader030.fdocuments.net/reader030/viewer/2022032705/56649dac5503460f94a9c312/html5/thumbnails/46.jpg)
libkqtime