Applica.ons of Crypto: SSL/TLS Slides credit: Dan Boneh, Doug - - PowerPoint PPT Presentation

applica ons of crypto ssl tls
SMART_READER_LITE
LIVE PREVIEW

Applica.ons of Crypto: SSL/TLS Slides credit: Dan Boneh, Doug - - PowerPoint PPT Presentation

Computer Security Course. Dawn


slide-1
SLIDE 1

Dawn ¡Song ¡

¡Applica.ons ¡of ¡Crypto: ¡SSL/TLS ¡

Computer ¡Security ¡Course. ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Dawn ¡Song ¡

Slides credit: Dan Boneh, Doug Tygar, David Wagner

slide-2
SLIDE 2

Overview ¡

  • Last ¡lecture ¡

– Cryptographic ¡hash ¡func.on ¡ – HMAC ¡ – Public-­‑key ¡encryp.on ¡ – Digital ¡signature ¡

  • This ¡lecture ¡

– Cer.ficate ¡ – SSL/TLS ¡ – Passwords ¡

slide-3
SLIDE 3

Review: ¡Applica.ons ¡of ¡Digital ¡Signatures ¡

  • SoIware ¡distribu.on ¡
  • How ¡can ¡we ¡get ¡MicrosoI’s ¡public ¡key? ¡

Windows ¡Update ¡File ¡

MicrosoI’s ¡signature ¡on ¡file ¡

slide-4
SLIDE 4

Certificates: bind Bob’s ID to his PK

How ¡does ¡Alice ¡(browser) ¡ ¡obtain ¡Bob’s ¡public ¡key ¡ ¡pkBob ¡ ¡? ¡

Cer.ficate ¡ Authority (CA) ¡ pk ¡ ¡ ¡ ¡ ¡and ¡ proof ¡“I ¡am ¡Bob” ¡ Browser ¡ Alice ¡ SKCA ¡ check ¡ proof ¡ issue ¡Cert ¡with ¡SKCA ¡: ¡ Bob’s ¡ ¡ key ¡is ¡pk ¡ Bob’s ¡ ¡ key ¡is ¡pk ¡ generate ¡ ¡ ¡ ¡(sk,pk) ¡ ¡ Server ¡Bob ¡ PKCA ¡ verify ¡ cert ¡ PKCA ¡

slide-5
SLIDE 5

Sample certificate:

slide-6
SLIDE 6

Cer.ficate ¡Issuance ¡Woes ¡

Wrong ¡issuance: ¡ 2011: ¡ ¡ ¡Comodo ¡and ¡DigiNotar ¡CAs ¡hacked, ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡incorrectly ¡issue ¡certs ¡for ¡ ¡ ¡ ¡gmail.com, ¡ ¡ ¡yahoo.com, ¡ ¡ ¡and ¡many ¡others ¡

slide-7
SLIDE 7

What ¡to ¡do? ¡

Ask ¡some ¡other ¡trusted ¡3rd ¡party: ¡

  • ¡examples: ¡ ¡ ¡ ¡Perspec.ves ¡[WAP’08] ¡, ¡ ¡Google ¡cer.ficate ¡catalog, ¡ ¡DANE ¡

client-hello server-hello and cert cert hash (DNSsec) d a t e G

  • g

l e f i r s t s a w c e r t , d a t e G

  • g

l e l a s t s a w c e r t , # t i m e s

certs.googlednstest.com

Alice Bob

slide-8
SLIDE 8

Cer.ficate ¡revoca.on ¡

What ¡happens ¡if ¡Bob ¡loses ¡his ¡secret ¡key ¡sk? ¡

  • Cer.ficate ¡on ¡ ¡ ¡pkbob ¡ ¡ ¡must ¡be ¡revoked ¡

Revoca.on ¡methods: ¡

  • Expira.on: ¡ ¡ ¡ ¡cer.ficates ¡ac.ve ¡in ¡fixed ¡.me ¡window ¡(one ¡year) ¡
  • Cer.ficate ¡Revoca.on ¡Lists ¡(CRLs): ¡

¡ ¡CA ¡publishes ¡a ¡list ¡of ¡revoked ¡cer.ficates ¡

  • Online ¡Cer.ficate ¡Status ¡Protocol ¡(OCSP) ¡
slide-9
SLIDE 9

Cer.ficate ¡Revoca.on ¡Lists ¡(CRLs) ¡

CA periodically publishes the serial # of revoked certs.

  • List is signed by the CA

When browser receives cert.:

  • Download latest CRL and reject cert. if serial # is on list

Problems:

  • CRLs can get large
  • May reveal whose cert. is revoked
slide-10
SLIDE 10

Online ¡Cer.ficate ¡Status ¡Protocol ¡(OCSP) ¡

client-hello server-hello and cert

OCSP responder

Alice Bob

Browser accepts cert. if responder says valid (or if no response) Problems:

  • Slows down HTTPS session setup
  • Let responder track users

(see OCSP stapling for a solution)

slide-11
SLIDE 11

Key ¡Exchange ¡

  • Alice ¡and ¡Bob ¡want ¡to ¡use ¡symmetric-­‑key ¡

encryp.on ¡

  • How ¡can ¡they ¡establish ¡a ¡secret ¡key? ¡

– Public-­‑key ¡encryp.on ¡ – Diffie-­‑Hellman ¡key ¡exchange ¡

slide-12
SLIDE 12

Diffie-­‑Hellman ¡key ¡exchange ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Alice ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Bob ¡

gA mod p gB mod p Prime p, number g, 0< g < p (gA)B mod p (gB)A mod p

slide-13
SLIDE 13

Man ¡in ¡the ¡middle ¡acack ¡

Alice ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡MITM ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Bob ¡

Encrypted channel Encrypted channel

gA mod p gB mod p gS mod p gT mod p gAT mod p gBS mod p

slide-14
SLIDE 14

Applica.on ¡of ¡crypto ¡to ¡secure ¡Internet ¡communica.ons ¡

slide-15
SLIDE 15

SSL ¡session ¡setup ¡ C

ClientHello ServerHello, [Certificate], [ServerKeyExchange], [CertificateRequest], ServerHelloDone

S

[Certificate], ClientKeyExchange, [CertificateVerify] Finished switch to negotiated cipher Finished switch to negotiated cipher

Client Server

RSA secret key

slide-16
SLIDE 16

Abstract ¡SSL ¡ ¡ ¡(simplified) ¡

ClientHello: nonceC ServerHello: cert, nonceS

Client Server

Finished Finished

RSA secret key

ClientKeyExchange: c ← E(pk, PreK)

pick random 48 byte PreK decrypt c to get PreK

session-keys ← PRF( PreK, nonceC , nonceS )

slide-17
SLIDE 17

SSL ¡Problems ¡

  • SSL ¡2.0 ¡broken ¡
  • SSL ¡3.0 ¡broken ¡
  • TLS ¡1.0 ¡broken ¡

– BEAST: ¡Browser ¡Exploit ¡Against ¡SSL/TLS ¡Tool ¡

slide-18
SLIDE 18
slide-19
SLIDE 19
slide-20
SLIDE 20

Passwords ¡

  • The ¡most ¡popular ¡authen.ca.on ¡method ¡
  • Security ¡& ¡Usability ¡issues ¡

– Long ¡and ¡random ¡passwords ¡are ¡harder ¡to ¡ remember ¡ – Users ¡select ¡memorable ¡passwords, ¡which ¡are ¡ easy ¡to ¡guess ¡ – Users ¡reuse ¡passwords ¡across ¡mul.ple ¡sites ¡

slide-21
SLIDE 21

Acacks ¡to ¡Passwords ¡

  • Online ¡guessing ¡acacks ¡
  • Social ¡engineering ¡and ¡phishing ¡
  • Eavesdropping ¡
  • Client-­‑side ¡malware ¡
  • Server ¡compromise ¡ ¡
slide-22
SLIDE 22

Online ¡Guessing ¡Acacks ¡

  • Repeatedly ¡try ¡logging ¡in ¡with ¡many ¡different ¡guesses ¡

– 123456 ¡ – password ¡ – 12345678 ¡

  • Defenses ¡

– Rate ¡limi.ng, ¡e.g., ¡5 ¡guesses ¡in ¡one ¡day ¡ – CAPTCHAs ¡

  • Vulnerable ¡to ¡machine ¡learning ¡acacks ¡
  • Underground ¡markets ¡hire ¡human ¡workers ¡to ¡solve ¡CAPTCHAs ¡
slide-23
SLIDE 23

Social ¡Engineering ¡and ¡Phishing ¡

  • Fool ¡a ¡user ¡to ¡reveal ¡his/her ¡password ¡
  • Defenses ¡

– Educa.ng ¡users ¡ – Machine ¡learning ¡to ¡detect ¡phishing ¡sites ¡

slide-24
SLIDE 24

Eavesdropping ¡

  • If ¡plaintext ¡passwords ¡are ¡sent ¡from ¡the ¡client ¡

to ¡the ¡server, ¡they ¡can ¡be ¡eavesdropped ¡on ¡ internet, ¡e.g., ¡public ¡Wi-­‑Fi. ¡

  • Defenses ¡

– SSL! ¡

slide-25
SLIDE 25

Client-­‑side ¡Malware ¡

  • Keyloggers ¡to ¡capture ¡passwords ¡ ¡
  • Virtual ¡keyboard ¡

– Malware ¡records ¡the ¡loca.ons ¡of ¡mouse ¡clicks ¡and ¡ take ¡screen ¡shots ¡ ¡

  • Very ¡difficult ¡to ¡defend ¡in ¡this ¡threat ¡model ¡
slide-26
SLIDE 26

Server ¡Compromise ¡ ¡

  • Get ¡a ¡copy ¡of ¡the ¡password ¡database ¡

– 32M ¡passwords ¡from ¡Rockyou ¡in ¡2009 ¡

  • Do ¡not ¡store ¡user ¡passwords ¡in ¡plaintext ¡
  • Use ¡cryptographic ¡hash ¡func.on ¡and ¡salt ¡

– Store ¡(username, ¡salt, ¡H(salt, ¡password)) ¡ – Offline ¡password ¡guessing: ¡test ¡guesses ¡on ¡the ¡acacker’s ¡

  • wn ¡computer ¡

– Use ¡slow ¡hash ¡func.on ¡to ¡slow ¡down ¡offline ¡password ¡ guessing ¡