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

how crypto fails in practice
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

HOW CRYPTO FAILS
 IN PRACTICE

GRAD SEC

OCT 31 2017

slide-2
SLIDE 2

TODAY’S PAPERS

slide-3
SLIDE 3

POOR PROGRAMING

CryptoLint tool to perform static
 analysis on Android apps to detect
 how they are using crypto libraries

slide-4
SLIDE 4

15,134 apps from Google play used crypto; Analyzed 11,748 of them

CRYPTO MISUSE IN ANDROID APPS

slide-5
SLIDE 5

48% 31% 17% 16% 14% 12%

15,134 apps from Google play used crypto; Analyzed 11,748 of them

CRYPTO MISUSE IN ANDROID APPS

slide-6
SLIDE 6

48% 31% 17% 16% 14% 12%

15,134 apps from Google play used crypto; Analyzed 11,748 of them

CRYPTO MISUSE IN ANDROID APPS

slide-7
SLIDE 7

NEVER use ECB (but over 50% of Android apps do)

slide-8
SLIDE 8
  • BouncyCastle is a library that conforms to Java’s

Cipher interface:

  • Java documentation specifies:

Cipher c =
 Cipher.getInstance(“AES/CBC/PKCS5Padding”); 
 // Ultimately end up wrapping a ByteArrayOutputStream
 // in a CipherOutputStream

BOUNCYCASTLE DEFAULTS

slide-9
SLIDE 9
slide-10
SLIDE 10
slide-11
SLIDE 11

48% 31% 17% 16% 14% 12%

15,134 apps from Google play used crypto; Analyzed 11,748 of them

CRYPTO MISUSE IN ANDROID APPS

slide-12
SLIDE 12

48% 31% 17% 16% 14% 12%

15,134 apps from Google play used crypto; Analyzed 11,748 of them

CRYPTO MISUSE IN ANDROID APPS

A failure of the programmers to know the tools they use A failure of library writers to provide safe defaults

slide-13
SLIDE 13
  • Do not roll your own cryptographic mechanisms
  • Takes peer review
  • Apply Kerkhoff’s principle
  • Do not misuse existing crypto
  • Do not even implement the underlying crypto

Avoid shooting yourself in the foot:

MISUSING CRYPTO

slide-14
SLIDE 14
  • Not talking about creating a brand new crypto scheme,

just implementing one that’s already widely accepted and used.

  • Kerkhoff’s principle: these are all open standards; should

be implementable.

  • Potentially buggy/incorrect code, but so might be others’

implementations (viz. OpenSSL bugs, poor defaults in Bouncy castles, etc.)

  • So why not implement it yourself?

WHY NOT IMPLEMENT AES/RSA YOURSELF?

slide-15
SLIDE 15
  • Cryptography concerns the theoretical difficulty in

breaking a cipher

Cryptographic processing
 (Encrypt/decrypt/sign/etc.) Secret keys

Input
 message Output
 message

SIDE-CHANNEL ATTACKS

slide-16
SLIDE 16
  • Cryptography concerns the theoretical difficulty in

breaking a cipher

Cryptographic processing
 (Encrypt/decrypt/sign/etc.) Secret keys

Input
 message Output
 message

  • But what about the information that a particular

implementation could leak?

  • Attacks based on these are “side-channel attacks”

SIDE-CHANNEL ATTACKS

slide-17
SLIDE 17
  • Cryptography concerns the theoretical difficulty in

breaking a cipher

Cryptographic processing
 (Encrypt/decrypt/sign/etc.) Secret keys

Input
 message Output
 message

Leaked information


  • Power consumption

  • Electromagnetic radiation
  • Other (Timing, errors, etc.)
  • But what about the information that a particular

implementation could leak?

  • Attacks based on these are “side-channel attacks”

SIDE-CHANNEL ATTACKS

slide-18
SLIDE 18
  • Interpret power traces taken during a cryptographic
  • peration
  • Simple power analysis can reveal the sequence of

instructions executed

SIMPLE POWER ANALYSIS (SPA)

slide-19
SLIDE 19

Overall operation clearly visible:
 Can identify the 16 rounds of DES

SPA ON DES

slide-20
SLIDE 20

Overall operation clearly visible:
 Can identify the 16 rounds of DES

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

SPA ON DES

slide-21
SLIDE 21

Specific instructions are also discernible

SPA ON DES

slide-22
SLIDE 22

Specific instructions are also discernible Jump taken No jump taken

SPA ON DES

slide-23
SLIDE 23

HypotheticalEncrypt(msg, key) { for(int i=0; i < key.len(); i++) {
 if(key[i] == 0) // branch 0 else // branch 1 } }

HIGH-LEVEL IDEA

slide-24
SLIDE 24

HypotheticalEncrypt(msg, key) { for(int i=0; i < key.len(); i++) {
 if(key[i] == 0) // branch 0 else // branch 1 } } What if branch 0 had, e.g.,
 a jmp that brand 1 didn’t?

HIGH-LEVEL IDEA

slide-25
SLIDE 25

HypotheticalEncrypt(msg, key) { for(int i=0; i < key.len(); i++) {
 if(key[i] == 0) // branch 0 else // branch 1 } } What if branch 0 had, e.g.,
 a jmp that brand 1 didn’t? Implementation issue: If the execution path depends

  • n the inputs (key/data), then SPA can reveal keys

HIGH-LEVEL IDEA

slide-26
SLIDE 26

HypotheticalEncrypt(msg, key) { for(int i=0; i < key.len(); i++) {
 if(key[i] == 0) // branch 0 else // branch 1 } } What if branch 0 had, e.g.,
 a jmp that brand 1 didn’t? Implementation issue: If the execution path depends

  • n the inputs (key/data), then SPA can reveal keys

What if branch 0

HIGH-LEVEL IDEA

slide-27
SLIDE 27

HypotheticalEncrypt(msg, key) { for(int i=0; i < key.len(); i++) {
 if(key[i] == 0) // branch 0 else // branch 1 } } What if branch 0 had, e.g.,
 a jmp that brand 1 didn’t? Implementation issue: If the execution path depends

  • n the inputs (key/data), then SPA can reveal keys

What if branch 0

  • took longer? (timing attacks)

HIGH-LEVEL IDEA

slide-28
SLIDE 28

HypotheticalEncrypt(msg, key) { for(int i=0; i < key.len(); i++) {
 if(key[i] == 0) // branch 0 else // branch 1 } } What if branch 0 had, e.g.,
 a jmp that brand 1 didn’t? Implementation issue: If the execution path depends

  • n the inputs (key/data), then SPA can reveal keys

What if branch 0

  • took longer? (timing attacks)
  • gave off more heat?

HIGH-LEVEL IDEA

slide-29
SLIDE 29

HypotheticalEncrypt(msg, key) { for(int i=0; i < key.len(); i++) {
 if(key[i] == 0) // branch 0 else // branch 1 } } What if branch 0 had, e.g.,
 a jmp that brand 1 didn’t? Implementation issue: If the execution path depends

  • n the inputs (key/data), then SPA can reveal keys

What if branch 0

  • took longer? (timing attacks)
  • gave off more heat?
  • made more noise?


HIGH-LEVEL IDEA

slide-30
SLIDE 30
  • SPA just visually inspects a single run
  • DPA runs iteratively and reactively
  • Get multiple samples
  • Based on these, construct new plaintext messages as

inputs, and repeat

DIFFERENTIAL POWER ANALYSIS (DPA)

slide-31
SLIDE 31
  • Hide information by making the execution paths

depend on the inputs as little as possible

  • Have to give up some optimizations that depend on

particular bit values in keys

  • Some Chinese Remainder Theorem (CRT) optimizations

permitted remote timing attacks on SSL servers

  • The crypto community should seek to design

cryptosystems under the assumption that some information is going to leak

MITIGATING SUCH ATTACKS

slide-32
SLIDE 32

POOR POLICIES FROM GOVERNMENTS

Exploits export-grade encryption 1024-bit and smaller feasibly broken Logjam downgrades to export-grade (512)

slide-33
SLIDE 33

Clipper chip

A lesson in poorly designed protocols Goal:
 Confidentiality Support encrypted communication
 between devices Permit law enforcement to obtain
 “session keys” with a warrant Goal:
 Key escrow

Clipper Clipper

slide-34
SLIDE 34

Clipper chip: Design

Tamper-proof hardware Skipjack
 encryption algorithm

Hardware that is difficult to introspect (e.g., extract keys), alter (change the algorithms),

  • r impersonate

Diffie-Hellman
 key exchange LEAF generation & validation Skipjack Keys


Unit key
 Global family key

slide-35
SLIDE 35

Clipper chip: Design

Tamper-proof hardware Skipjack
 encryption algorithm

Block cipher designed by the
 NSA, originally classified
 SECRET. (Violates Kirchhoff’s principle) 
 Broken within one day of declassification. 80-bit key; similar algorithm to DES (also broken)

Diffie-Hellman
 key exchange LEAF generation & validation Skipjack Keys


Unit key
 Global family key

slide-36
SLIDE 36

Clipper chip: Design

Tamper-proof hardware Skipjack
 encryption algorithm

Assigned when the hardware
 is manufactured. Unit key is unique to this unit
 in particular (each Clipper chip
 also has a unit ID). Global family key is the same
 across many units.

Diffie-Hellman
 key exchange LEAF generation & validation Skipjack Keys


Unit key
 Global family key

slide-37
SLIDE 37

Clipper chip: Design

Tamper-proof hardware Skipjack
 encryption algorithm

Used for establishing a
 (symmetric) session key Session keys are ephemeral (e.g., last only for a given connection, transaction, etc.) General properties about session keys:

  • Compromising one session key


does not compromise others

  • Compromising a long-term key


should not compromise past
 session keys (forward secrecy)

Diffie-Hellman
 key exchange LEAF generation & validation Skipjack Keys


Unit key
 Global family key

slide-38
SLIDE 38

Clipper chip: Design

Tamper-proof hardware Skipjack
 encryption algorithm Diffie-Hellman
 key exchange LEAF generation & validation Skipjack Keys


Unit key
 Global family key

LEAF
 (Law Enforcement Access Field)

To permit wiretapping, law
 enforcement needs to be able
 to extract session keys, but


  • nly has access to what is sent


during communication Idea: send data that has enough
 info to allow law enforcement
 to extract keys (but not any


  • ther eavesdropper).
slide-39
SLIDE 39

LEAF protocol design

Clipper Clipper

  • 1. DH key exchange
  • 2. Each send LEAF packet

The Clipper chips will not decrypt until
 it has received a valid LEAF packet

  • 3. Send data encrypted


with the session key Law enforcement sees all packets.

  • Cannot infer key from DH key exchange
  • Can infer it from the LEAF packet
slide-40
SLIDE 40

LEAF message structure

Session key 80 bits Skipjack Unit Key Hash algorithm 16 bits Encrypted session key Hash Unit ID Global family key Skipjack LEAF Other
 variables

slide-41
SLIDE 41

LEAF message structure

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

slide-42
SLIDE 42

LEAF message structure

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

slide-43
SLIDE 43

LEAF message structure

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

slide-44
SLIDE 44

LEAF message structure

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

slide-45
SLIDE 45

LEAF: failure

Session key 80 bits Skipjack Unit Key Hash algorithm 16 bits Encrypted session key Hash Unit ID Global family key Skipjack LEAF Other
 variables To verify the LEAF,
 the otherClipper chip


  • nly checks the hash

Clipper chips also allow you to
 test a LEAF locally

slide-46
SLIDE 46

LEAF: failure

Session key 80 bits Skipjack Unit Key Hash algorithm 16 bits Encrypted session key Hash Unit ID Global family key Skipjack LEAF Other
 variables Encrypted session key Hash Unit ID Generate a random LEAF =>
 1/216 chance of a valid hash

Validates at the other
 Clipper chip (so it will
 decrypt messages) But law enforcement will just
 see random ID & key

slide-47
SLIDE 47

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

slide-48
SLIDE 48

UNSAFE OPTIMIZATIONS

TLS session ticket resumption Session ticket: session keys and


  • ther 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

slide-49
SLIDE 49

UNSAFE OPTIMIZATIONS

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

slide-50
SLIDE 50

UNSAFE OPTIMIZATIONS

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

slide-51
SLIDE 51
slide-52
SLIDE 52
slide-53
SLIDE 53
slide-54
SLIDE 54
slide-55
SLIDE 55

POOR CERTIFICATE MANAGEMENT

slide-56
SLIDE 56

Heartbleed

OpenSSL

slide-57
SLIDE 57

Heartbleed

OpenSSL

“hi” 2

slide-58
SLIDE 58

Heartbleed

OpenSSL

“hi” 2 “hi”

slide-59
SLIDE 59

Heartbleed

OpenSSL

slide-60
SLIDE 60

Heartbleed

OpenSSL

“hi” 22

slide-61
SLIDE 61

Heartbleed

OpenSSL

“hi” 22 “hi” +20B from memory

< 216

slide-62
SLIDE 62

Heartbleed

OpenSSL

“hi” 22 “hi” +20B from memory

< 216

Potentially reveals user data and private keys Heartbleed exploits were undetectable

slide-63
SLIDE 63

Why study Heartbleed?

03/21 04/02 04/07 Discovered Akamai patched Publicly announced

slide-64
SLIDE 64

Why study Heartbleed?

03/21 04/02 04/07 Discovered Akamai patched Publicly announced 03/21 04/02 04/07 Discovered Akamai patched Publicly announced

1

Patched

2

Revoked

3

Reissued Every vulnerable website should have:

slide-65
SLIDE 65

Why study Heartbleed?

03/21 04/02 04/07 Discovered Akamai patched Publicly announced 03/21 04/02 04/07 Discovered Akamai patched Publicly announced

1

Patched

2

Revoked

3

Reissued Every vulnerable website should have: Heartbleed is a natural experiment:
 How quickly and thoroughly do administrators act?

slide-66
SLIDE 66

Dataset

Rapid7 data

22M certs (~1/wk for 6mos)

slide-67
SLIDE 67

Dataset

Rapid7 data

22M certs (~1/wk for 6mos)

Alexa
 Top-1M

2.8M certs

CAs

9k certs

filter

slide-68
SLIDE 68

validate

Leaf Set

628k certs 165k domains

Dataset

Rapid7 data

22M certs (~1/wk for 6mos)

Alexa
 Top-1M

2.8M certs

CAs

9k certs

filter

slide-69
SLIDE 69

validate

Leaf Set

628k certs 165k domains

Dataset

Rapid7 data

22M certs (~1/wk for 6mos)

Alexa
 Top-1M

2.8M certs

CAs

9k certs

filter

  • Download CRLs
  • Detect vulnerability
  • Identify Heartbleed-induced

reissues & revocations

slide-70
SLIDE 70

validate

Leaf Set

628k certs 165k domains

Dataset

Rapid7 data

22M certs (~1/wk for 6mos)

Alexa
 Top-1M

2.8M certs

CAs

9k certs

filter

  • Download CRLs
  • Detect vulnerability
  • Identify Heartbleed-induced

reissues & revocations

slide-71
SLIDE 71

Prevalence and patch rates

0.1 0.2 0.3 0.4 0.5 0.6 200000 400000 600000 800000 1e+06 Fraction of Domains Vulnerable to Heartbleed Alexa Site Rank (bins of 1000) Was ever vulnerable Still vulnerable

Was ever vulnerable Still vulnerable after 3 weeks

slide-72
SLIDE 72

Prevalence and patch rates

0.1 0.2 0.3 0.4 0.5 0.6 200000 400000 600000 800000 1e+06 Fraction of Domains Vulnerable to Heartbleed Alexa Site Rank (bins of 1000) Was ever vulnerable Still vulnerable

Was ever vulnerable Still vulnerable after 3 weeks

slide-73
SLIDE 73

Prevalence and patch rates

0.1 0.2 0.3 0.4 0.5 0.6 200000 400000 600000 800000 1e+06 Fraction of Domains Vulnerable to Heartbleed Alexa Site Rank (bins of 1000) Was ever vulnerable Still vulnerable

Patching rates are mostly positive
 Only ~7% had not patched within 3 weeks

Was ever vulnerable Still vulnerable after 3 weeks

slide-74
SLIDE 74

How quickly were certs revoked?

200 400 600 800 1000 1200 03/01 03/08 03/15 03/22 03/29 04/05 04/12 04/19 04/26 Number of Domains/Day Date

slide-75
SLIDE 75

How quickly were certs revoked?

200 400 600 800 1000 1200 03/01 03/08 03/15 03/22 03/29 04/05 04/12 04/19 04/26 Number of Domains/Day Date

Reaction ramps up quickly

slide-76
SLIDE 76

How quickly were certs revoked?

200 400 600 800 1000 1200 03/01 03/08 03/15 03/22 03/29 04/05 04/12 04/19 04/26 Number of Domains/Day Date

Reaction ramps up quickly

slide-77
SLIDE 77

How quickly were certs revoked?

200 400 600 800 1000 1200 03/01 03/08 03/15 03/22 03/29 04/05 04/12 04/19 04/26 Number of Domains/Day Date

Reaction ramps up quickly Security takes the weekends off

Weekends

slide-78
SLIDE 78

Certificate update rates

0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 04/07 04/21 05/05 05/19 06/02 06/16 06/30 07/14 07/28

  • Frac. of Vulnerable Certs

not Revoked/Reissued Date

Not reissued Not revoked

3 wks

slide-79
SLIDE 79

Certificate update rates

0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 04/07 04/21 05/05 05/19 06/02 06/16 06/30 07/14 07/28

  • Frac. of Vulnerable Certs

not Revoked/Reissued Date

Not reissued Not revoked

3 wks

slide-80
SLIDE 80

Certificate update rates

0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 04/07 04/21 05/05 05/19 06/02 06/16 06/30 07/14 07/28

  • Frac. of Vulnerable Certs

not Revoked/Reissued Date

Not reissued Not revoked

3 wks

slide-81
SLIDE 81

Certificate update rates

0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 04/07 04/21 05/05 05/19 06/02 06/16 06/30 07/14 07/28

  • Frac. of Vulnerable Certs

not Revoked/Reissued Date

Not reissued Not revoked

3 wks

Similar pattern to patches:
 Exponential drop-off, then levels out After 3 weeks:

13% Revoked 27% Reissued

slide-82
SLIDE 82

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

Reissue ⇒ New key?

slide-83
SLIDE 83

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

Reissue ⇒ New key?

slide-84
SLIDE 84

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

Reissue ⇒ New key?

Reissuing the same key is common practice 4.1% Heartbleed-induced

slide-85
SLIDE 85

0.2 0.4 0.6 0.8 1 1 2 3 4 5 6 CDF Years of Remaining Validity

Can we wait for expiration?

slide-86
SLIDE 86

0.2 0.4 0.6 0.8 1 1 2 3 4 5 6 CDF Years of Remaining Validity

Can we wait for expiration?

Vulnerable but not revoked

slide-87
SLIDE 87

0.2 0.4 0.6 0.8 1 1 2 3 4 5 6 CDF Years of Remaining Validity

Can we wait for expiration?

Vulnerable but not revoked

~40% did not
 expire after


  • ne year
slide-88
SLIDE 88

0.2 0.4 0.6 0.8 1 1 2 3 4 5 6 CDF Years of Remaining Validity

Can we wait for expiration?

Vulnerable but not revoked

~40% did not
 expire after


  • ne year

~8% of vulnerable certs still unexpired

slide-89
SLIDE 89

0.2 0.4 0.6 0.8 1 1 2 3 4 5 6 CDF Years of Remaining Validity

Can we wait for expiration?

We may be dealing with Heartbleed for years

Vulnerable but not revoked

~40% did not
 expire after


  • ne year

~8% of vulnerable certs still unexpired

slide-90
SLIDE 90

Security is an economic concern

Website Browser

Certificate

Certificate Authority

Certificate

slide-91
SLIDE 91

Security is an economic concern

Website Browser

Certificate

Certificate Authority

Certificate

Revoked?

slide-92
SLIDE 92

Security is an economic concern

Website Browser

Certificate

Certificate Authority

Browsers face tension between security and page load times CAs face tension between security and bandwidth costs

Certificate

Revoked?

slide-93
SLIDE 93

Certificate

OCSP Stapling

Website Browser Certificate Authority

Certificate

Certificate

Certificate

Certificate

Certificate

Certificate

Certificate

Certificate

Certificate

Certificate

Certificate

slide-94
SLIDE 94

Certificate

OCSP Stapling

Website Browser Certificate Authority

Certificate

Certificate

Certificate

Certificate

Certificate

Certificate

Certificate

Certificate

Certificate

Certificate

Certificate Certific

slide-95
SLIDE 95

Certificate

OCSP Stapling

Website Browser Certificate Authority

Certificate

Certificate

Certificate

Certificate

Certificate

Certificate

Certificate

Certificate

Certificate

Certificate

Certificate Certific

But OCSP Stapling rarely activated by admins:
 Our scan: 3% of normal certs; 2% of EV certs

slide-96
SLIDE 96

Testing browser behavior

Revocation
 protocols

  • Browsers should support all major protocols
  • CRLs, OCSP

, OCSP stapling

Availability of
 revocation info

  • Browsers should reject certs they cannot check
  • E.g., because the OCSP server is down

Chain
 lengths

  • Browsers should reject a cert if any on the chain fail
  • Leaf, intermediate(s), root
slide-97
SLIDE 97

Testing browser behavior

Revocation
 protocols

  • Browsers should support all major protocols
  • CRLs, OCSP

, OCSP stapling

Availability of
 revocation info

  • Browsers should reject certs they cannot check
  • E.g., because the OCSP server is down

Chain
 lengths

  • Browsers should reject a cert if any on the chain fail
  • Leaf, intermediate(s), root

Leaf Root Intermediate Intermediate

slide-98
SLIDE 98

Testing browser behavior

Revocation
 protocols

  • Browsers should support all major protocols
  • CRLs, OCSP

, OCSP stapling

Availability of
 revocation info

  • Browsers should reject certs they cannot check
  • E.g., because the OCSP server is down

Chain
 lengths

  • Browsers should reject a cert if any on the chain fail
  • Leaf, intermediate(s), root

signs Leaf Root Intermediate Intermediate

slide-99
SLIDE 99

Testing browser behavior

Revocation
 protocols

  • Browsers should support all major protocols
  • CRLs, OCSP

, OCSP stapling

Availability of
 revocation info

  • Browsers should reject certs they cannot check
  • E.g., because the OCSP server is down

Chain
 lengths

  • Browsers should reject a cert if any on the chain fail
  • Leaf, intermediate(s), root

signs Leaf Root Intermediate Intermediate

slide-100
SLIDE 100

Testing browser behavior

Revocation
 protocols

  • Browsers should support all major protocols
  • CRLs, OCSP

, OCSP stapling

Availability of
 revocation info

  • Browsers should reject certs they cannot check
  • E.g., because the OCSP server is down

Chain
 lengths

  • Browsers should reject a cert if any on the chain fail
  • Leaf, intermediate(s), root

signs Leaf Root Intermediate Intermediate

slide-101
SLIDE 101

Test harness

Implemented 192 tests using fake root certificate + Javascript

  • Unique DNS name, cert chain, CRL/OCSP responder, …
slide-102
SLIDE 102

Results across all browsers

✔ Passes test ✗ Fails test ev Passes for EV certs i Ignores OCSP Staple a Pops up alert to user l/w Passes on Linux/Win.

slide-103
SLIDE 103

Results across all browsers

Chrome Generally, only checks for EV certs ~3% of all certs Allows if revocation info unavailable Supports OCSP stapling

✔ Passes test ✗ Fails test ev Passes for EV certs i Ignores OCSP Staple a Pops up alert to user l/w Passes on Linux/Win.

slide-104
SLIDE 104

Results across all browsers

Firefox Never checks CRLs Only checks intermediates for EV certs Allows if revocation info unavailable Supports OCSP stapling

✔ Passes test ✗ Fails test ev Passes for EV certs i Ignores OCSP Staple a Pops up alert to user l/w Passes on Linux/Win.

slide-105
SLIDE 105

Results across all browsers

Safari Checks CRLs and OCSP Allows if revocation info unavailable Except for first intermediate, for CRLs Does not support OCSP stapling

✔ Passes test ✗ Fails test ev Passes for EV certs i Ignores OCSP Staple a Pops up alert to user l/w Passes on Linux/Win.

slide-106
SLIDE 106

Results across all browsers

Internet Explorer Checks CRLs and OCSP Often rejects if revocation info unavailable Pops up alert for leaf in IE 10+ 
 Supports OCSP stapling

✔ Passes test ✗ Fails test ev Passes for EV certs i Ignores OCSP Staple a Pops up alert to user l/w Passes on Linux/Win.

slide-107
SLIDE 107

Results across all browsers

Mobile Browsers Uniformly never check 
 
 
 Android browsers request Staple …and promptly ignore it

✔ Passes test ✗ Fails test ev Passes for EV certs i Ignores OCSP Staple a Pops up alert to user l/w Passes on Linux/Win.

slide-108
SLIDE 108

Results across all browsers

✔ Passes test ✗ Fails test ev Passes for EV certs i Ignores OCSP Staple a Pops up alert to user l/w Passes on Linux/Win.

slide-109
SLIDE 109

Results across all browsers

Browser developers are not doing what the PKI needs them to do

slide-110
SLIDE 110

Subject Alternate Name (SAN) Lists

Spirit: Multiple names for the
 same organization

slide-111
SLIDE 111

Subject Alternate Name (SAN) Lists

Spirit: Multiple names for the
 same organization Practice: Different organizations
 lumped together

slide-112
SLIDE 112

Subject Alternate Name (SAN) Lists

Spirit: Multiple names for the
 same organization Practice: Different organizations
 lumped together

slide-113
SLIDE 113

Subject Alternate Name (SAN) Lists

Spirit: Multiple names for the
 same organization Practice: Different organizations
 lumped together

slide-114
SLIDE 114

Subject Alternate Name (SAN) Lists

Spirit: Multiple names for the
 same organization Practice: Different organizations
 lumped together

slide-115
SLIDE 115

Subject Alternate Name (SAN) Lists

Spirit: Multiple names for the
 same organization Practice: Different organizations
 lumped together Who gets the private key?


Who manages it? Cruise-liner Certificate

slide-116
SLIDE 116

How prevalent is key sharing?

0.2 0.4 0.6 0.8 1 1 10 102 103 104 105 CDF Number of Third-Party Hosting Providers Used Organizations

slide-117
SLIDE 117

How prevalent is key sharing?

0.2 0.4 0.6 0.8 1 1 10 102 103 104 105 CDF Number of Third-Party Hosting Providers Used Organizations

slide-118
SLIDE 118

How prevalent is key sharing?

0.2 0.4 0.6 0.8 1 1 10 102 103 104 105 CDF Number of Third-Party Hosting Providers Used Organizations

23.5% Self-hosted

slide-119
SLIDE 119

How prevalent is key sharing?

0.2 0.4 0.6 0.8 1 1 10 102 103 104 105 CDF Number of Third-Party Hosting Providers Used Organizations

23.5% Self-hosted

76.5% share at least 1 key

slide-120
SLIDE 120

How prevalent is key sharing?

0.2 0.4 0.6 0.8 1 1 10 102 103 104 105 CDF Number of Third-Party Hosting Providers Used Organizations

23.5% Self-hosted

76.5% share at least 1 key Who?

slide-121
SLIDE 121

Who shares?

0.2 0.4 0.6 0.8 1 200k 400k 600k 800k 1M Fraction of Domains Hosted

  • n Third-party Providers

Alexa Site Rank (bins of 10,000) At least one key shared All keys shared

slide-122
SLIDE 122

Who shares?

0.2 0.4 0.6 0.8 1 200k 400k 600k 800k 1M Fraction of Domains Hosted

  • n Third-party Providers

Alexa Site Rank (bins of 10,000) At least one key shared All keys shared

slide-123
SLIDE 123

Who shares?

0.2 0.4 0.6 0.8 1 200k 400k 600k 800k 1M Fraction of Domains Hosted

  • n Third-party Providers

Alexa Site Rank (bins of 10,000) At least one key shared All keys shared

43.2% (of Top 10k) share at least one

slide-124
SLIDE 124

Who shares?

0.2 0.4 0.6 0.8 1 200k 400k 600k 800k 1M Fraction of Domains Hosted

  • n Third-party Providers

Alexa Site Rank (bins of 10,000) At least one key shared All keys shared

43.2% (of Top 10k) share at least one 22.4% share all

slide-125
SLIDE 125

Who shares?

Key sharing is common across the Internet

0.2 0.4 0.6 0.8 1 200k 400k 600k 800k 1M Fraction of Domains Hosted

  • n Third-party Providers

Alexa Site Rank (bins of 10,000) At least one key shared All keys shared

43.2% (of Top 10k) share at least one 22.4% share all

slide-126
SLIDE 126

Does key sharing make enticing attack targets?

0.2 0.4 0.6 0.8 1 100 101 102 103 104 105 106 Cumulative Fraction of Domains’ Keys Acquired Number of Hosting Providers Compromised Alexa Top 1k Alexa Top 1m All Domains

slide-127
SLIDE 127

Does key sharing make enticing attack targets?

0.2 0.4 0.6 0.8 1 100 101 102 103 104 105 106 Cumulative Fraction of Domains’ Keys Acquired Number of Hosting Providers Compromised Alexa Top 1k Alexa Top 1m All Domains

slide-128
SLIDE 128

Does key sharing make enticing attack targets?

0.2 0.4 0.6 0.8 1 100 101 102 103 104 105 106 Cumulative Fraction of Domains’ Keys Acquired Number of Hosting Providers Compromised Alexa Top 1k Alexa Top 1m All Domains 60% of Top 1K, same provider

slide-129
SLIDE 129

Does key sharing make enticing attack targets?

0.2 0.4 0.6 0.8 1 100 101 102 103 104 105 106 Cumulative Fraction of Domains’ Keys Acquired Number of Hosting Providers Compromised Alexa Top 1k Alexa Top 1m All Domains 60% of Top 1K, same provider

slide-130
SLIDE 130

Does key sharing make enticing attack targets?

0.2 0.4 0.6 0.8 1 100 101 102 103 104 105 106 Cumulative Fraction of Domains’ Keys Acquired Number of Hosting Providers Compromised Alexa Top 1k Alexa Top 1m All Domains >40% of all sites, 10 providers 60% of Top 1K, same provider

slide-131
SLIDE 131

Does key sharing make enticing attack targets?

0.2 0.4 0.6 0.8 1 100 101 102 103 104 105 106 Cumulative Fraction of Domains’ Keys Acquired Number of Hosting Providers Compromised Alexa Top 1k Alexa Top 1m All Domains

Popular hosting services are prime targets for attack

>40% of all sites, 10 providers 60% of Top 1K, same provider

slide-132
SLIDE 132

POOR CERTIFICATE MANAGEMENT

Websites aren’t properly revoking their certificates Browsers aren’t properly checking for revocations Websites aren’t keeping their secret keys secret

slide-133
SLIDE 133

POOR CERTIFICATE MANAGEMENT

Websites aren’t properly revoking their certificates Browsers aren’t properly checking for revocations Websites aren’t keeping their secret keys secret Websites have disincentive to do the right thing (CAs charge; key management hard) Browsers have a disincentive to do the right thing (page load times) CAs have incentive to introduce disincentives (bandwidth costs) Why?