Certificate Authorities & SSL


The Good,

The Bad and

The Break-ins

What Will Be Covered

Acronym and Definition Soup

TLS/SSL

What It Is

  • A cryptographic protocol
  • Protection for data in transit
  • A key exchange protocol
  • Eavesdropping and message tampering prevention

What It Is NOT

  • An encryption algorithm
  • Protection for data at rest
  • Strictly dependent on certificate authorities
  • The same as SSH

Where is TLS Used?

PKI, CAs, X.509, and Certificates

CAs Continued

Fscking TLS, how does it work?

TLS Handshake Negotiation

TLS (ClientHello)

TLS Handshake Negotiation ClientHello

TLS (ServerHello)

TLS Handshake Negotiation ServerHello

TLS (Certificate)

TLS Handshake Negotiation Certificate

TLS (Negotiation Wrap-up)

TLS Handshake Negotiation

TLS (Post Negotiation)

TLS Handshake Post Negotiation

TLS (Client Begins Encryption)

TLS Client Encryption and HMAC Verification

TLS (Server Begins Encryption)

TLS Server Encryption and HMAC Verification

TLS Handshake in Review

Yo dawg I heard you like encryption

Demo

TLS via Wireshark

(ip.addr == 127.0.0.1) && (ssl)

Public-Key Cryptography

Public-key cryptography is essentially the use of asymmetric algorithms which produce a public and private key pair.

RSA for example: User creates and publishes the product of two large primes (p, q) and an auxiliary value (e), as their public key. The prime factors must be kept secret. The RSA algorithm is such that anyone can use the public key result to encrypt a message but the prime factors are required to decrypt the message.

RSA - Show (some of) Your Work!

D-H Key Exchange

Diffie-Hellman Key Exchange

D-H Key Exchange (Part II)

Diffie-Hellman Key Details

Wrong Certificate Example

Dave wants to log on to his favorite Twilight™ fan site: http://www.fairiesvampires.com/main/authorization/signIn

But he does not want his credentials to be transmitted in the clear otherwise someone might log in as him and claim he does not love sensitive caring vampires!

So he changes the URL to https! https://www.fairiesvampires.com/main/authorization/signIn

But things do not go as expected. What should Dave do!?

Brief Detour - HTTPS Best Practices

Stolen from OWASP: http://goo.gl/GjkGI

More Examples

add_header Strict-Transport-Security max-age=31536000;

Bad Press for CAs and TLS 2011-2013

CA Issues:

TLS and Other Issues:

Weaknesses (Real and Perceived)

Proposed Solutions and Mitigations

Questions?

Name: Matt Glover

Email: matt.glover@mandiant.com

Type: Public PGP Key

Key ID: 54C013B4