how crypto fails in practice
play

HOW CRYPTO FAILS IN PRACTICE GRAD SEC OCT 31 2017 TODAYS PAPERS - PowerPoint PPT Presentation

HOW CRYPTO FAILS IN PRACTICE GRAD SEC OCT 31 2017 TODAYS PAPERS POOR PROGRAMING CryptoLint tool to perform static analysis on Android apps to detect how they are using crypto libraries CRYPTO MISUSE IN ANDROID APPS 15,134 apps


  1. LEAF message structure Session key 80 bits Other 
 variables The other Clipper chip also has the Global Family key Unit Key Skipjack Hash algorithm => Can decrypt the LEAF to obtain this triple 16 bits Unit ID Encrypted session key Hash Global family key Skipjack LEAF

  2. LEAF message structure Session key 80 bits Other 
 variables Unit Key Skipjack Hash algorithm 16 bits The other Clipper chip “verifies” the LEAF by making sure that 
 Unit ID Encrypted session key Hash the hash is correct Global family key Skipjack LEAF

  3. LEAF message structure Session key 80 bits Other 
 variables Law enforcement also has the Global Family Key Unit Key Skipjack Hash algorithm => Can decrypt the LEAF to obtain this triple 16 bits Unit ID Encrypted session key Hash Global family key Skipjack LEAF

  4. LEAF message structure Session key 80 bits Other 
 variables Unit Key Skipjack Hash algorithm 16 bits Unit ID Encrypted session key Hash Law enforcement does not have direct access 
 Global family key Skipjack to all unit keys; needs a warrant to get them Unit keys are split across two locations LEAF (one location gets a OTP, the other gets the XOR)

  5. LEAF: failure Session key 80 bits Other 
 variables Unit Key Skipjack Hash algorithm To verify the LEAF, 
 the otherClipper chip 
 16 bits only checks the hash Unit ID Encrypted session key Hash Clipper chips also allow you to 
 test a LEAF locally Global family key Skipjack LEAF

  6. LEAF: failure Session key 80 bits Other 
 variables Unit Key Skipjack Hash algorithm 16 bits Generate a random LEAF => 
 Unit ID Encrypted session key Hash 1/2 16 chance of a valid hash Unit ID Encrypted session key Hash Global family key Skipjack Validates at the other 
 But law enforcement will just 
 Clipper chip (so it will 
 see random ID & key LEAF decrypt messages)

  7. USEFUL TOOL: ZMAP Goal : port-scan the entire Internet 
 in less than an hour Approaches: Non-blocking, stateless ⟹ Highly parallelizable Randomize addresses ⟹ Avoid takedown notices Datasets : Rapid7, censys.io

  8. UNSAFE OPTIMIZATIONS TLS session ticket resumption Session ticket: session keys and 
 other data to resume the session Server sends an “opaque” ticket 
 (encrypted with the Session Ticket 
 Encryption Key, STEK) Client sends the encrypted session 
 ticket during handshake; server uses 
 the STEK to recover it and pick up 
 in one round-trip of communication

  9. UNSAFE OPTIMIZATIONS Incentive to hold onto STEKs (lower RTTs) But they’re holding onto them long enough 
 for nation-states to recover them

  10. UNSAFE OPTIMIZATIONS Incentive to hold onto STEKs (lower RTTs) But they’re holding onto them long enough 
 for nation-states to recover them

  11. POOR CERTIFICATE MANAGEMENT

  12. Heartbleed OpenSSL

  13. Heartbleed “hi” 2 OpenSSL

  14. Heartbleed “hi” 2 OpenSSL “hi”

  15. Heartbleed OpenSSL

  16. Heartbleed “hi” 22 OpenSSL

  17. Heartbleed “hi” 22 OpenSSL “hi” + 20B from memory < 2 16

  18. Heartbleed “hi” 22 OpenSSL “hi” + 20B from memory < 2 16 Potentially reveals user data and private keys Heartbleed exploits were undetectable

  19. Why study Heartbleed? Akamai Discovered patched Publicly announced 03/21 04/02 04/07

  20. Why study Heartbleed? Akamai Akamai Discovered Discovered patched patched Publicly announced Publicly announced 03/21 03/21 04/02 04/02 04/07 04/07 Every vulnerable website should have: Patched Revoked Reissued 1 2 3

  21. Why study Heartbleed? Akamai Akamai Discovered Discovered patched patched Publicly announced Publicly announced 03/21 03/21 04/02 04/02 04/07 04/07 Every vulnerable website should have: Patched Revoked Reissued 1 2 3 Heartbleed is a natural experiment: 
 How quickly and thoroughly do administrators act?

  22. Dataset Rapid7 data 22M certs (~ 1 /wk for 6mos)

  23. Dataset 2.8M certs Alexa 
 Top- 1 M Rapid7 filter data CAs 22M certs (~ 1 /wk for 6mos) 9k certs

  24. Dataset 2.8M certs Alexa 
 Top- 1 M Rapid7 filter Leaf Set validate data CAs 22M certs 628k certs (~ 1 /wk for 6mos) 165k domains 9k certs

  25. Dataset 2.8M certs Alexa 
 Top- 1 M Rapid7 filter Leaf Set validate data CAs 22M certs 628k certs (~ 1 /wk for 6mos) 165k domains 9k certs • Download CRLs • Detect vulnerability • Identify Heartbleed-induced reissues & revocations

  26. Dataset 2.8M certs Alexa 
 Top- 1 M Rapid7 filter Leaf Set validate data CAs 22M certs 628k certs (~ 1 /wk for 6mos) 165k domains 9k certs • Download CRLs • Detect vulnerability • Identify Heartbleed-induced reissues & revocations

  27. Prevalence and patch rates 0.6 Vulnerable to Heartbleed Was ever vulnerable Was ever vulnerable Fraction of Domains Still vulnerable Still vulnerable after 3 weeks 0.5 0.4 0.3 0.2 0.1 0 0 200000 400000 600000 800000 1e+06 Alexa Site Rank (bins of 1000)

  28. Prevalence and patch rates 0.6 Vulnerable to Heartbleed Was ever vulnerable Was ever vulnerable Fraction of Domains Still vulnerable Still vulnerable after 3 weeks 0.5 0.4 0.3 0.2 0.1 0 0 200000 400000 600000 800000 1e+06 Alexa Site Rank (bins of 1000)

  29. Prevalence and patch rates 0.6 Vulnerable to Heartbleed Was ever vulnerable Was ever vulnerable Fraction of Domains Still vulnerable Still vulnerable after 3 weeks 0.5 0.4 0.3 0.2 0.1 0 0 200000 400000 600000 800000 1e+06 Alexa Site Rank (bins of 1000) Patching rates are mostly positive 
 Only ~7% had not patched within 3 weeks

  30. How quickly were certs revoked? 1200 Number of Domains/Day 1000 800 600 400 200 0 03/01 03/08 03/15 03/22 03/29 04/05 04/12 04/19 04/26 Date

  31. How quickly were certs revoked? 1200 Number of Domains/Day 1000 800 600 400 200 0 03/01 03/08 03/15 03/22 03/29 04/05 04/12 04/19 04/26 Date Reaction ramps up quickly

  32. How quickly were certs revoked? 1200 Number of Domains/Day 1000 800 600 400 200 0 03/01 03/08 03/15 03/22 03/29 04/05 04/12 04/19 04/26 Date Reaction ramps up quickly

  33. How quickly were certs revoked? 1200 Number of Domains/Day 1000 Weekends 800 600 400 200 0 03/01 03/08 03/15 03/22 03/29 04/05 04/12 04/19 04/26 Date Reaction ramps up quickly Security takes the weekends off

  34. Certificate update rates 3 wks 1 Frac. of Vulnerable Certs not Revoked/Reissued 0.95 Not revoked 0.9 0.85 0.8 0.75 Not reissued 0.7 0.65 0.6 04/07 04/21 05/05 05/19 06/02 06/16 06/30 07/14 07/28 Date

  35. Certificate update rates 3 wks 1 Frac. of Vulnerable Certs not Revoked/Reissued 0.95 Not revoked 0.9 0.85 0.8 0.75 Not reissued 0.7 0.65 0.6 04/07 04/21 05/05 05/19 06/02 06/16 06/30 07/14 07/28 Date

  36. Certificate update rates 3 wks 1 Frac. of Vulnerable Certs not Revoked/Reissued 0.95 Not revoked 0.9 0.85 0.8 0.75 Not reissued 0.7 0.65 0.6 04/07 04/21 05/05 05/19 06/02 06/16 06/30 07/14 07/28 Date

  37. Certificate update rates 3 wks 1 Frac. of Vulnerable Certs not Revoked/Reissued 0.95 Not revoked 0.9 0.85 0.8 0.75 Not reissued 0.7 0.65 0.6 04/07 04/21 05/05 05/19 06/02 06/16 06/30 07/14 07/28 Date Similar pattern to patches: 
 Exponential drop-off, then levels out After 3 weeks: 13% Revoked 27% Reissued

  38. Reissue ⇒ New key? Reissued with the Same Key Fraction of New Certificates 0.6 0.5 0.4 0.3 0.2 0.1 All reissues Heartbleed-induced reissues 0 11/2013 12/2013 01/2014 02/2014 03/2014 04/2014 05/2014 Date of Birth

  39. Reissue ⇒ New key? Reissued with the Same Key Fraction of New Certificates 0.6 0.5 0.4 0.3 0.2 0.1 All reissues Heartbleed-induced reissues 0 11/2013 12/2013 01/2014 02/2014 03/2014 04/2014 05/2014 Date of Birth

  40. Reissue ⇒ New key? Reissued with the Same Key Fraction of New Certificates 0.6 0.5 0.4 0.3 0.2 0.1 All reissues Heartbleed-induced reissues 0 11/2013 12/2013 01/2014 02/2014 03/2014 04/2014 05/2014 Date of Birth Reissuing the same key is common practice 4.1% Heartbleed-induced

  41. Can we wait for expiration? 1 0.8 0.6 CDF 0.4 0.2 0 0 1 2 3 4 5 6 Years of Remaining Validity

  42. Can we wait for expiration? Vulnerable but not revoked 1 0.8 0.6 CDF 0.4 0.2 0 0 1 2 3 4 5 6 Years of Remaining Validity

  43. Can we wait for expiration? Vulnerable but not revoked 1 0.8 0.6 CDF ~40% did not 
 0.4 expire after 
 one year 0.2 0 0 1 2 3 4 5 6 Years of Remaining Validity

  44. Can we wait for expiration? Vulnerable but not revoked 1 0.8 ~8% of vulnerable certs still unexpired 0.6 CDF ~40% did not 
 0.4 expire after 
 one year 0.2 0 0 1 2 3 4 5 6 Years of Remaining Validity

  45. Can we wait for expiration? Vulnerable but not revoked 1 0.8 ~8% of vulnerable certs still unexpired 0.6 CDF ~40% did not 
 0.4 expire after 
 one year 0.2 0 0 1 2 3 4 5 6 Years of Remaining Validity We may be dealing with Heartbleed for years

  46. Security is an economic concern Browser Website Certificate Certificate Certificate Authority

  47. Security is an economic concern Browser Website Certificate Certificate Revoked? Certificate Authority

  48. Security is an economic concern Browser Website Certificate Certificate Revoked? Certificate Authority Browsers face tension between security and page load times CAs face tension between security and bandwidth costs

  49. OCSP Stapling Browser Website Certificate Certificate Certificate Authority ✗ ✗ ✗ ✗ ✗ Certificate Certificate Certificate Certificate Certificate ✗ ✗ ✗ ✗ ✗ Certificate Certificate Certificate Certificate Certificate

  50. OCSP Stapling Browser Website Certificate Certificate ✔ Certific Certificate Authority ✗ ✗ ✗ ✗ ✗ Certificate Certificate Certificate Certificate Certificate ✗ ✗ ✗ ✗ ✗ Certificate Certificate Certificate Certificate Certificate

  51. OCSP Stapling Browser Website Certificate Certificate ✔ Certific Certificate Authority ✗ ✗ ✗ ✗ ✗ Certificate Certificate Certificate Certificate Certificate ✗ ✗ ✗ ✗ ✗ Certificate Certificate Certificate Certificate Certificate But OCSP Stapling rarely activated by admins: 
 Our scan: 3% of normal certs; 2% of EV certs

  52. Testing browser behavior • Browsers should support all major protocols Revocation 
 protocols • CRLs, OCSP , OCSP stapling • Browsers should reject certs they cannot check Availability of 
 revocation info • E.g., because the OCSP server is down • Browsers should reject a cert if any on the chain fail Chain 
 lengths • Leaf, intermediate(s), root

  53. Testing browser behavior • Browsers should support all major protocols Revocation 
 protocols • CRLs, OCSP , OCSP stapling • Browsers should reject certs they cannot check Availability of 
 revocation info • E.g., because the OCSP server is down • Browsers should reject a cert if any on the chain fail Chain 
 lengths • Leaf, intermediate(s), root Root … Intermediate Intermediate Leaf

  54. Testing browser behavior • Browsers should support all major protocols Revocation 
 protocols • CRLs, OCSP , OCSP stapling • Browsers should reject certs they cannot check Availability of 
 revocation info • E.g., because the OCSP server is down • Browsers should reject a cert if any on the chain fail Chain 
 lengths • Leaf, intermediate(s), root signs Root … Intermediate Intermediate Leaf

  55. Testing browser behavior • Browsers should support all major protocols Revocation 
 protocols • CRLs, OCSP , OCSP stapling • Browsers should reject certs they cannot check Availability of 
 revocation info • E.g., because the OCSP server is down • Browsers should reject a cert if any on the chain fail Chain 
 lengths • Leaf, intermediate(s), root signs Root … Intermediate Intermediate Leaf

  56. Testing browser behavior • Browsers should support all major protocols Revocation 
 protocols • CRLs, OCSP , OCSP stapling • Browsers should reject certs they cannot check Availability of 
 revocation info • E.g., because the OCSP server is down • Browsers should reject a cert if any on the chain fail Chain 
 lengths • Leaf, intermediate(s), root signs Root … Intermediate Intermediate Leaf

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend