the bad-attitude guide to computer security · security holes in mosh’s lifetime tls: i goto fail...

65
The Bad-Attitude Guide to Computer Security Keith Winstein Stanford University https://cs.stanford.edu/~keithw

Upload: others

Post on 25-Aug-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

The Bad-Attitude Guide to Computer Security

Keith Winstein

Stanford Universityhttps://cs.stanford.edu/~keithw

Page 2: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Bad (-attitude?) advice

1.

2.

3.

4.

5.

6.

7.

8.

Page 3: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Bad (-attitude?) advice

1. Do build your own cryptographic protocol.

2.

3.

4.

5.

6.

7.

8.

Page 4: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Mosh (mobile shell)

Page 5: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Mosh deployment

I Impetus: SSH for bad Wi-FiI + intermittent connectivityI + roamingI + local echoI + security against forged RST

I First release: 2012

I Today: appx. 2–20 million users

Page 6: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Mosh protocol

I Every datagram wrapped with AES-OCB

I Every datagram represents idempotent operation

I No TLS, no DTLS, no public-key crypto

I No timestamps, no replay cache, no daemon

I No cipher negotiation, no file IO, no root

I Roaming: server replies to source address ofhighest-numbered authentic incoming datagram

Page 7: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Hacker News

“One man band by the looks of

it. . . Implements its own private crypto

protocol (has it been vetted for replay

attacks? padding attacks? [insert 20

years of perplexing bugs confounding the

greatest minds in computer science]?)”

Page 8: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Slashdot

“Welcome to Yet Another Protocol

Devised By Academics Who Have Not

Been Near a Real Network in Twenty

Years, If Ever.”

Page 9: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Twitter

Dan Kaminsky: “Mosh being outside of SSHTransport makes academic perf codeunauthenticated. . . Love MoSH, would love itmuch more if it operated inside SSH’s channel”

Q: “any particular reason? Since quickrecovery from packetloss is one of its maingoals, UDP+OCB is needed.”

Kaminsky: “It’s *tricky* to build new securechannels. Look at DTLS’s long and painfuldev cycle.”

Page 10: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Twitter (cont.)

Moxie Marlinspike: “I dunno, from a semanticsec perspective, it’d be hard to do worse thanSSH. It’s in many ways worse than TLS.”

Kaminsky: “Do you suspect it hasBEAST-style bugs waiting to be found?”

Moxie: “Already found. The CBC ciphersuitesare totally off limits now because of chosen*ciphertext* attacks. Much wrse. . . Just likeTLS. Bad protocol that keeps squeaking by insome circumstances. Slowly painting itself intoa corner.”

Page 11: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Security holes in Mosh’s lifetime

TLS: I goto fail (Secure Transport)I GnuTLS verify (GnuTLS)I Heartbleed (OpenSSL)I Lucky ThirteenI BEASTI CRIMEI POODLEI FREAKI LogjamI 2013 RC4 attacks

SSH: I memory corruption attackI X11 trust race conditionI weak tty permissionsI password limit circumventionI root password auth bugI unfinished roaming feature allows private key extractionI command injection to xauth

Mosh: I (no security holes that we know about, so far)

Page 12: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

The lesson

I Committees are the worst.

I Small projects have a huge advantage.

I Bugs are caused by features. Fewer features, fewer bugs.

I Feynman-ish dictum: You’re not as good as the bestcontributor to a big project, but you’re probably betterthan the average contributor.

I For security, the worst contributor may be what matters.

Page 13: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Advice that I really (mostly) believe

After 20 years of committee design,

SSL/TLS and its implementations are so

hairy and so buggy that for a particular

focused task, “doing your own” may

sometimes be the more reasonable path,

even if TLS would do the job.

Page 14: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Bad (-attitude?) advice

1. Do build your own cryptographic protocol.

2.

3.

4.

5.

6.

7.

8.

Page 15: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Bad (-attitude?) advice

1. Do build your own cryptographic protocol.

2.

3.

4.

5.

6.

7.

8.

Page 16: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Bad (-attitude?) advice

1. Do build your own cryptographic protocol.

2. “Safe” languages aren’t that safe.

3.

4.

5.

6.

7.

8.

Page 17: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Hacker News

“Anyone doing security work in C in 2016 is inmy opinion committing malpractice andputting user’s at risk because their ego’s can’ttake not fiddling bits by hand.”

Page 18: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Security holes prevented by memory safety

TLS: I goto fail (Secure Transport)

not prevented

I GnuTLS verify (GnuTLS)

not prevented

I Heartbleed (OpenSSL)

prevented

I Lucky Thirteen

not prevented

I BEAST

not prevented

I CRIME

not prevented

I POODLE

not prevented

I FREAK

not prevented

I Logjam

not prevented

I 2013 RC4 attacks

not prevented

SSH: I memory corruption attack

prevented

I X11 trust race condition

not prevented

I weak tty permissions

not prevented

I password limit circumvention

not prevented

I root password auth bug

not prevented

I roaming stub allows private key extraction

prevented

I command injection to xauth

not prevented

Page 19: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Security holes prevented by memory safety

TLS: I goto fail (Secure Transport) not preventedI GnuTLS verify (GnuTLS) not preventedI Heartbleed (OpenSSL) preventedI Lucky Thirteen not preventedI BEAST not preventedI CRIME not preventedI POODLE not preventedI FREAK not preventedI Logjam not preventedI 2013 RC4 attacks not prevented

SSH: I memory corruption attack preventedI X11 trust race condition not preventedI weak tty permissions not preventedI password limit circumvention not preventedI root password auth bug not preventedI roaming stub allows private key extraction preventedI command injection to xauth not prevented

Page 20: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Popular memory-safe languages are way too powerful.

I What you say: “memory-safe”

I What you mean: “Haskell”

I What people hear: “JavaScript, Python, or Ruby on Rails”

I Any language with eval is apparently very tempted to use it.

I Java security track record is also not great.

Page 21: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Bad (-attitude?) advice

1. Do build your own cryptographic protocol.

2. “Safe” languages aren’t that safe.

3.

4.

5.

6.

7.

8.

Page 22: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Bad (-attitude?) advice

1. Do build your own cryptographic protocol.

2. “Safe” languages aren’t that safe.

3.

4.

5.

6.

7.

8.

Page 23: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Bad (-attitude?) advice

1. Do build your own cryptographic protocol.

2. “Safe” languages aren’t that safe.

3. HTTPS is bad.

4.

5.

6.

7.

8.

Page 24: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

HTTPS’s sacred promise

There exists a company from a list of 173companies, and that company at one pointattested that the WHOIS contact email for thedomain name in my URL bar belonged to thesame person who now controls the server I’mtalking to (unless its cert has been stolen).

Page 25: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

HTTPS’s sacred promise

There exists a company from a list of 173companies, and that company at one pointattested that the WHOIS contact email for thedomain name in my URL bar belonged to thesame person who now controls the server I’mtalking to (unless its cert has been stolen).

Page 26: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

HTTPS’s promise is pretty lame.

I Really should be verifying the file author, not just identityof the server maintainer.

I After download, no way to authenticate a file, no record ofwho attested to server’s identity, and no proof.

I Breaks even voluntary caching and virus-scanning.

I Guarantee provided by any of 173 semi-savory companies.

Page 27: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Pinning to the rescue

Browser Vendor: Use an HSTS header to pin a particular servercert!

Site: That sounds like TOFU. What if a CA issues an evil certbefore the user first visits us?

Vendor: Ask Google, Apple, Microsoft, and Mozilla to hardcodeyour server cert directly into the browser!

Page 28: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Pinning II

Site: We did it. Except, some of our users are behind a firewallthat seems to still be MITMing their sessions.

Vendor: The pin is only honored for “public” root CAs. If the userinstalls a “private” root CA, that will override the pin, even if youget your cert hardcoded into the browser.

Site: Why would the browser knowingly allow a man-in-the-middleattack?

Vendor: Lots of companies use virus-scanning middleboxes, and theonly way to do that with HTTPS is to completely MITM thesessions. Honoring the pin may be the right thing, but our browserwill be perceived as broken and we’d lose market share. We’d onlydo this after our competitors had already done it.

Page 29: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Pinning III

Site: When disregarding the pin, at least display a broken padlockand a warning:“Your session is being eavesdropped on by a privateauthority. Click here to disable.”

Vendor: If we did that, we’d have to display the warning for alleternity because those resources will land in the cache andpermanently corrupt it. So it wouldn’t be a very useful warning.

Site: If the cache is “permanently corrupted,” you should display awarning for eternity!

Vendor: Then our browser would be perceived as broken and we’lllose market share. We’d only do this after the other vendors have.

Site: Can you at least make this an option for paranoid people?

Vendor: lol no

Page 30: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Bad (-attitude?) advice

1. Do build your own cryptographic protocol.

2. “Safe” languages aren’t that safe.

3. HTTPS is bad.

4.

5.

6.

7.

8.

Page 31: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Bad (-attitude?) advice

1. Do build your own cryptographic protocol.

2. “Safe” languages aren’t that safe.

3. HTTPS is bad.

4.

5.

6.

7.

8.

Page 32: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Bad (-attitude?) advice

1. Do build your own cryptographic protocol.

2. “Safe” languages aren’t that safe.

3. HTTPS is bad.

4. Password hashing is bad.

5.

6.

7.

8.

Page 33: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Password hashing is bad.

I Password hashing is bad because it makes you think it’s okayfor users to send you their passwords.

I Users should not send you their passwords.

I Your site security should not depend on your enforcement of apassword complexity requirement.

I You do not want a server compromise to expose anything thatallows a bad guy to intercept or crack user passwords.

I Better: Delegate. Use public-key auth, or “Log in withGoogle” / “Log in with Facebook” / OpenID Connect.

Page 34: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Bad (-attitude?) advice

1. Do build your own cryptographic protocol.

2. “Safe” languages aren’t that safe.

3. HTTPS is bad.

4. Password hashing is bad.

5.

6.

7.

8.

Page 35: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Bad (-attitude?) advice

1. Do build your own cryptographic protocol.

2. “Safe” languages aren’t that safe.

3. HTTPS is bad.

4. Password hashing is bad.

5.

6.

7.

8.

Page 36: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Bad (-attitude?) advice

1. Do build your own cryptographic protocol.

2. “Safe” languages aren’t that safe.

3. HTTPS is bad.

4. Password hashing is bad.

5. Forward secrecy is usually secret, and that’s bad.

6.

7.

8.

Page 37: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Forward secrecy defined

Forward secrecy

In a communication between multiple parties, there exists a“ratchet” at time t and a later “deletion event” at time u.

Forward secrecy: An exposure of secret material by a partyafter time u will not aid an eavesdropper in decoding ciphertextencoded before time t.

(Colloquially, t might be the end of a session, and u is when allparties have erased the key or anything that can derive the key thatprotected the session.)

Page 38: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

The problem: no way to communicate when u occurs

I Websites are supposed to erase their key cache once a day.

I How can a client learn if this has happened? No way to ask.

I TLS 1.3 draft includes async key rotation, but no authenticatedway to acknowledge the message.

I My view: if you care about PFS, you should wantauthenticated PFS. Any operation worth doing is worthconfirming, including key rotation.

Page 39: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Bad (-attitude?) advice

1. Do build your own cryptographic protocol.

2. “Safe” languages aren’t that safe.

3. HTTPS is bad.

4. Password hashing is bad.

5. Forward secrecy is usually secret, and that’s bad.

6.

7.

8.

Page 40: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Bad (-attitude?) advice

1. Do build your own cryptographic protocol.

2. “Safe” languages aren’t that safe.

3. HTTPS is bad.

4. Password hashing is bad.

5. Forward secrecy is usually secret, and that’s bad.

6.

7.

8.

Page 41: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Bad (-attitude?) advice

1. Do build your own cryptographic protocol.

2. “Safe” languages aren’t that safe.

3. HTTPS is bad.

4. Password hashing is bad.

5. Forward secrecy is usually secret, and that’s bad.

6. End-to-end security is bad, and key escrow is good.

7.

8.

Page 42: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

End-to-end security is bad.

I I used to believe in end-to-end security.

I But, I used to think of myself as the endpoint.

I Now I own endpoints that communicate securelywith their maker over Wi-Fi or their own LTE.

I I deserve the right to listen in on what myown devices are saying about me.

Page 43: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

End-to-end security is bad (cont.).

I Today, end-to-end security means the endpointis the only thing that can defend itself.

I Hard to provide defense-in-depth or even detectattacks if you can only see ciphertext.

I Every cheap device is a single point of failure.

I Manufacturers will not keep up with securitypatches for a $10 device.

Page 44: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Proposed research agenda

How can we build a firewall and auditor

for encrypted communications in order

to leave no single point of failure?

(Ex. approaches: Blindbox, delayed key release,read-only keys)

Page 45: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Bad (-attitude?) advice

1. Do build your own cryptographic protocol.

2. “Safe” languages aren’t that safe.

3. HTTPS is bad.

4. Password hashing is bad.

5. Forward secrecy is usually secret, and that’s bad.

6. End-to-end security is bad, and key escrow is good.

7.

8.

Page 46: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Bad (-attitude?) advice

1. Do build your own cryptographic protocol.

2. “Safe” languages aren’t that safe.

3. HTTPS is bad.

4. Password hashing is bad.

5. Forward secrecy is usually secret, and that’s bad.

6. End-to-end security is bad, and key escrow is good.

7.

8.

Page 47: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Bad (-attitude?) advice

1. Do build your own cryptographic protocol.

2. “Safe” languages aren’t that safe.

3. HTTPS is bad.

4. Password hashing is bad.

5. Forward secrecy is usually secret, and that’s bad.

6. End-to-end security is bad, and key escrow is good.

7. The Snowden docs shouldn’t have changed our behavior.

8.

Page 48: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

GNU emacs, May 1987

;;; spook.el --- spook phrase utility for overloading the NSA line eater

;; Just before sending mail, do M-x spook.

;; A number of phrases will be inserted into your buffer, to help

;; give your message that extra bit of attractiveness for automated

;; keyword scanners. Help defeat the NSA trunk trawler!

Page 49: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

European Union, July 2001

Page 50: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Bush admin. wins first-ever FISA appeal, 2002

Page 51: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

New York Times, December 2005

Page 52: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

AT&T whistleblower, April 2006

Page 53: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

USA Today, May 2006

Page 54: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Wall Street Journal, June 2006

Page 55: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

FISA Amendments Act, July 2008

Page 56: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Obama supported FAA, Hillary Clinton opposed

Page 57: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Snowden documents, October 2013

Page 58: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

“Google has started to encrypt,” November 2013

Page 59: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Microsoft looking to encrypt, November 2013

Page 60: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Bad (-attitude?) advice

1. Do build your own cryptographic protocol.

2. “Safe” languages aren’t that safe.

3. HTTPS is bad.

4. Password hashing is bad.

5. Forward secrecy is usually secret, and that’s bad.

6. End-to-end security is bad, and key escrow is good.

7. The Snowden docs shouldn’t have changed our behavior.

8.

Page 61: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Bad (-attitude?) advice

1. Do build your own cryptographic protocol.

2. “Safe” languages aren’t that safe.

3. HTTPS is bad.

4. Password hashing is bad.

5. Forward secrecy is usually secret, and that’s bad.

6. End-to-end security is bad, and key escrow is good.

7. The Snowden docs shouldn’t have changed our behavior.

8.

Page 62: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

Bad (-attitude?) advice

1. Do build your own cryptographic protocol.

2. “Safe” languages aren’t that safe.

3. HTTPS is bad.

4. Password hashing is bad.

5. Forward secrecy is usually secret, and that’s bad.

6. End-to-end security is bad, and key escrow is good.

7. The Snowden docs shouldn’t have changed our behavior.

8. Auto-updating without consent is bad, because we mightbecome bad.

Page 63: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

nytimes.com, February 2016

Page 64: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

This is not something to be congratulated for.

I Nobody congratulates the makers of SSH, GPG,OpenSSL, Apache, or Mosh for making a system“even they can’t hack.” And they shouldn’t.

I Good design = even the designer has no specialaccess.

I When you retain the ability to auto-update usersoftware without consent or public review, youbecome part of the attack surface.

I Honor the user’s informed consent.

Page 65: The Bad-Attitude Guide to Computer Security · Security holes in Mosh’s lifetime TLS: I goto fail (Secure Transport) I GnuTLS verify (GnuTLS) I Heartbleed (OpenSSL) I Lucky Thirteen

The Bad-Attitude Guide to Computer Security

1. Do build your own cryptographic protocol.

2. “Safe” languages aren’t that safe.

3. HTTPS is bad.

4. Password hashing is bad.

5. Forward secrecy is usually secret, and that’s bad.

6. End-to-end security is bad, and key escrow is good.

7. The Snowden docs shouldn’t have changed our behavior.

8. Auto-updating without consent is bad, because we mightbecome bad.

Keith Winsteinhttps://cs.stanford.edu/~keithw