Enhancing Security and Privacy of Tors Ecosystem by using Trusted - - PowerPoint PPT Presentation

enhancing security and privacy of tor s ecosystem
SMART_READER_LITE
LIVE PREVIEW

Enhancing Security and Privacy of Tors Ecosystem by using Trusted - - PowerPoint PPT Presentation

Enhancing Security and Privacy of Tors Ecosystem by using Trusted Execution Environments Seongmin Kim , Juhyeng Han, Jaehyeong Ha, Taesoo Kim *, Dongsu Han * 1 Tor anonymity network Tor: the most popular anonymity network for Internet


slide-1
SLIDE 1

Enhancing Security and Privacy of Tor’s Ecosystem by using Trusted Execution Environments

Seongmin Kim, Juhyeng Han, Jaehyeong Ha, Taesoo Kim *, Dongsu Han

1

*

slide-2
SLIDE 2

Tor anonymity network

2

  • Tor: the most popular anonymity network for Internet users

– Helps users to defend against traffic analysis and keep user’s privacy (e.g., what sites you visit, IP address) [from Tor project, www.torproject.org] – Freely available as an open source – 1.8 million users on a daily basis

* from Onionview, https://onionview.codeplex.com/

The geographic location of Tor relays *

slide-3
SLIDE 3

Tor anonymity network

3

  • Tor: the most popular anonymity network for Internet users

– Helps users to defend against traffic analysis and keep user’s privacy (e.g., what sites you visit, IP address) [from Tor project, www.torproject.org] – Freely available as an open source – 1.8 million users on a daily basis

* from Onionview, https://onionview.codeplex.com/

The geographic location of Tor relays *

slide-4
SLIDE 4

Tor anonymity network

4

  • Tor: the most popular anonymity network for Internet users

– Helps users to defend against traffic analysis and keep user’s privacy (e.g., what sites you visit, IP address) [from Tor project, www.torproject.org] – Freely available as an open source – 1.8 million users on a daily basis

* from Onionview, https://onionview.codeplex.com/

The geographic location of Tor relays *

slide-5
SLIDE 5

Tor anonymity network

5

  • Tor: the most popular anonymity network for Internet users

– Helps users to defend against traffic analysis and keep user’s privacy (e.g., what sites you visit, IP address) [from Tor project, www.torproject.org] – Freely available as an open source – 1.8 million users on a daily basis

* from Onionview, https://onionview.codeplex.com/

The geographic location of Tor relays *

slide-6
SLIDE 6

Tor network: Threat model

6

Entry Middle Exit Tor client Destination

Plain-text TLS channel TLS channel TLS channel

  • 3-hop onion routing: a single Tor entity cannot know both client and server

Processing Unit : Cell (512 Bytes)

slide-7
SLIDE 7

Tor network: Threat model

7

  • Tor’s Threat model

– Tor is a volunteer-based network: Tor relays are not trusted Can run a Tor relays of his own Can compromise some fraction of Tor relays Entry Middle Exit Tor client Destination

Plain-text TLS channel TLS channel TLS channel

  • 3-hop onion routing: a single Tor entity cannot know both client and server

Processing Unit : Cell (512 Bytes)

slide-8
SLIDE 8

Tor network: Threat model

8

  • Tor’s Threat model

– Tor is a volunteer-based network: Tor relays are not trusted Can observe some fraction

  • f network traffic

Can run a Tor relays of his own Can compromise some fraction of Tor relays Entry Middle Exit Tor client Destination

Plain-text TLS channel TLS channel TLS channel

  • 3-hop onion routing: a single Tor entity cannot know both client and server

Processing Unit : Cell (512 Bytes)

slide-9
SLIDE 9

Tor network: Threat model (Cont.)

9

Directory authorities

  • Careful admission
  • Behavior monitoring

Tor client Destination

slide-10
SLIDE 10

Tor network: Threat model (Cont.)

10

Directory authorities

  • Careful admission
  • Behavior monitoring

Tor client Destination Anonymity Broken!

slide-11
SLIDE 11

Tor network: Threat model (Cont.)

11

Directory authorities

  • Careful admission
  • Behavior monitoring

Tor client Destination Anonymity Broken!

  • Having a large

number of relays

Out-of-scope: network-level adversary (controls a large fraction of network)

  • 1. Currently runs ~10,000 relays
  • 2. Large-scale traffic correlation is believed to be verify difficult in practice
slide-12
SLIDE 12

Tor network: Threat model (Cont.)

12

Directory authorities

  • Careful admission
  • behavior monitoring

Tor client Destination Anonymity Broken!

  • Having a large

number of relays Out-of-scope : network-level adversary who can controls a large fraction of Tor network

  • 1. Currently runs ~10000 relays
  • 2. Large-scale traffic correlation are believed to be verify difficult in practice

However, Tor is still vulnerable to many types of attacks under its traditional threat model

slide-13
SLIDE 13

Limitations of Tor

13

Problem 1. Tor relays are semi-trusted

– Authorities cannot fully verify the behaviors of them

Problem 2. Even attackers control a few Tor relays, they can

– Access internal information (circuit identifier, cell header, …) – Modify the behavior of relays (DDoS, packet tampering, …) Modifying the behavior Accessing internal information

  • Malicious circuit creation

[Security09, CCS11]

  • Sniper attack [NDSS15]
  • Bad apple attack

[LEET11]

  • Harvesting hidden service

descriptors [S&P13]

  • Circuit demultiplexing [S&P06]
  • Website fingerprinting

[Security15]

Both

<Low-resource attacks>

  • tagging attack [ICC08, TON12,

CCS12, S&P13]

  • Bandwidth inflation [PETS07,

S&P13]

  • Controlling HSDir [S&P13]
slide-14
SLIDE 14

Limitations of Tor (Cont.)

14

Entry Middle Exit Tor clients Destination

Plain-text TLS channel TLS channel TLS channel

Attackers can modify the behavior

Give false information to others Modify or inject the cell

Bandwidth 20MB/s 150MB/s

Inflated!

Processing Unit: Cell (512 Bytes)

Information visible to attackers

Cell: header Demultiplex and identify a circuit Cell Cell

slide-15
SLIDE 15

Limitations of Tor (Cont.)

15

Entry Middle Exit Tor client Destination

Plain-text TLS channel TLS channel TLS channel

To address the problems on Tor, 1) Fundamental trust bootstrapping mechanism 2) Advanced trust model to verify untrusted remote parties are required

slide-16
SLIDE 16

Trend: Commoditization of TEE

16

  • Trusted Execution Environment (TEE): Hardware technology for trusted computing

OS (untrusted) Application (untrusted)

Secure container Integrity checking  Prevents behavior modification Modified Tor code

  • Intel SGX: a promising TEE technology for generic applications

– Native performance in the secure mode – Available on Intel Skylake and Kaby lake CPU Cannot access data, flow control X  Protects the secrecy of the program

edit

Original

slide-17
SLIDE 17

SGX-Tor: Leveraging Intel SGX on Tor

17

Intel SGX Improved trust model Operational privacy Practicality Tor network

Middle

Improved trust model Operational privacy Practicality

  • Spells out what users trust

in practice

  • Provides ultimate privacy
  • Protects sensitive data and

Tor operations

  • Prevents modifications on

Tor relays

  • The chance of having more

hardware resources donated

  • Incrementally deployable
  • Compatibility

SGX-Tor

slide-18
SLIDE 18

SGX-Tor: Leveraging Intel SGX on Tor

18

Intel SGX Improved trust model Operational privacy Practicality Tor network

Middle

Improved trust model Operational privacy Practicality

  • Explicitly spells out what

users trust in practice

  • Provides ultimate privacy

due to the mix-in model

  • Protects sensitive data and

Tor operations

  • Denies modifications on

Tor relays

  • Increasing the chance of

having more hardware resources donated

  • Incrementally deployable
  • Compatibility

SGX-Tor

 Reduces the power of an attacker who currently gets the sensitive information by running Tor relays  Raises the bar for Tor adversary to a traditional network- level adversary (only passively see the TLS bytestream)

slide-19
SLIDE 19

Intel SGX 101: Isolated Execution

19

Address Space Enclave Access from OS/VMM Physical Memory CPU Package Memory Encryption Engine (MEE) Snooping Processor Key

  • Protects app’s secret from untrusted privilege software
  • Application keeps its data/code inside the “Enclave”
  • Trusted Computing Base (TCB) = Enclave + CPU package

EPC

(Enclave Page Cache) Encrypted

Cell

slide-20
SLIDE 20

Intel SGX 101: Remote attestation

20 20

Application Enclave

Quoting Enclave

Remote platform User platform

  • 1. Request

Application Challenger Enclave Attestation Verification

EPID key Ephemeral

  • 2. Create REPORT
  • 3. Sign with

EPID group key (Create QUOTE)

  • 4. Send

QUOTE

  • 5. Verify
  • Attest an application on remote platform

– Checks the integrity of enclave (hash of code/data pages) – Verifies whether enclave is running on real SGX CPU – Can establish a “secure channel” between enclaves

slide-21
SLIDE 21

SGX-Tor: Threat Model

21

  • Only trusts the underlying SGX hardware & Tor code itself
  • Do not address network-level adversaries : who can perform large-scale traffic analysis
  • Out of scope :Vulnerabilities in Tor codes, SGX side channel attacks

 Mitigated by recent SGX research: Moat [CCS16], SGX-Shield [NDSS17], T-SGX [NDSS17]

OS (untrusted) Application (untrusted) Enclave CPU A powerful network-level adversary : out-of-scope TCB : Enclave + CPU package

<SGX Threat model> <Tor Threat model>

slide-22
SLIDE 22

User process (Tor application)

SGX-Tor: Design and Implementation

22

Enclave memory SSL Library Attestation Module Sealing Module Seals/unseals private data Integrity check with remote host Tor code/data (Core)

  • Circuit Establishment - Hidden service - Voting
  • Encryption/Decryption - Cell/Consensus creation

Crypto/TLS operations

Securely obtains the entropy and time value Encrypts and stores the sensitive data outside the enclave Validates the enclave hash

  • f the Tor program
slide-23
SLIDE 23

System Call

SGX-Tor: Design and Implementation

23

User process (Tor application)

Enclave Creation SSL Library Attestation Module Sealing Module Seals/unseals private data Integrity check with remote host Tor code/data (Core)

  • Circuit Establishment - Hidden service - Voting
  • Encryption/Decryption - Cell/Consensus creation

Crypto/TLS operations Enclave memory

Trusted Untrusted

Enclave initialization

OCALL/ECALL Wrapper Standard Library (glibc) Tor code/data (Untrusted) SGX Runtime Library Application memory

ECALL OCALL

Request system services

slide-24
SLIDE 24

System Call

SGX-Tor: Design and Implementation

24

User process (Tor application)

Enclave Creation SSL Library Attestation Module Sealing Module Seals/unseals private data Integrity check with remote host Tor code/data (Core)

  • Circuit Establishment - Hidden service - Voting
  • Encryption/Decryption - Cell/Consensus creation

Crypto/TLS operations Enclave memory

Trusted Untrusted

Enclave initialization

OCALL/ECALL Wrapper Standard Library (glibc) Tor code/data (Untrusted) SGX Runtime Library Application memory

Narrow interface ECALL OCALL

Request system services

Sanity checking

  • 1. Argument length
  • 2. Address range
slide-25
SLIDE 25

Attacks defeated by using SGX-Tor

25

Entry Middle Exit Tor client Destination

Plain-text TLS channel TLS channel TLS channel

Replay Cell counting

Directory authorities Malicious relay (modified Tor)

  • 1. BW scanning
  • 2. Detect

scanning

  • 3. Report fake BW
  • 4. Create

consensus document Advertised BW

Inflated!

  • 2. Bandwidth inflation
  • 1. Tagging attack
slide-26
SLIDE 26

Attacks defeated by using SGX-Tor

26

Entry Middle Exit Tor client Destination

Plain-text TLS channel TLS channel TLS channel Directory authorities Malicious relay (modified Tor)

  • 1. BW scanning
  • 2. Detect

scanning

  • 3. Report fake BW
  • 4. Create

consensus document Advertised BW

Inflated!

  • 2. Bandwidth inflation
  • 1. Tagging attack

Attract more clients! Replay Cell counting

slide-27
SLIDE 27

Attacks defeated by using SGX-Tor (Cont.)

27

Entry Middle Exit Tor client Destination

Plain-text

Enclave

Circuit establishment Cell creation Encryption/Decryption Onion/SSL key creation Enclave Enclave Enclave Cell Circuit descriptor Private keys TLS channel TLS channel TLS channel

access 1. Circuit identifier 2. Cell header 3. Private keys modify the code 1. To modify/inject cells 2. To inflate bandwidth

Attackers cannot Attacks defeated/mitigated by SGX-Tor

  • Circuit demultiplexing [S&P06]
  • Bandwidth inflation [PETS07, S&P13]
  • Harvesting/Controlling HSDir [S&P13]
  • Tagging attack [ICC08, TON12, CCS12, S&P13]

slide-28
SLIDE 28

New functionality: Automatic admission

28

  • Integrity verification of relays (Directory authority  Onion Router)

– Automatically admits “unmodified” and “SGX-enabled” relays – Improved trust model: current implicit trust model turns into the explicit trust model

Directory authority Tor relays Expected hash Admit (match success) Attestation fail (not SGX-enabled) Attestation fail (bad hash)

Enclave Enclave

Remote Attestation

Enclave

Nickname: OR1 Nickname: OR2 Nickname: OR3 Consensus document (modified)

name: OR1 BW: 20MB/s fingerprint: ….

NOTE: Tor uses the same binary for directory authorities, Tor relays, and client proxies

slide-29
SLIDE 29

Incremental deployability

29

  • SGX-Tor’s basic assumption: “All relays and authorities are SGX-enabled”
  • SGX-Tor supports interoperability

– Allows admission of non-SGX relays without remote attestation – SGX-enabled clients can get the list of SGX-Tor relays from SGX-enabled authorities

Entry Middle Exit

Tor client Destination

Enclave Enclave Enclave Enclave

Enclave Enclave

Directory authorities Remote Attestation

Enclave Enclave

slide-30
SLIDE 30

Implementation detail

30

  • Engineering efforts

– Support for Windows/Linux (based on Intel SGX SDK) – SGX-ported libraries: OpenSSL, libevent, zlibc – SGX-Tor is an open source: Available at https://github.com/KAIST-INA/SGX-Tor

  • Trusted Computing Base (TCB) size

– TCB size of Haven: More than 200MB (maximum enclave size : 128MB in Windows) – 3.8x smaller (320K LoC vs 1,228K LoC) than Graphene (open source library OS for SGX)

slide-31
SLIDE 31

Evaluation

31

1) What kind of sensitive data of Tor is protected by SGX-Tor? 2) What is the performance overhead of running SGX-Tor? 3) How compatible and incrementally deployable is SGX-Tor with the current Tor network?

  • Environmental setup

– SGX CPUs: Intel Core i7-6700 (3.4GHz) and Intel Xeon CPU E3-1240 (3.5GHz) – Configuration: 128MB Enclave Page Cache (EPC) – Running Tor in Windows, Firefox as a Tor browser (in the client proxy) – Establish a private Tor network using chutney

slide-32
SLIDE 32

What is protected by SGX-Tor?

32

Current Tor Network-level adversary SGX-Tor

TCP/IP header Visible Visible Visible TLS-encrypted bytestream Visible Visible Visible Cell Visible Not visible Not visible Circuit ID Visible Not visible Not visible Voting result Visible Not visible Not visible Consensus document Visible Not visible Not visible Hidden service descriptor Visible Not visible Not visible List of relays Visible Not visible Not visible Private keys Visible Not visible Not visible

slide-33
SLIDE 33

Performance evaluation

33

  • SGX-Tor performance : WAN setting

– Establish a private Tor network – For the realistic scenario, we consider the “locality of relays” (Asia, EU, U.S. West, U.S. East)

0.2 0.4 0.6 0.8 1 250 500 750 1000

Cummulative Prob. Time-to-first-byte (ms)

10MB 100MB 30 60 90 120 HTTPS HTTP HTTPS HTTP

Throughput (Mbps)

File Size (MB) client server Entry (KAIST) Middle (Cloud)

  • 1. EU 2.U.S. West
  • 3. U.S. East

Exit (Gatech)

<Evaluation environment>

: SGX-Tor : Original Tor

11.9% degradation (on average) 3.9% additional latency

Enclave Enclave

slide-34
SLIDE 34

0.2 0.4 0.6 0.8 1 1 2 3

Cummulative Prob. Hidden Service Throughput (Mbps)

Performance evaluation (Cont.)

34

  • End-to-end client performance of SGX-Tor (using Tor browser)

– Web latency: Visiting Alexa Top 50 websites – Hidden service: HTTP file server (downloading 10MB)

0.2 0.4 0.6 0.8 1 50 100 150

Cummulative Prob. Webpage Loading Time (s)

: SGX-Tor : Original Tor

3.3% degradation 7.4% additional latency

SGX-Tor : 13.2s Original : 12.2s SGX-Tor : 1.30Mbps Original : 1.35Mbps

slide-35
SLIDE 35

Compatibility with vanilla Tor

35

  • Long-running: Admit SGX-Tor relays in the vanilla Tor

– Collected results for two weeks

Advertised bandwidth * Middle selection Probability Network I/O bandwidth per second

: SGX-Tor : Original Tor

Fast Stable

* From https://collector.torproject.org/

Serves Tor traffic well Actually selected by multiple Tor users Listed in the consensus document

slide-36
SLIDE 36

Conclusion

36

  • We design and implement SGX-Tor by leveraging commodity TEE

and demonstrate its viability

– Gives moderate performance overhead – Shows its compatibility and possibility of incremental deployment

  • SGX-Tor enhances the security and privacy of Tor by

– Defending against existing attacks on Tor – Bringing changes to the trust model of Tor – Providing new properties : automatic admission

  • Available at github! (https://github.com/KAIST-INA/SGX-Tor)