Auditing IoT Communications with TLS-RaR Judson Wilson, Henry - - PowerPoint PPT Presentation

auditing iot communications with tls rar
SMART_READER_LITE
LIVE PREVIEW

Auditing IoT Communications with TLS-RaR Judson Wilson, Henry - - PowerPoint PPT Presentation

Auditing IoT Communications with TLS-RaR Judson Wilson, Henry Corrigan-Gibbs, Riad S. Wahby, Keith Winstein, Philip Levis, Dan Boneh Stanford University Auditing Standard Devices MITM Used for: security audit automated exfiltration


slide-1
SLIDE 1

Auditing IoT Communications with TLS-RaR

Judson Wilson, Henry Corrigan-Gibbs, Riad S. Wahby, Keith Winstein, Philip Levis, Dan Boneh Stanford University

slide-2
SLIDE 2

Auditing Standard Devices

MITM

Used for:

  • security audit
  • automated exfiltration

detection

  • automated intrusion

detection

slide-3
SLIDE 3

IoT is Different

MITM

slide-4
SLIDE 4

Troubling Facts

1) We have no way to audit IoT communications, so we must trust companies to do what they claim.

slide-5
SLIDE 5

Troubling Facts

1) We have no way to audit IoT communications, so we must trust companies to do what they claim. 2) Respected Companies Have Misrepresented Their Actions Google

“Google's iPhone Tracking, Web Giant, Others Bypassed Apple Browser Settings for Guarding Privacy.” WSJ, Feb. 17, 2012.

Volkswagen

“Volkswagen Admits to Cheating on U.S. Emissions Tests,” Bloomberg, Sept. 18, 2015

slide-6
SLIDE 6

MITM does have problems.

MITM

Attack! Attack!

slide-7
SLIDE 7

MITM does have problems.

MITM

slide-8
SLIDE 8

Overview

  • Setting
  • Technical Problem
  • Our Scheme: TLS RaR

– Main Idea – Corner Cases

  • Secure Key Release
  • Clean Shutdown
  • Evaluation
  • Related Work
  • Conclusions
slide-9
SLIDE 9

Different Parties, Different Concerns

Potential concerns of IoT device company:

  • Prevent tampering, back doors
  • Prevent usage of device on other services
  • Solution that is easy to incorporate.
  • Protecting customer data

Customer's concerns:

  • Desire an accurate audit, as good as MITM
  • Preserve privacy
slide-10
SLIDE 10

Compromise: Replace MITM with passive, read only auditors.

Audit Box Audit Box

Enable:

  • security audit
  • automated exfiltration

detection

  • automated intrusion

detection

Main Channel

slide-11
SLIDE 11

The Technical Problem:

Create a method for passive, read only auditing of TLS-protected communication, to replace the man in the middle method. In other words: Remove the TLS barrier from a communications audit.

slide-12
SLIDE 12

Overview

  • Setting
  • Technical Problem
  • Our Scheme: TLS RaR

– Main Idea – Corner Cases

  • Secure Key Release
  • Clean Shutdown
  • Evaluation
  • Conclusions
slide-13
SLIDE 13

TLS-RaR: Rotate and Release

slide-14
SLIDE 14

Device to Cloud TLS

Time Handshake Begin TCP Connection Enter TLS Session Encrypted Session AES-GCM

slide-15
SLIDE 15

Time Handshake Handshake Begin TCP Connection Enter TLS Session TLS 1.2: Renegotiate or Resume TLS 1.3: KeyUpdate

Device to Cloud TLS

AES-GCM AES-GCM

slide-16
SLIDE 16

Time Handshake AES-GCM AES-GCM Epoch 0 Epoch 1

Device to Cloud TLS With a Twist

Rotate Keys

Reconnect, Renegotiate, Resume

  • r KeyUpdate
slide-17
SLIDE 17

Time Handshake Release Previous Epoch (0) Key

Device to Cloud TLS With a Twist

AES-GCM AES-GCM Epoch 0 Epoch 1 Rotate Keys

Reconnect, Renegotiate, Resume

  • r KeyUpdate
slide-18
SLIDE 18
  • Audit box's decryption yields the same stream of

data as endpoints' SSL_read() calls, but delayed

➔ Audit matches what was received

Nice Properties

slide-19
SLIDE 19
  • Audit box's decryption yields the same stream of

data as endpoints' SSL_read() calls, but delayed

➔ Audit matches what was received

  • Format of TLS on the wire is not changed

➔ Easy to reason about security of the protocol ➔ Easy to adopt

Nice Properties

slide-20
SLIDE 20
  • Audit box's decryption yields the same stream of

data as endpoints' SSL_read() calls, but delayed

➔ Audit matches what was received

  • Format of TLS on the wire is not changed

➔ Easy to reason about security of the protocol ➔ Easy to adopt

  • For some existing servers no change is necessary

➔ Really easy to adopt

Nice Properties

slide-21
SLIDE 21
  • Audit box's decryption yields the same stream of

data as endpoints' SSL_read() calls, but delayed

➔ Audit matches what was received

  • Format of TLS on the wire is not changed

➔ Easy to reason about security of the protocol ➔ Easy to adopt

  • For some existing servers no change is necessary

➔ Really easy to adopt

  • Minimal change to OpenSSL on the device

➔ Easy to reason about security of the implementation ➔ Easy to adopt

Nice Properties

slide-22
SLIDE 22

Overview

  • Setting
  • Technical Problem
  • Our Scheme: TLS RaR

– Main Idea – Corner Cases

  • Secure Key Release
  • Clean Shutdown
  • Evaluation
  • Conclusions
slide-23
SLIDE 23

Audit Box A Audit Box B Audit Box C

Device simply distributes key to Audit Boxes.

Device

Key Release Procedure: Straw Man

slide-24
SLIDE 24

Key Release Procedure: Straw Man

Audit Box B Audit Box C Evil Audit Box Device Src: IoT Device Dst: Server “SUSPICIOUS DATA”

slide-25
SLIDE 25

Audit Box A Audit Box B Audit Box C

Cryptographic Hashes and Signatures ensure integrity to the auditors.

Device

Sealed-History Key Release

h = Hash(records) σ = Sign(epoch, key, h) h, σ h, σ h, σ

slide-26
SLIDE 26

Overview

  • Setting
  • Technical Problem
  • Our Scheme: TLS RaR

– Main Idea – Corner Cases

  • Secure Key Release
  • Clean Shutdown
  • Evaluation
  • Conclusions
slide-27
SLIDE 27

Connection Shutdown: Straw Men

1) Device naively releases key after disconnecting

slide-28
SLIDE 28

Connection Shutdown: Straw Men

1) Device naively releases key after disconnecting Attack: Auditors use key to append data to IoT device-to-server stream.

slide-29
SLIDE 29

Connection Shutdown: Straw Men

1) Device naively releases key after disconnecting Attack: Auditors use key to append data to IoT device-to-server stream. 2) Device doesn't release key after disconnecting

slide-30
SLIDE 30

Connection Shutdown: Straw Men

1) Device naively releases key after disconnecting Attack: Auditors use key to append data to IoT device-to-server stream. 2) Device doesn't release key after disconnecting Problem: Auditor can't decrypt the last epoch.

slide-31
SLIDE 31

Clean Connection Shutdown

Clean shutdown: IoT application ensures the last key encrypting data is not useful (e.g. authenticated acknowledgment), then securely releases the key. TLS's close_notify is probably good enough.

slide-32
SLIDE 32

Clean Connection Shutdown

Clean shutdown: IoT application ensures the last key encrypting data is not useful (e.g. authenticated acknowledgment), then securely releases the key. TLS's close_notify is probably good enough. Unclean shutdown results in unauditable final epoch.

slide-33
SLIDE 33

Clean Connection Shutdown

Clean shutdown: IoT application ensures the last key encrypting data is not useful (e.g. authenticated acknowledgment), then securely releases the key. TLS's close_notify is probably good enough. Unclean shutdown results in unauditable final epoch. Note: Unclean shutdown can be caused by hardware/network failure or actions by IoT device, cloud server, and unauthenticated third parties.

slide-34
SLIDE 34

Overview

  • Setting
  • Technical Problem
  • Our Scheme: TLS RaR

– Main Idea – Corner Cases

  • Secure Key Release
  • Clean Shutdown
  • Evaluation
  • Conclusions
slide-35
SLIDE 35

Alexa Top 1,000,000 Compatibility Survey

Fraction of Servers* Rotation by Reconnect 54.2% Rotation by Renegotiation 12.2% Rotation by Resume (requires heartbeat) 0.5% *Includes only the ≈400,000 servers that support HTTPS and keep-alive, January, 2016.

slide-36
SLIDE 36

Performance Impact

Completion time for 1000 simulated sequential downloads of a 100kB resource, over a 24 Mbps link with 100 ms latency: Takeaway: In the worst case scenario (unlikely in IoT), epoch lengths can be chosen for minimal impact.

slide-37
SLIDE 37

Overview

  • Setting
  • Technical Problem
  • Our Scheme: TLS RaR

– Main Idea – Corner Cases

  • Secure Key Release
  • Clean Shutdown
  • Evaluation
  • Conclusions
slide-38
SLIDE 38

Conclusions

  • Auditing the IoT is important, but not presently possible.
slide-39
SLIDE 39

Conclusions

  • Auditing the IoT is important, but not presently possible.
  • Allowing a read only audit is a potential compromise.
slide-40
SLIDE 40

Conclusions

  • Auditing the IoT is important, but not presently possible.
  • Allowing a read only audit is a potential compromise.
  • TLS RaR is a technical solution with these nice properties:

– SSL_read() returns same data for all trusted viewers – format of TLS on the wire is not changed – no changes for some servers – minimal change to OpenSSL on the device

slide-41
SLIDE 41

Conclusions

Judson Wilson judsonw@stanford.edu

Questions?

  • Auditing the IoT is important, but not presently possible.
  • Allowing a read only audit is a potential compromise.
  • TLS RaR is a technical solution with these nice properties:

– SSL_read() returns same data for all trusted viewers – format of TLS on the wire is not changed – no changes for some servers – minimal change to OpenSSL on the device

slide-42
SLIDE 42

Backup Slides

slide-43
SLIDE 43
  • Present-Moment Integrity

➔ Main channel's end-to-end integrity is preserved

  • Present-Moment Secrecy

➔ Auditors can't decrypt traffic until after a key release.

Security Properties

slide-44
SLIDE 44
  • Present-Moment Integrity

➔ Main channel's end-to-end integrity is preserved

  • Present-Moment Secrecy

➔ Auditors can't decrypt traffic until after a key release.

  • Past Auditability

➔ Auditors can decrypt previously observed records for

which they have the key, or return “fail.”

Security Properties

slide-45
SLIDE 45
  • Present-Moment Integrity

➔ Main channel's end-to-end integrity is preserved

  • Present-Moment Secrecy

➔ Auditors can't decrypt traffic until after a key release.

  • Past Auditability

➔ Auditors can decrypt previously observed records for

which they have the key, or return “fail.”

  • Audit Robustness

➔ Auditors cannot be convinced that a forgery (possibly

from another auditor) came from one of the endpoints.

Security Properties

slide-46
SLIDE 46
  • Covert Channels

➔ TLS-RaR cannot prevent secret communication

between endpoints.

  • Denial of Service
  • Incompatible Application-Layer Authentication

➔ Auditors may see and replay all plaintext, including

cookies, passwords, and tickets.

➔ Remedy: Use TLS client certificates

Unmitigated Threats

slide-47
SLIDE 47

Two-Phase Key Release Procedure

Device Audit Box A Audit Box B Audit Box C

1) Device requests auditors' permission to release key protecting TCP data sequence numbers x through y.

Range: x-y OK? Range: x-y OK? Range: x-y OK?

slide-48
SLIDE 48

Two-Phase Key Release Procedure

Audit Box A Audit Box B Audit Box C

2) Audit Boxes acknowledge after they are ready for other Audit Boxes to receive the key.

Range: x-y ACK Range: x-y ACK ACK Device

slide-49
SLIDE 49

Two-Phase Key Release Procedure

Audit Box A Audit Box B Audit Box C ACK ACK ACK Device

3) Device waits for all Audit Boxes to respond. (May time out and notify Audit Boxes.)

slide-50
SLIDE 50

Two-Phase Key Release Procedure

Audit Box A Audit Box B Audit Box C

4) Device distributes key to Audit Boxes.

Device

slide-51
SLIDE 51

Overview

  • Setting
  • Technical Problem
  • Our Scheme: TLS RaR

– Main Idea – Corner Cases

  • Secure Key Release
  • Clean Shutdown
  • Evaluation
  • Related Work
  • Conclusions
slide-52
SLIDE 52

Related Work

mcTLS [Naylor et. al. 2015]

  • targets several problems, including read only

middleboxes which could be auditors

  • different approach: uses multiple MACs
slide-53
SLIDE 53

Related Work

mcTLS [Naylor et. al. 2015]

  • targets several problems, including read only

middleboxes which could be auditors

  • different approach: uses multiple MACs

BlindBox [Sherry et. al. 2015]

  • solves the opposite problem, a “blind” inspection
  • different trust model
slide-54
SLIDE 54

Rotation Policy

Device attempts to limit Epoch length by:

  • Age of data under new key: 60 seconds
  • Amount of data protected by new key: 10 MB

Auditor logs when:

  • Age of data under new key: 5 minutes
  • Amount of data protected by new key: 50 MB
slide-55
SLIDE 55

client_random, server_random: random data (nonces) from client/server pre_master_secret: shared secret from client or Diffie-Hellman key exchange. master_secret = PRF(pre_master_secret, "master secret", client_random + server_random) key_block = PRF(master_secret, "key expansion", server_random + client_random); key_block { client_write_MAC_secret[hash_size] server_write_MAC_secret[hash_size] client_write_key[key_material_length] server_write_key[key_material_length] client_write_IV[IV_size] server_write_IV[IV_size] }

Inputs: Computations: Outptuts:

TLS 1.2 Key Generation (RFC 5246)

slide-56
SLIDE 56

A Different Idea: TLS-in-TLS Tunneling

slide-57
SLIDE 57

TLS-in-TLS

IP TCP Encrypted TLS NULL TLS Encrypted TLS Application Ethernet, etc. NULL TLS

  • Unencrypted
  • End to end integrity

and Authenticity. Encrypted TLS

  • Auditor has full access,

either by proxy or client releasing the keys.

slide-58
SLIDE 58

TLS-in-TLS

Benefits:

– TLS is still intact. – No renegotiation. – Auditor has instantaneous access to data.

Problems:

– Incompatible with existing web servers, load balancers, SSL

terminators.

– Creates a new layer of cryptography where auditor is not trusted. – NULL ciphers are unsupported, meant as a debug tool. – Potential attacks between auditors.

slide-59
SLIDE 59

http://www.zytrax.com/tech/survival/ssl.html Survival guides - TLS/SSL and SSL (X.509) Certificates

slide-60
SLIDE 60

– SSL_read() returns same data for all parties. – Format of TLS on the wire is not changed. – No changes for some servers. – Minimal change to OpenSSL.

Same Nice Properties?

B l i n d B

  • x

mcTLS

No No ? ? ? N/A No No

slide-61
SLIDE 61

Threat Model Exclusions

We exclude the following threats from our model:

  • Malicious parties, including the IoT device and cloud server,

may communicate by covert channels.

  • A malicious auditor may leak private data or keys.
  • Malicious auditors may collude to produce the same incorrect

audit record.

slide-62
SLIDE 62

Threat Model

An attacker may attempt anything from the TLS threat model, such as passive eavesdropping, replay and masquerading.

slide-63
SLIDE 63

Threat Model

An attacker may attempt anything from the TLS threat model, such as passive eavesdropping, replay and masquerading. A malicious audit box may try to:

  • tamper with the communications that are being audited
  • falsify their audit record and not be detected
  • masquerade as the device or cloud server to modify the

decrypted cleartext in other auditors' records

slide-64
SLIDE 64

Threat Model

An attacker may attempt anything from the TLS threat model, such as passive eavesdropping, replay and masquerading. A malicious audit box may try to:

  • tamper with the communications that are being audited
  • falsify their audit record and not be detected
  • masquerade as the device or cloud server to modify the

decrypted cleartext in other auditors' records A malicious IoT device and/or cloud server may try to make an audit record different from the data sent (ignoring covert channels).