toward understanding congestion in tor

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 with John Geddes, Chris Wacek, Micah Sherr, Paul Syverson

Upload: efrat

Post on 23-Feb-2016

37 views

Category:

Documents


0 download

DESCRIPTION

Toward Understanding Congestion in Tor. DC-area Anonymity, Privacy, and Security Seminar January 24 th , 2014. Rob Jansen U.S. Naval Research Laboratory. *Joint with John Geddes, Chris Wacek , Micah Sherr , Paul Syverson. Tor for Awesomeness Anonymity. Tor is Slow!!! Research*. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Toward Understanding Congestion in Tor

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

Tor for Awesomeness Anonymity

Page 3: Toward Understanding Congestion in Tor

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

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

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

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

The Tor Network

Page 8: Toward Understanding Congestion in Tor

Relay Overview

Page 9: Toward Understanding Congestion in Tor

Relay Overview

Page 10: Toward Understanding Congestion in Tor

Relay Overview

Onion routing connections

Page 11: Toward Understanding Congestion in Tor

Relay Overview

TCP

TCP

TCP

TCP

TCP

TCP Transport

Page 12: Toward Understanding Congestion in Tor

Relay Overview

TCP

TCP

TCP

TCP

TCP

TCP

TCP

Multiplexed Circuits and Streams

Page 13: Toward Understanding Congestion in Tor

Relay Overview

TCP

TCP

TCP

TCP

TCP

TCPTCP

Page 14: Toward Understanding Congestion in Tor

Relay InternalsKernel Input Kernel OutputTor Input Tor Output

Tor Circuits

Network Input

Page 15: Toward Understanding Congestion in Tor

Relay InternalsKernel Input Kernel OutputTor Input Tor Output

Tor Circuits

Split data into socket buffers

Page 16: Toward Understanding Congestion in Tor

Relay InternalsKernel Input Kernel OutputTor Input Tor Output

Tor Circuits

Read data from sockets into Tor

Page 17: Toward Understanding Congestion in Tor

Relay InternalsKernel Input Kernel OutputTor Input Tor Output

Tor Circuits

Process data (encrypt/decrypt)

Page 18: Toward Understanding Congestion in Tor

Relay InternalsKernel Input Kernel OutputTor Input Tor Output

Tor Circuits

Split cells into circuit queues

Page 19: Toward Understanding Congestion in Tor

Relay InternalsKernel Input Kernel OutputTor Input Tor Output

Tor Circuits

Circuits linked to outgoing connection

Page 20: Toward Understanding Congestion in Tor

Relay InternalsKernel Input Kernel OutputTor Input Tor Output

Tor Circuits

Schedule cells

Page 21: Toward Understanding Congestion in Tor

Relay InternalsKernel Input Kernel OutputTor Input Tor Output

Tor Circuits

Write data from Tor into sockets

Page 22: Toward Understanding Congestion in Tor

Relay InternalsKernel Input Kernel OutputTor Input Tor Output

Tor Circuits

Schedule data for sending

Page 23: Toward Understanding Congestion in Tor

Relay InternalsKernel Input Kernel OutputTor Input Tor Output

Tor Circuits

Opportunities for traffic management

Page 24: Toward Understanding Congestion in Tor

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

Kernel Congestion: libkqtimeKernel Input Kernel OutputTor Input Tor Output

Tor Circuits

Page 26: Toward Understanding Congestion in Tor

Kernel Congestion: libkqtimeKernel Input Kernel OutputTor Input Tor Output

Tor Circuits

tag match

Page 27: Toward Understanding Congestion in Tor

Kernel Congestion: libkqtimeKernel Input Kernel OutputTor Input Tor Output

Tor Circuits

tag match tag match

Page 28: Toward Understanding Congestion in Tor

Kernel Congestion: libkqtimeKernel Input Kernel OutputTor Input Tor Output

Tor Circuits

tag match tag matchtrack cells

Page 29: Toward Understanding Congestion in Tor

Congestion Analysis

Page 30: Toward Understanding Congestion in Tor

Congestion Analysis

Page 31: Toward Understanding Congestion in Tor

Analyzing the DesignKernel Input Kernel OutputTor Input Tor Output

Tor Circuits

Page 32: Toward Understanding Congestion in Tor

Analyzing the DesignKernel Input Kernel OutputTor Input Tor Output

Tor Circuits

Queuing delays in kernel output buffer

Page 33: Toward Understanding Congestion in Tor

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

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

Ineffective PriorityKernel OutputTor Output

Tor Circuits

Circuit schedulers are ineffective at prioritization

Page 36: Toward Understanding Congestion in Tor

Ineffective PriorityKernel OutputTor Output

Tor Circuits

Libevent schedules one connection at a time

Page 37: Toward Understanding Congestion in Tor

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

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

Scheduling Problems

Scenario A Scenario B

No Shared ConnectionShared Connection

Page 40: Toward Understanding Congestion in Tor

Scheduling Problems

Scenario A Scenario B

Page 41: Toward Understanding Congestion in Tor

Global Circuit SchedulingKernel OutputTor Output

Tor Circuits

Choose among ALL writable

circuits

Page 42: Toward Understanding Congestion in Tor

Kernel Buffer BloatKernel OutputTor Output

Tor Circuits

Queuing delays in kernel output buffer

Page 43: Toward Understanding Congestion in Tor

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

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 45: Toward Understanding Congestion in Tor

Questions?

cs.umn.edu/[email protected]

think like an adversary

Page 46: Toward Understanding Congestion in Tor

libkqtime