Technical changes since the last Tor talk Nick Mathewson The Tor - - PowerPoint PPT Presentation

technical changes since the last tor talk
SMART_READER_LITE
LIVE PREVIEW

Technical changes since the last Tor talk Nick Mathewson The Tor - - PowerPoint PPT Presentation

Technical changes since the last Tor talk Nick Mathewson The Tor Project <nickm@torproject.org> Defcon XV Aug 4, 2007 Marty! We've got to go back to the future2004! Tor was working, usable, and seemed pretty secure. (v 0.0.7.2)


slide-1
SLIDE 1

Technical changes since the last Tor talk

Nick Mathewson The Tor Project <nickm@torproject.org>

Defcon XV Aug 4, 2007

slide-2
SLIDE 2
  • Tor was working, usable, and seemed pretty
  • secure. (v 0.0.7.2)
  • Pretty small network.
  • No GUI—hard to use.
  • We got a couple of Defcon talks!

Marty! We've got to go back to the future2004!

slide-3
SLIDE 3
  • Hacking on Tor.(Latest is 0.2.0.4-alpha)

– Security: adding features/fixing security bugs. – Scalability: adding capacity is hard. – Scalability: using capacity is hard. – Usability: adding GUIs, fixing bugs. – Integration: working nice with other apps is hard. – Lots more: See the changelog.

  • Growing the network: ~200kuser, ~1kserver.

What we've been up to since then.

slide-4
SLIDE 4

Outline

  • Prelude: brief, fast introduction to Tor
  • Directories and server discovery changes:

More secure, more scalable!

  • Path generation changes:

More efficient, less filling!

  • Circuit-building protocol changes:
  • Oops. Crypto is hard.
  • Some fun new tools and features:

What do you mean, I need to edit a file?

slide-5
SLIDE 5

Intro anonymity: anonymity networks hide users among users.

Alice2 Bob1 Bob2 Alice1 Alice3 Network

slide-6
SLIDE 6

Intro Tor:There are a bunch of servers, connected via TLS (ssl).

S S S S S S S S S

slide-7
SLIDE 7

Intro Tor:clients build circuits through a network of decrypting relays.

1.

S S S S S S S S S Alice2

2. 3.

Alice1

slide-8
SLIDE 8

Intro Tor:circuits are used to relay multiple TCP streams.

1.

S S S S S S S S S Alice2

2. 3.

Bob1 Bob2 Alice1

4.

See also: PipeNet, Onion Routing

6. 5.

slide-9
SLIDE 9

A hostile first hop can tell Alice is talking, but not to whom.

S S S S S S S S S Alice2 Bob1 Bob2 Alice1

slide-10
SLIDE 10

A hostile last hop can tell somebody is talking to Bob, but not who.

S S S S S S S S S Alice2 Bob1 Bob2 Alice1

slide-11
SLIDE 11

But: two hostile hops can correlate traffic patterns and link Alice to Bob.

S S S S S S S S S Alice2 Bob1 Bob2 Alice1

No obvious fix that isn’t extra-slow.

slide-12
SLIDE 12
  • I. Directories and server discovery
slide-13
SLIDE 13
  • Every client must know every server.

– (If you just ask a server for a list of neighbors, it can

trivially lie.)

  • All clients must know the same servers.
  • Servers shouldn’t be able to impersonate each
  • ther.

– (Use self-signed descriptions; identity by PK.)

  • Bandwidth matters a lot.

We need to tell clients about servers.

slide-14
SLIDE 14

Server discovery is hard because misinformed clients lose anonymity.

S S S S S S S S S Alice2 Bob1 Bob2 Alice1 Known to Alice1 Known to Alice2

slide-15
SLIDE 15

2004: every authority published a big list of server information. That was slow.

S1 S2 Sn Authority Authority Authority Client Client Client

... ....

slide-16
SLIDE 16

Adding caches helped with performance...

S1 S2 Sn Authority Authority Authority Client Client Client

...

Cache Cache Cache Cache

....

slide-17
SLIDE 17

But a single bad authority could still break clients badly...

S1 S2 Sn Authority Authority Authority Client Client Client

...

Cache Cache Cache Cache

....

slide-18
SLIDE 18

And most information was redundant.

Client Cache “What's the directory?” Sign(Desc1,Desc2,Desc3..Desc99) “What's the directory?” Sign(Desc1,Desc3..Desc99,Desc100)

slide-19
SLIDE 19

So split directory into status (signed) and individual descriptors

Client Cache “What do authorities A and B say?” SignA(digest list), SignB(digest list) “Send me descriptor with digest X” Descriptor with digest X

(2005)

Remaining Problems: partitioning, redundancy.

slide-20
SLIDE 20

Naming and requesting descriptors by digest prevents attacks.

S1 Authorities Client Cache

“Use server whose identity key is X”.

“ H e r e ’ s

  • n

e j u s t f

  • r

y

  • u

! ”

ID = X

slide-21
SLIDE 21

Authorities now vote on a single consensus status document. (2007)

S1 S2 Sn Authority Authority Authority

...

  • 1. Distribute signed opinions.
  • 2. Compute result of vote,

and sign it.

  • 3. Distribute signatures; make

multi-signed document.

  • 4. Clients check signatures.
  • 5. Profit!
slide-22
SLIDE 22

Authorities say more than “yes/no” for each server.

  • Named?

Authority?

  • Running?

Guard?

  • Valid?
  • Fast?
  • Stable?
  • Bad exit?
  • Exit?

(Actually determining these can be hard.) (Keywords define client behavior; authorities improve criteria.)

slide-23
SLIDE 23
  • II. Path generation
slide-24
SLIDE 24

2004: all servers chosen with equal* probability, regardless of capacity.

S1 Client bw=x p=2x bw=4x bw=x bw=x/2 bw=2x bw=2x bw=x bw=x bw=x/2

Big servers were underused. Tiny servers were overloaded.

slide-25
SLIDE 25

Now: Bandwidth is not uniform, so don't select uniformly.

S1 Client p=x p=2x p=4x p=x p=x/2 p=2x p=2x p=x p=x p=x/2

slide-26
SLIDE 26

(But cap the maximum to prevent trust bottlenecks.)

S1 Client p=x p=2x “I can push a

  • terabit. No, really!”

p=x p=2x p=2x p=x

slide-27
SLIDE 27

Unstable servers are useful, but not for (SSH, IM, ...)

Client 1 hour 10 days 10 days 1 hour 10 days

slide-28
SLIDE 28

Use long-lived servers for long-lived connections.

Client 1 hour 10 days 10 days 1 hour 10 days O k a y f

  • r

p

  • r

t 2 2 .

slide-29
SLIDE 29

Our original “random” path-selection approach made sure that every client would eventually be profiled.

Alice loses if first and last hop are evil. (Correlation attacks) Suppose c/n nodes (bandwidthwise) are compromised. Therefore, (c/n)^2 of Alice's circuits are compromised. Therefore, if Alice's behavior stays the same, she will eventually lose.

slide-30
SLIDE 30

Tor clients now use “guard” servers to give long-term Alice a chance.

Alice S S S S S S

Chosen at random*, held fixed**.

If Alice’s guards are good, Alice never has a vulnerable path.

slide-31
SLIDE 31

Okay, so guard nodes might go down.

S S

X

slide-32
SLIDE 32

So add more as needed, but keep them in order...

S S S S

X

slide-33
SLIDE 33

...so we can go back to the original set when they come back online.

S S

slide-34
SLIDE 34

Old Tor:circuits built on-demand only. This was slow.

slide-35
SLIDE 35

Predict desired ports based on past behavior.

Alice S S (exit to 80,22) S S S (exit to 8001) S

slide-36
SLIDE 36

“Cannibalize” unused circuits for faster response to requests no circuit supports.

Alice S S S S (exit to weird port) Service on weird port

slide-37
SLIDE 37
  • III. Circuit-building protocol
slide-38
SLIDE 38

Extend by IP:Port was insufficient: nodes don't all know each other.

Alice S1 S2 “Extend this circuit to S2 at 18.244.0.188:9010” “Uh, how?” In practice, server knowledge is not 100% synchronized. So, use identity key and IP.

slide-39
SLIDE 39

Using key-only ID for this created an MITM attack.

Alice S1 S2 “Extend this circuit to S2 at evil:9010” Only good for traffic analysis... but other users were effective. (So, don’t use only identity key.) evil

slide-40
SLIDE 40

Using encrypted create cell for first hop was needless crypto.

Old Alice S

“Uh, guys? This is TLS.”

New Alice S

E(g^x) g^y,H(K=g^xy) X Y,H(K=H(X|Y)) Already encrypted, authenticated

slide-41
SLIDE 41

Speaking of cryptography, check for bad values of g^x, g^y.

Client Bad server Server 2

E2(gx) E2(g0) gy,H(g0y) g0, H(gx0)

“oops.”

(but once we checked for bad g^x,g^y,Ian Goldberg could prove this protocol secure.) (Also, we patched OpenSSL for this.)

slide-42
SLIDE 42
  • III. Tools and features
slide-43
SLIDE 43

Old Tor:everybody must speak SOCKS.

browser

Tor

???????

Privoxy/ polipo

HTTP SOCKS

App

TCP

gaim

SOCKS

???????

slide-44
SLIDE 44

The old solutions kind of sucked.

browser

Tor

Privoxy/ polipo

HTTP SOCKS S O C K S

gaim

SOCKS

Replaced libc calls

Linux/BSD App

On windows, you could do a net driver... OSX was screwed.

slide-45
SLIDE 45

TransPort (+iptables/pf) support any TCP

App

Tor

You can also do use a VM as your router: see JanusVM.

Privoxy/ polipo

HTTP SOCKS

App Linux, BSD

  • r OSX

TCP TCP + address

App

SOCKS

slide-46
SLIDE 46

Problem: DNS leaks are hard to solve.

Tor

Dumb App

SOCKS “get me 1.2.3.4!”

DNS

“Where is naughty.com?” “1.2.3.4!”

slide-47
SLIDE 47

Old solution: “use SOCKS4a or else!”

Tor

Smart App

SOCKS “get me naughty.com!”

slide-48
SLIDE 48

New solution: Tor acts as a DNS server

Tor

Dumb App

SOCKS “get me 1.2.3.4!”

DNS

“Where is naughty.com?” “1.2.3.4!”

This also lets dumb apps handle .onion addresses.

slide-49
SLIDE 49

Problem: editing text files is hard. So, add support for external GUIs.

Tor

Vidalia TorK

....

slide-50
SLIDE 50

Things to do:

  • Tor: https://torproject.org

– Try it out; want to run a server? – See docs and specs for more detail.

  • Donate to Tor!

– https://torproject.org/donate.html – (We’rea tax-deductible charity!)

  • Donate to EFF too!

– I’m in the dunk tank at 6:30

  • See more talks!

– Roger at 2 on anti-censorship – Mike at 5 on securing the network and

apps.