Slide 1

Slide 1 text

STARTTLS Everywhere Peter Eckersley, Jacob Hoffman-Andrews, Yan Zhu Electronic Frontier Foundation {pde, jsha,yan}@eff.org

Slide 2

Slide 2 text

SMTP email transmission is mostly insecure

Slide 3

Slide 3 text

ngrep -i password tcp port 25

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Threat model 1. passive attackers 2. passive attacks w/ key compromise 3. active attackers 4. sophisticated active attacks

Slide 7

Slide 7 text

Threat model 1. passive attackers turn on STARTTLS 2. passive attacks w/ key compromise 3. active attackers 4. sophisticated active attacks

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

STARTTLS in/out of Gmail

Slide 12

Slide 12 text

It'd be nice to stretch that graph further back in time https://github.com/EFForg/smtp-tls-history. git Email [email protected] if you'd like to run that on a large set of historical headers

Slide 13

Slide 13 text

2. passive attacks w/ sophisticated assistance (key theft)

Slide 14

Slide 14 text

What's the easiest way for eavesdroppers to read billions of encrypted email transfers?

Slide 15

Slide 15 text

Session key 1 Session key 2 Session key 3 Session key 4 Normal TLS: session keys linked to long-term private keys Sender's public key Receiver's public key

Slide 16

Slide 16 text

...steal the private keys Image: betty le bon

Slide 17

Slide 17 text

Session key 1 Session key 2 Session key 3 Session key 4 “Perfect” Forward Secrecy: Extra crypto unbinds session keys from private keys Sender's public key Receiver's public key ECD H ECD H

Slide 18

Slide 18 text

How do we turn on Perfect Forward Secrecy correctly for SMTP?

Slide 19

Slide 19 text

Simple answer: - support TLS v1.2 - protect against downgrade attacks

Slide 20

Slide 20 text

Need a new policy mechanism to do that!

Slide 21

Slide 21 text

3. active network attacks

Slide 22

Slide 22 text

Unfortunately, active attacks are really easy...

Slide 23

Slide 23 text

How does SMTP-TLS work?

Slide 24

Slide 24 text

One side say “STARTTLS”, the other replies “STARTTLS”

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

The sender will fall back to insecure SMTP

Slide 27

Slide 27 text

Attackers can also “man in the middle”, speaking TLS themselves

Slide 28

Slide 28 text

Source: Facebook, May 2014

Slide 29

Slide 29 text

Threat model 1. passive attackers turn on STARTTLS 2. passive attacks w/ key compromise 3. active attackers ??? 4. sophisticated active attacks

Slide 30

Slide 30 text

On the Web, we have the HSTS header for this

Slide 31

Slide 31 text

A quick pragmatic solution: STARTTLS Everywhere

Slide 32

Slide 32 text

git clone https://github.com/EFForg/starttls-everywhere.git

Slide 33

Slide 33 text

Main concepts: - Recipient security policy framework - Supports missing functionality - Start with a centralized database - Multi-channel distribution

Slide 34

Slide 34 text

Related work DANE: fully distributed, uses DNSSEC SPF: Applies to senders, not receivers

Slide 35

Slide 35 text

Scenario 1 (prototype, work in progress) git clone https://github.com/EFForg/starttls-everywhere.git # Run our script, which does: while sleep 1d ; do git pull git tag --verify $LATEST_VERSION || exit ./MTAConfigGenerator.py --edit /etc/postfix ./FailureNotificationDaemon.py & done

Slide 36

Slide 36 text

Scenario 2 (common unix MTAs) apt-get install starttls-everywhere

Slide 37

Slide 37 text

Scenario 3 (large scale production) wget https://eff.org/starttls-everywhere/latest-db.json wget https://eff.org/starttls-everywhere/latest-db.sig gpg --verify latest-db.sig latest-db.json || error-script MTAConfigGenerator.py latest-db.json -o mta-policy.cf your-deploy-script mta-policy.cf

Slide 38

Slide 38 text

Policy database is a set of JSON blobs:

Slide 39

Slide 39 text

// These match on the MX domain. "*.yahoodns.net": { "require-valid-certificate": true, } "*.eff.org": { "require-tls": true, "min-tls-version": "TLSv1.1", "enforce-mode": "enforce" "accept-spki-hashes": [ "sha1/5R0zeLx7EWRxqw6HRlgCRxNLHDo=", "sha1/YlrkMlC6C4SJRZSVyRvnvoJ+8eM=" ] } "*.google.com": { "require-valid-certificate": true, "min-tls-version": "TLSv1.1", "enforce-mode": "log-only", "error-notification": "https://google.com/post/reports/here" }, } // Since the MX lookup is not secure, we list valid responses for each // address domain, to protect against DNS spoofing. "acceptable-mxs": { "yahoo.com": { "accept-mx-domains": ["*.yahoodns.net"] } "gmail.com": { "accept-mx-domains": [”*.gmail.com”, "*.google.com", ”*.googlemail.com”] # hypothetical }

Slide 40

Slide 40 text

demo time! https://eff.org/starttls

Slide 41

Slide 41 text

https://eff.org/join https://eff.org/starttls EFF depends on your support!

Slide 42

Slide 42 text

No content