Upgrade to Pro — share decks privately, control downloads, hide ads and more …

STARTTLS Everywhere

Yan!
August 05, 2014

STARTTLS Everywhere

Yan Zhu and Jacob Hoffman-Andrews. PasswordsCon 2014.

Yan!

August 05, 2014
Tweet

Other Decks in Programming

Transcript

  1. Threat model 1. passive attackers 2. passive attacks w/ key

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

    attacks w/ key compromise 3. active attackers 4. sophisticated active attacks
  3. 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
  4. 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
  5. 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
  6. Threat model 1. passive attackers turn on STARTTLS 2. passive

    attacks w/ key compromise 3. active attackers ??? 4. sophisticated active attacks
  7. Main concepts: - Recipient security policy framework - Supports missing

    functionality - Start with a centralized database - Multi-channel distribution
  8. 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
  9. 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
  10. // 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 }