The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X...

60
1 The Tor Project Our mission is to be the global resource for technology, advocacy, research and education in the ongoing pursuit of freedom of speech, privacy rights online, and censorship circumvention.

Transcript of The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X...

Page 1: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

1

The Tor Project

Our mission is to be the global resource for

technology, advocacy, research and

education in the ongoing pursuit of freedom

of speech, privacy rights online, and

censorship circumvention.

Page 2: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

2

● Online Anonymity– Open Source– Open Network

● Community of researchers, developers, users and relay operators.

● U.S. 501(c)(3) non-pro%t organization

Page 3: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

3

Estimated 2,000,000+ daily Tor users

Page 4: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

4

Threat model:what can the attacker do?

Alice

Anonymity network Bob

watch (or be!) Bob!

watch Alice!

Control part of the network!

Page 5: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

5

Anonymity isn't encryption: Encryption just protects contents.

Alice

Bob

“Hi, Bob!”“Hi, Bob!” <gibberish>

attacker

Page 6: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

6

Anonymity serves different interests for different user groups.

Anonymity

Private citizens“It's privacy!”

Page 7: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

7

Anonymity serves different interests for different user groups.

Anonymity

Private citizens

Businesses

“It's network security!”

“It's privacy!”

Page 8: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

8

Anonymity serves different interests for different user groups.

Anonymity

Private citizens

Governments Businesses

“It's traffic-analysisresistance!”

“It's network security!”

“It's privacy!”

Page 9: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

9

Anonymity serves different interests for different user groups.

Anonymity

Private citizens

Governments Businesses

“It's traffic-analysisresistance!”

“It's network security!”

“It's privacy!”

Human rightsactivists

“It's reachability!”

Page 10: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

10

The simplest designs use a single relay to hide connections.

Bob2

Bob1

Bob3

Alice2

Alice1

Alice3

Relay

E(Bob3,“X”)

E(Bob1, “Y”)

E(Bob2, “Z”)

“Y”

“Z”

“X”

(example: some commercial proxy providers)

Page 11: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

11

But a central relay isa single point of failure.

Bob2

Bob1

Bob3

Alice2

Alice1

Alice3

EvilRelay

E(Bob3,“X”)

E(Bob1, “Y”)

E(Bob2, “Z”)

“Y”

“Z”

“X”

Page 12: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

12

... or a single point of bypass.

Bob2

Bob1

Bob3

Alice2

Alice1

Alice3

IrrelevantRelay

E(Bob3,“X”)

E(Bob1, “Y”)

E(Bob2, “Z”)

“Y”

“Z”

“X”

Timing analysis bridges all connections through relay ⇒ An attractive fat target

Page 13: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

13

Page 14: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

14

Page 15: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

15

Page 16: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

16

Page 17: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

17

Tor's safety comes from diversity

● #1: Diversity of relays. The more relays we have and the more diverse they are, the fewer attackers are in a position to do traffic confirmation. (Research problem: measuring diversity over time)

● #2: Diversity of users and reasons to use it. 50000 users in Iran means almost all of them are normal citizens.

Page 18: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

18

Transparency for Tor is key

● Open source / free software● Public design documents and

specifications● Publicly identified developers● Not a contradiction:

privacy is about choice!

Page 19: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

19

But what about bad people?

● Remember the millions of daily users.● Still a two-edged sword?● Good people need Tor much more

than bad guys need it.

Page 20: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

20

Myth #1

● “I heard the Navy wrote Tor originally, so how can I trust it?”

Page 21: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

21

Myth #2

● “I heard the NSA runs half the relays.”

Page 22: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

22

Myth #3

● “I heard Tor is slow.”

Page 23: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

23

Myth #4

● “I heard Tor gets most of its money from the US government.”

Page 24: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

24

Myth #5

● “I heard 80% of Tor is bad people.”

Page 25: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

25

Myth #6

● “I shouldn't use Tor, because if I do the NSA will watch me.”

Page 26: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

26

Myth #7

● “I heard Tor is broken.”

Page 27: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

27

Onion Service

Page 28: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

28

Onion service properties

● Self authenticated● End-to-end encrypted● Built-in NAT punching● Limit surface area● No need to “exit” from Tor

Page 29: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

29

Page 30: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

30

Page 31: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

31

q

Page 32: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

33

Page 33: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

34

SecureDrop

https://securedrop.org/directory

Today, 30+ organizations use SecureDrop

Page 34: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

35

Ricochet

Page 35: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

36

OnionShare

Page 36: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

37

Services and Tools

https://help.riseup.net/en/tor#riseups-tor-hidden-services

All Riseup.net services are available using hidden service

... and many others

Package repository

apt-get install apt-tor-transport

http://vwakviie2ienjx6t.onion/

...

Page 37: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

38

Anonymous updates are awesome

● Evil package repository can't target you with a bad update, because they don't know it's you

● Local observer can't learn what you're updating, so they can't target you for being out of date

Page 38: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

39

Page 39: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

40

Page 40: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

41

Page 41: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

42

Page 42: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

43

Page 43: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

44

Page 44: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

45

Page 45: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

46

HS Directory

Hashring

HSDirn

Desc IDrep0

Desc IDrep1

HSDirn+1

HSDirn+2

HSDirn

HSDirn+1

HSDirn+2

Desc ID = H(onion-address | H(time-period | descriptor-cookie | replica))

Page 46: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

47

#1: Old onion keys are weak

● “The first 80 bits of the SHA-1 of the 1024-bit RSA key” :(

● The new system uses ED25519 (i.e. much stronger ECC keys)

Page 47: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

48

New keys => longer onion addresses

nzh3fv6jc6jskki3.onion

From 16 characters:

... to 52 characters:

a1uik0w1gmfq3i5ievxdm9ceu27e88g6o7pe0r,dw9jmntwkdsd.onion

(ed25519 public key base32 encoded)

Page 48: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

49

The HSDir relays are too predictable

● The six daily HSDirs for a given onion address are predictable into the future

● So a bad guy can run six relays with just the right keys to target a specific future day...to censor or to measure popularity

● People – we don't know who – were doing this attack in practice

Page 49: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

50

#2: Global shared random value

● The solution: make the HSDir mapping include a communal random value that everybody agrees about but that nobody can predict

● The directory authorities pick this value each day as part of their consensus voting process

Page 50: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

51

HSDirs get to learn onion addresses

● The onion service descriptor (which gets uploaded to the HSDir) includes the public key for the service (so everybody can check the signature)

● So you can run relays and discover otherwise-unpublished onion addresses

● “Threat intelligence” companies have been trying to do just that

Page 51: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

52

#3: New crypto hides the address

● The solution: the new cryptosystem has a cool feature where you can sign the onion descriptor with a subkey

● So everybody can check the signature but nobody can learn the main key from the subkey or signature

● Should finally kill the arms race with jerks running relays to gather onions

Page 52: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

53

#4: Rendezvous Single Onion Services

Rendezvous Point

Proposal 260

Page 53: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

54

OnionBalancehttps://onionbalance.readthedocs.org

Page 54: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

55

#5: Guard discovery is a big deal

● Your Tor client uses a single relay (called a Guard) for the first hop in all your paths, to limit exposed surface area

● But there are relatively easy attacks to learn a user's guard, and for onion services that can be especially bad

Page 55: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

56

Vanguards (Tor proposal 271)

● Multiple layers of guards protect better against Sybil+compromise attacks

● Path selection is still a huge open research area

Page 56: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

57

Deployment timeline

● HSDir side: deployed in Tor 0.3.0

● Relay side: deployed in Tor 0.3.0

● Client side: upcoming in Tor 0.3.2

● Service side: upcoming in Tor 0.3.2

Try it at % git clone https://git.torproject.org/arma/tor.git % git checkout dc25

Page 57: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

58

Page 58: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

59

Tor isn't foolproof

● Opsec mistakes

● Browser metadata fingerprints

● Browser exploits

● Traffic analysis

Page 59: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

60

How can you help?

● Run a relay (or a bridge)

● Teach your friends about Tor, and privacy in general

● Help find -- and fix – bugs

● Work on open research problems (petsymposium.org)

● donate.torproject.org

Page 60: The Tor Project - DEF CON CON 25/DEF CON 25... · Alice1 Alice3 Irrelevant Relay E (B o b 3, “ X ”) E(Bob1, “Y”) E ( B o b 2, “ Z ” ) “ Y ” “Z” “ X ” Timing

61

“Still the King of high secure,low latency Internet Anonymity”

“There are no contenders for the throne”