Editing 1353: Heartbleed

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 10: Line 10:
 
The {{w|Heartbleed bug}} refers to a critical bug in the {{w|OpenSSL}} cryptographic library. This bug was publicly revealed on Monday, 7 April 2014. Due to a programming error in OpenSSL versions 1.0.1 through 1.0.1f — meaning the bug had existed for two years — attackers could read random server memory by sending specially prepared HeartbeatRequest messages to an affected server.
 
The {{w|Heartbleed bug}} refers to a critical bug in the {{w|OpenSSL}} cryptographic library. This bug was publicly revealed on Monday, 7 April 2014. Due to a programming error in OpenSSL versions 1.0.1 through 1.0.1f — meaning the bug had existed for two years — attackers could read random server memory by sending specially prepared HeartbeatRequest messages to an affected server.
  
OpenSSL is a very commonly used library to implement {{w|SSL/TLS}}, a cryptographic protocol not only used to secure web traffic but also for mail clients and much more. Only the user and the server can read the communication. On the web the protocol is ''https://'' (HTTP Secure), instead of the open ''http://'' standard. SSL is often used to protect sensitive web traffic, such as login requests, which contains the usernames and passwords in the requests. The server sends a certificate to the browser before the secure connection is established. If the certificate is registered the browser accepts it automatically, otherwise the user gets a popup to accept or reject this insecure certificate.
+
OpenSSL is a very commonly used library to implement {{w|SSL/TLS}}, a cryptographic protocol not only used to secure web traffic but also for mail clients and much more. Only the user and the server can read the communication. On the web the protocol is ''https://'' (HTTP Secure), instead of the open ''http://'' standard. SSL is often used to protect sensitive web traffic, such as login requests, which contains the user names and passwords in the requests. The server sends a certificate to the browser before the secure connection is established. If the certificate is registered the browser accepts it automatically, otherwise the user gets a popup to accept or reject this insecure certificate.
  
A vulnerability that lets an attacker read random clumps of memory on the server would possibly let an attacker find recent username/password requests, allowing them to gain unauthorized access to user accounts. Even worse, this vulnerability could read the server's private key, enabling anyone to impersonate the server and/or decrypt any future traffic that relies on that key, and any previously obtained prior traffic also, unless a "perfect forward secrecy" cipher is used. Furthermore, the Heartbleed exploit occurs during the handshake phase of setting up a connection, so no traces of it are logged, i.e. you can be attacked and never be the wiser.
+
A vulnerability that lets an attacker read random clumps of memory on the server would possibly let an attacker find recent username/password requests, allowing them to gain unauthorized access to user accounts. Even worse, this vulnerability could read the server's private key, enabling anyone to impersonate the server and/or decrypt any future traffic that relies on that key, and any previously-obtained prior traffic also, unless a "perfect forward secrecy" cipher is used. Furthermore, the Heartbleed exploit occurs during the handshake phase of setting up a connection, so no traces of it are logged, i.e. you can be attacked and never be the wiser.
  
More information is available at [https://heartbleed.com heartbleed.com] or under the reference [https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-0160 CVE-2014-0160 at nvd.nist.gov].
+
More information is available at [http://heartbleed.com heartbleed.com] or under the reference [https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-0160 CVE-2014-0160 at nvd.nist.gov].
  
 
In the last panel, Megan interprets Cueball's question ("is '''everything''' compromised?") expansively. She responds that, being a computer bug, Heartbleed can only affect information which is stored on computers. Cueball concludes that information recorded in analog media, such as that written on paper or etched in clay tablets, is safe. Megan adds that imaginations are also unaffected by Heartbleed, and Cueball is reassured. The reader may wonder how our society would fare in the face of the leakage of all electronically stored private information, but having our imaginations intact is certainly reassuring.
 
In the last panel, Megan interprets Cueball's question ("is '''everything''' compromised?") expansively. She responds that, being a computer bug, Heartbleed can only affect information which is stored on computers. Cueball concludes that information recorded in analog media, such as that written on paper or etched in clay tablets, is safe. Megan adds that imaginations are also unaffected by Heartbleed, and Cueball is reassured. The reader may wonder how our society would fare in the face of the leakage of all electronically stored private information, but having our imaginations intact is certainly reassuring.
  
The title text cites the {{w|Tears in rain soliloquy}}, the dying words of the replicant and main antagonist Roy Batty (played by {{w|Rutger Hauer}}) in the 1982 film ''{{w|Blade Runner}}'', implying that the 64KiB Heartbleed buffer is so complete it includes memories from replicant brains. This is ironic as in the soliloquy, Roy Batty stated "All those moments will be lost in time".
+
The title text cites the {{w|Tears in rain soliloquy}}, the dying words of the replicant and main antagonist Roy Batty (played by {{w|Rutger Hauer}}) in the 1982 film ''{{w|Blade Runner}}'', implying that the 64KiB HeartBleed buffer is so complete it includes memories from replicant brains. This is ironic as in the soliloquy, Roy Batty stated "All those moments will be lost in time".
  
The title text also suggests patching OpenSSL oneself, which might refer to the patched version of OpenSSL by Debian, which turned out to be vulnerable in 2008, and was the topic of [[424: Security Holes]].
+
The title text also suggests to patch OpenSSL oneself, which might refer to the patched version of OpenSSL by Debian, which turned out to be vulnerable in 2008, and was the topic of [[424: Security Holes]].
  
 
===Heartbleed===
 
===Heartbleed===
 
In addition to the below, see [[1354|xkcd's explanation]] in the next comic.
 
In addition to the below, see [[1354|xkcd's explanation]] in the next comic.
  
{{w|Transport Layer Security}} (TLS), the successor to {{w|Secure Sockets Layer|SSL}}, is a protocol that provides end-to-end encryption for data transmitted over the internet and is described in [https://tools.ietf.org/html/rfc5246 RFC 5246]. The Heartbeat extension to TLS introduced in 2012 (described in [https://tools.ietf.org/html/rfc6520 RFC 6520]) provides a protocol for keeping an encrypted TLS session alive (preventing inactivity timeouts), so you do not have to do a costly TLS handshake with the server for subsequent transfer of information.
+
{{w|Transport Layer Security}} (TLS), the successor to {{w|Secure Sockets Layer|SSL}}, is a protocol that provides end-to-end encryption for data transmitted over the internet, and is described in [http://tools.ietf.org/html/rfc5246 RFC 5246]. The Heartbeat extension to TLS introduced in 2012 (described in [https://tools.ietf.org/html/rfc6520 RFC 6520]) provides a protocol for keeping an encrypted TLS session alive (preventing inactivity timeouts), so you do not have to do a costly TLS handshake with the server for subsequent transfer of information.
  
The Heartbeat protocol involves the client sending a packet with an arbitrary payload (often a random 16-to-32-byte number) that the server periodically sends back to the client to tell the client that the TLS session is still alive. When the client sends the packet to a vulnerable version of OpenSSL, the OpenSSL server reads a <code>payload_size</code> from the header sent by the client. This is a 2-byte number (0 to 0xffff=65535) that is supposed to describe the size of the payload. The OpenSSL library writes the payload to memory, but it does not check that the size of the payload written to memory matches the <code>payload_size</code> taken from the client's header. When the vulnerable server sends back the Heartbeat KeepAlive response to the client, it will readout <code>payload_size</code> number of bytes and send them back to the client. If you send a payload that is actually 16 bytes, but claims it is 0xffff bytes you will read the next 64KiB of memory of the vulnerable process starting from wherever the payload was written. An attacker can repeat this attack many times and can do this attack early in the TLS handshake, so the attack will not in any way be logged unless they are logging every incoming packet which is not typical and would result in many passwords being logged. As private keys often have an identifiable format, it is often possible for an attacker to find the private TLS key, so if they eavesdrop on network traffic they can decrypt and/or alter it.  For more detailed information see: [https://blog.cryptographyengineering.com/2014/04/attack-of-week-openssl-heartbleed.html 1], [https://security.stackexchange.com/a/55117/2568 2], [https://news.ycombinator.com/item?id=7549943 3].
+
The Heartbeat protocol involves the client sending a packet with an arbitrary payload (often a random 16 to 32 byte number) that the server periodically sends back to the client to tell the client that the TLS session is still alive. When the client sends the packet to a vulnerable version of OpenSSL, the OpenSSL server reads a <code>payload_size</code> from the header sent by the client. This is a 2-byte number (0 to 0xffff=65535) that is supposed to describe the size of the payload. The OpenSSL library writes the payload to memory, but it does not check that the size of the payload written to memory matches the <code>payload_size</code> taken from the client's header. When the vulnerable server sends back the Heartbeat KeepAlive response to the client, it will readout <code>payload_size</code> number of bytes and send them back to the client. If you send a payload that is actually 16 bytes, but claims it is 0xffff bytes you will read the next 64KiB of memory of the vulnerable process starting from wherever the payload was written. An attacker can repeat this attack many times and can do this attack early in the TLS handshake, so the attack will not in any way be logged unless they are logging every incoming packet which is not typical and would result in many passwords being logged. As private keys often have an identifiable format, it is often possible for an attacker to find the private TLS key, so if they eavesdrop on network traffic they can decrypt and/or alter it.  For more detailed information see: [http://blog.cryptographyengineering.com/2014/04/attack-of-week-openssl-heartbleed.html 1], [http://security.stackexchange.com/a/55117/2568 2], [https://news.ycombinator.com/item?id=7549943 3].
  
It is worth noting that modern operating systems use a {{w|Virtual Memory#Usage|virtual memory}} abstraction above physical memory. This means every process can only access memory assigned to it, so it would be impossible for a vulnerable web server to read memory assigned to another process (like a text editor that has erotic fan fiction stored to memory) on the same computer. For more info, see: [https://security.stackexchange.com/a/55271/2568 4].
+
It is worth noting that modern operating systems use a {{w|Virtual Memory#Usage|virtual memory}} abstraction above physical memory. This means every process can only access memory assigned to it, so it would be impossible for a vulnerable web server to read memory assigned to another process (like a text editor that has erotic fan fiction stored to memory) on the same computer. For more info, see: [http://security.stackexchange.com/a/55271/2568 4].
  
It also should be noted that this Heartbleed bug only affects certain versions of OpenSSL, and does not affect other TLS/SSL implementations, or OpenSSH which does not even use the TLS protocol but uses the SSH-2 protocol (described in [https://tools.ietf.org/html/rfc4251 RFC 4251]). SSH is typically used for remote logins on Unix and Linux computers.
+
It also should be noted that this heartbleed bug only affects certain versions of OpenSSL, and does not affect other TLS/SSL implementations, or OpenSSH which does not even use the TLS protocol, but uses the SSH-2 protocol (described in [http://tools.ietf.org/html/rfc4251 RFC 4251]). SSH is typically used for remote logins on unix and linux computers.
  
Vulnerable sysadmins need to update to a patched version of OpenSSL or one with the Heartbeats disabled. Unless their TLS keys were protected by hardware, they probably also need to revoke their old TLS keys and generate new TLS keys. To learn how to do this visit [https://leo-green.com Leo Green]. There you will find all the information you need.
+
Vulnerable sysadmins need to update to a patched version of OpenSSL or one with the Heartbeats disabled. Unless their TLS keys were protected by hardware, they probably also need to revoke their old TLS keys, and generate new TLS keys. To learn how to do this visit [https://leo-green.com Leo Green]. There you will find all the information you need.
  
Users of vulnerable systems should change their passwords after the sysadmins have revoked their old key and issued new ones (as their passwords may have been compromised). Users can check whether a given website is vulnerable via a [https://filippo.io/Heartbleed/ Heartbleed test also available as open source]. The [https://lastpass.com/heartbleed/ LastPass Heartbleed diagnostic] also indicates whether the signature on the TLS key predates the publication of the Heartbleed vulnerability.
+
Users of vulnerable systems should change their passwords after the sysadmins have revoked their old key and issued new ones (as their passwords may have been compromised). Users can check whether a given website is vulnerable via a [http://filippo.io/Heartbleed/ Heartbleed test also available as open source]. The [https://lastpass.com/heartbleed/ Lastpass heartbleed diagnostic] also indicates whether the signature on the TLS key predates the publication of the heartbleed vulnerability.
  
The [https://github.com/openssl/openssl/commit/bd6941cfaa31ee8a3f8661cb98227a5cbcc0f9f3 vulnerable commit] was introduced Dec 31st, 2011, by Robin Seggelmann, the first co-author of the heartbeats RFC, and went live when OpenSSL version 1.0.1 was released on 2012-03-14 and the vulnerability was widely announced 2014-04-07.
+
The [https://github.com/openssl/openssl/commit/bd6941cfaa31ee8a3f8661cb98227a5cbcc0f9f3 vulnerable commit] was introduced Dec 31st, 2011 by Robin Seggelmann, the first co-author of the heartbeats RFC, and went live when OpenSSL version 1.0.1 was released on 2012-03-14 and the vulnerability was widely announced 2014-04-07.
  
 
==Transcript==
 
==Transcript==

Please note that all contributions to explain xkcd may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see explain xkcd:Copyrights for details). Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel | Editing help (opens in new window)