What You Need to Know About the Heartbleed Bug
While Microsoftâs push of the final patches for Windows XP might normally be seen as a big deal, a vulnerability in the OpenSSL library has managed to steal the spotlight. CVE-2014-0160, which is more commonly referred to as the âHeartbleedâ bug, has revealed that it is possible for a malicious user to retrieve memory that could include sensitive data or even the private encryption keys from web servers running OpenSSL versions 1.0.1-1.0.1f and 1.0.2-beta1. Our security and compliance team has been able to exploit this vulnerability, which means attackers can as well.
This is yet another flaw in the public-key infrastructure (PKI), which has seen an uptick in concerning issues in recent years. Notable examples include the CRIME and BEAST attacks, which undermined the security of SSL. Heartbleed, though, may be something more important in that it allows for the entire trust infrastructure to seemingly break down.
How Keypairs Work
Public and private keypairs, signed by trusted certificate authorities (CAs), are used to validate the authenticity of secure connections made to websites and other services every day. The private key is known only to the server hosting a service, while the public key, delivered to clients connecting to the service, includes this chain-of-trust information. The client can use this chain-of-trust information to validate that the service to which it is connected is not hosted by some malicious third party.
Because of the way public-key/private-key cryptography works, the secrecy of the private key is the linchpin in the trust infrastructure. Heartbleed undermines the secrecy of the private key. In the event a private key becomes known by a third party, the private key would allow the party to impersonate the legitimate service in a man-in-the-middle (MITM) attack without the clientâsâand possibly even the serverâsâknowledge. An attacker could also continue to use the private key to decrypt future traffic even after the vulnerability is patched (and even past traffic that has been captured).
Exploiting the Vulnerability
The Heartbleed attack allows for the extraction of 64 kilobytes (kB) of server memory at a time. The 64 kB chunks extracted are random and cannot be controlled or selected by an attacker.
While this may not seem like a lot of information, an attacker can continue requesting 64 kB chunks of memory, theoretically until they obtain the private key material, which could allow the attacker to decrypt traffic or impersonate the service.
Even without the private key, these chunks of memory could contain other private or sensitive data like session IDs, usernames, un-hashed passwords/secrets, hashed passwords/secrets and full HTTP request strings and user-agent strings.
Update 4/11/14: Here's an example of what an attacker might be able to view. In this case, while the website is encrypting sensitive information within the database, an attacker can view sensitive information, such as the username and password as well as credit card information, in clear text.
0000: 02 40 00 D8 03 02 53 43 5B 90 9D 9B 72 0B BC 0C [email protected][...r... 0010: BC 2B 92 A8 48 97 CF BD 39 04 CC 16 0A 85 03 90 .+..H...9....... 0020: 9F 77 04 33 D4 DE 00 00 66 C0 14 C0 0A C0 22 C0 .w.3....f.....". 0030: 21 00 39 00 38 00 88 00 87 C0 0F C0 05 00 35 00 !.9.8.........5. 0040: 84 C0 12 C0 08 C0 1C C0 1B 00 16 00 13 C0 0D C0 ................ 0050: 03 00 0A C0 13 C0 09 C0 1F C0 1E 00 33 00 32 00 ............3.2. 0060: 9A 00 99 00 45 00 44 C0 0E C0 04 00 2F 00 96 00 ....E.D...../... 0070: 41 C0 11 C0 07 C0 0C C0 02 00 05 00 04 00 15 00 A............... 0080: 12 00 09 00 14 00 11 00 08 00 06 00 03 00 FF 01 ................ 0090: 00 00 49 00 0B 00 04 03 00 01 02 00 0A 00 34 00 ..I...........4. 00a0: 32 00 0E 00 0D 00 19 00 0B 00 0C 00 18 00 09 00 2............... 00b0: 0A 00 16 00 17 00 08 00 06 00 07 00 14 00 15 00 ................ 00c0: 04 00 05 00 12 00 13 00 01 00 02 00 03 00 0F 00 ................ 00d0: 10 00 11 00 23 00 00 00 0F 00 01 01 0D 0A 2D 2D ....#.........-- 00e0: 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D ---------------- 00f0: 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 65 38 30 33 ------------e803 0100: 32 63 30 38 32 31 35 62 0D 0A 43 6F 6E 74 65 6E 2c08215b..Conten 0110: 74 2D 44 69 73 70 6F 73 69 74 69 6F 6E 3A 20 66 t-Disposition: f 0120: 6F 72 6D 2D 64 61 74 61 3B 20 6E 61 6D 65 3D 22 orm-data; name=" 0130: 75 73 65 72 6E 61 6D 65 22 0D 0A 0D 0A 62 6F 62 username"....bob 0140: 0D 0A 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D ..-------------- 0150: 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D ---------------- 0160: 65 38 30 33 32 63 30 38 32 31 35 62 0D 0A 43 6F e8032c08215b..Co 0170: 6E 74 65 6E 74 2D 44 69 73 70 6F 73 69 74 69 6F ntent-Dispositio 0180: 6E 3A 20 66 6F 72 6D 2D 64 61 74 61 3B 20 6E 61 n: form-data; na 0190: 6D 65 3D 22 70 61 73 73 77 6F 72 64 22 0D 0A 0D me="password"... 01a0: 0A 73 65 63 72 65 74 0D 0A 2D 2D 2D 2D 2D 2D 2D .secret..------- 01b0: 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D ---------------- 01c0: 2D 2D 2D 2D 2D 2D 2D 65 38 30 33 32 63 30 38 32 -------e8032c082 01d0: 31 35 62 0D 0A 43 6F 6E 74 65 6E 74 2D 44 69 73 15b..Content-Dis 01e0: 70 6F 73 69 74 69 6F 6E 3A 20 66 6F 72 6D 2D 64 position: form-d 01f0: 61 74 61 3B 20 6E 61 6D 65 3D 22 73 65 73 73 69 ata; name="sessi 0200: 6F 6E 5F 69 64 22 0D 0A 0D 0A 31 32 33 34 35 36 on_id"....123456 0210: 37 38 39 30 6A 6B 6C 3B 0D 0A 2D 2D 2D 2D 2D 2D 7890jkl;..------ 0220: 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D ---------------- 0230: 2D 2D 2D 2D 2D 2D 2D 2D 65 38 30 33 32 63 30 38 --------e8032c08 0240: 32 31 35 62 0D 0A 43 6F 6E 74 65 6E 74 2D 44 69 215b..Content-Di 0250: 73 70 6F 73 69 74 69 6F 6E 3A 20 66 6F 72 6D 2D sposition: form- 0260: 64 61 74 61 3B 20 6E 61 6D 65 3D 22 63 63 5F 6E data; name="cc_n 0270: 75 6D 22 0D 0A 0D 0A 34 31 31 31 31 31 31 31 31 um"....411111111 0280: 31 31 31 31 31 31 31 0D 0A 2D 2D 2D 2D 2D 2D 2D 1111111..------- 0290: 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D ---------------- 02a0: 2D 2D 2D 2D 2D 2D 2D 65 38 30 33 32 63 30 38 32 -------e8032c082 02b0: 31 35 62 0D 0A 43 6F 6E 74 65 6E 74 2D 44 69 73 15b..Content-Dis 02c0: 70 6F 73 69 74 69 6F 6E 3A 20 66 6F 72 6D 2D 64 position: form-d 02d0: 61 74 61 3B 20 6E 61 6D 65 3D 22 63 76 76 22 0D ata; name="cvv". 02e0: 0A 0D 0A 31 32 33 0D 0A 2D 2D 2D 2D 2D 2D 2D 2D ...123..-------- 02f0: 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D ---------------- 0300: 2D 2D 2D 2D 2D 2D 65 38 30 33 32 63 30 38 32 31 ------e8032c0821 0310: 35 62 2D 2D 0D 0A 0C F1 2D FE 8C 60 35 56 37 CB 5b--....-..`5V7. 0320: 50 C0 EE 40 0F EA F8 94 DF FD 05 05 05 05 05 05 P..@............
While some websites have sprung up to offer a means to test external web servers for the vulnerability, it is important to note that web servers are not the only type of service that is vulnerable. Any service that runs SSL could be at risk and should be investigated. That includes mail, instant messaging, firewalls, routers, database servers, log servers, etc. Several OpenSSL clients (including curl, git and wget) are also known to be vulnerable, but a full list has not yet been reported.
Mitigation for Heartbleed
Given the severity of this issue, steps should be taken immediately to update any systems affected by Heartbleed. OpenSSL versions 1.0.1 through 1.0.1f and 1.0.2-beta1 have been reported as vulnerable, while OpenSSL versions 1.0.0 and 0.9.8 are not. If you are running an affected version, upgrading to OpenSSL version 1.0.1g should address the vulnerability.
Microsoftâs IIS web server does not utilize the OpenSSL library, so it is not impacted.
For other embedded applications and systems (e.g., databases, firewalls, VPNs), you should consult with the vendorâs recommended solution, which will likely come in the form of a patch.
As with any vulnerability that could compromise the security of your encryption keys, administrators should also consider reissuing SSL keys, which means resigning SSL certificates. Most public CAs will allow you to rekey and resign your SSL certificate without charge.
Update 4/11/14: Consumer Advice
If an organization gets exploited from Heartbleed, it could potentially leak personal information about you. It could also leak the encryption key, which means an attacker could later view encrypted communications if the encryption key has not been changed.
As a consumer, unfortunately there's not much you're able to do to help reduce impact. You can't patch someone else's server and you can't regenerate the encryption key. However, as a precautionary step, you can take efforts to change your password in case it was disclosed.















