Harper Maddox
CTO of EdgeTheory
Sr Architect, EdgeTheory
April 2014
a bug in TLS
Allowed network to detect a closed connection early
hbtype = *p++;
n2s(p, payload);
pl = p;
…
*bp++ = TLS1_HB_RESPONSE;
s2n(payload, bp);
memcpy(bp, pl, payload);
If you're still there, send me these 5 bytes back: "ABCDE"
Server responds with ABCDE
If you're still there, send me these 65535 bytes back: "ABCDE"
Server responds with 64k - potentially decrypted -bytes
The server never checks that you're not requesting more back than you sent!
Ability to read up to 64k of unencrypted data previously sent on someone else's connection (E.g., passwords)
Also possible to get the sites private key, since that's in memory, too.
Sites
Akamai
AWS
GitHub
Stripe
Wikipedia
Software
McAfee
Cisco
Steam
Both server and client have this bug! A malicious server could request payload, too!
1% of sites still vulnerable as of Nov 1
Hard-to-maintain code
Performance over maintainability and security
Feature Creep
Lack of testing
Significant portion of OpenSSL still untested
Upgrade OpenSSL
Re-issue certs
Testing matters when you write software.
No matter who you are, you should patch.
Don't build software features you don't need.
Hard to do when you're small.
Never trust user input.
Entire problem solved by one line of code to check user input.
Introduced Sep, 1989
Disclosed Sep, 2014
4 different vulnerabilities in bash environment variable handling
2 others related to parsing
"Potentially nastier than Heartbleed"
Ability to execute arbitrary code on the affected machine
Used in conjunction with other security holes or misconfigured machines
Tools
CGI/FastCGI-based web applications
OpenSSH
dhcp
CUPS
Oracle products (multiple)
Cisco products (multiple)
"I don't use bash"
/bin/sh emulation
busybox
"system"
Unknown number of machines still affected
Infrequently used feature
Patches did not remove feature entirely, but namespaced it instead.
Failure to remove it, due to backward compatibility
Poorly thought-out implementation
Failure to use "best practices" for security tools
Address randomization would have changed severity of this bug greatly.
Lack of documentation of external interfaces
Document your interfaces
Remove features you don't use
Always turn on optionally, or namespace the features.
Only run software features you need
DASH example vs BASH
PATCH
Primary vectors that found access via shellshock were fixing their vulnerabilities more quickly than bash
Machine can be compromised indefinitely without symptoms.
Easy to resolve:
Small number of individual attack vectors
Very widely deployed and easy to attack (large surface area)
Large number of attack vectors
Varying degrees of difficulty to attack and deployment.
By Harper Maddox
Billy Conn's 11-25-2014 presentation to the Jackson Area Web Developer's Group (JAWAD) on Web Security. Discussion of Heartbleed, ShellShock and Poodle