© Copyright 2014 Critical Watch

Heartbleed Bug

Critical Watch Logo

By Jesper "JJ" Jurcenoks, April 8, 2014
Last Updated April 14, 2014

Detecting Heartbleed

  1. Critical Watch online tester here heartbleed.criticalwatch.com
  2. Critical Watch FusionVM, detects vulnerable versions of OpenSSL since April 8, 2014 (Passive Assessment)
  3. Critical Watch FusionVM, detects vulnerable SSL/TLS connections on WWW, Mail (SMTP, IMAP, POP3) and FTP since April 10, 2014 (Active Assessment)
  4. Metasploit Heartbleed Module1
  5. Build your own heartbleed Detection using Open Source
    1. By Filippo Valsorda written in Google Go 1.25
    2. By 'Takeshix' and modified by Derek Callaway written in Python 2.76
    3. Port of "Takeshix' code by 'Vitaly Dyatlov' to Python 37
  6. ​OpenVAS wrapper for the Python 2.7 Heartbleed tester8
  7. NMAP Experimental Script11


Heartbleed Explained

  1. Vulnerability in OpenSSL handling of the SLL heartbeat request that triggers a buffer over-read, resulting in confidential Information being disclosed.
  2. Critical information has been shown to include:
    1. Usernames and passwords of current users
    2. Session Cookies
    3. Private SSL Keys.
  3. Vulnerable Protocols
    1. HTTPS
    2. SMTP
    3. IMAP 
    4. POP3
    5. FTP
    6. XMPP
  4. Not Vulnerable
    1. MS Windows IIS (watch out for IIS servers running behind Reverse Proxy or Load balancers based on Apache or nginx)
    2. OpenSSH
  5. List of Vulnerable Vendors and products at the end of this article 
  6. Technical on the Vuln: Attackers claims to send large payload (64Kb) but sends only a few bytes, OpenSSL only allocates as much space as it gets (few bytes), then uses the CLAIMED size (64Kb) to return the payload (meaning 64Kb of its own memory) - Viola! Buffer over-read14 



Try Now

Heartbleed is just one of the 60,000 vulnerabilities in our testing library

Get Critical Watch Automated Vulnerability Assessment today




Heartbleed Remediation for Companies

Stop the Heartbleed

  1. Upgrade OpenSSL
    • Upgrade 1.0.1-1.0.1f -> 1.0.1g
    • Upgrade 1.0.2.beta -> 1.0.2.beta2
  2. If you have a vulnerable version of OpenSSL and cannot upgrade the version you can locally make a version of OpenSSL 1.0.1 without the vulnerable heartbeat functionality by recompiling your OpenSSL with -DOPENSSL_NO_HEARTBEATS
  3. If you cannot fix the server Block the Attack in your IPS/NGFW:
    1. Snort rules12
    2. HP Tippingpoint filters: 13814 and 13817
  4. Patch your OS or Device, See list of Security advisories and updates from Vendors at the end of this article


Standards & IDs


OWASP OWASP 2004 Top 10  A5

WASC-07 Buffer overflow

CWE-126 Buffer Over-read
CWE-20 Improper input validation


PCI: Fail

- Integrity

Heartbleed Notes

  1. Evidence suggest that Heartbleed was first exploited in November 201313
  2. By 16:00 UTC on April 8, 637 of the top 10,000 web-sites were still vulnerable, many were patched soon after2
  3. The fatal change to OpenSSL that causes the Heartbleed was checked in on New Years Eve at 22:59 (local time)3
  4. Robert Graham found 600,000 vulnerable hosts of the 28 Million tested on the night between April 9 and 10, 20144
  5. The TLS Heartbeat function was introduced into the SSL protocol in RCF 6520 February 2012 as a Keep-alive mechanism to prevent the connection from timing out and having to be re-established9
  6. OpenSSL began supporting Heartbeat with Version 1.0.1 Released 14 March 2012 thus introducing the Heartbleed bug
  7. The heartbleed Bug was known for a few days by the people who discovered it before news was released to the public16

FusionVM Advantages:

  • Powerful flexible reporting
  • Credentialed Scan
  • Policy compliance checks
  • Pre-scan early warning system

​More FusionVM advantages and pricing...


Subscribe to our useful learning series of articles and receive more articles like this.

Share page 

Present this information to your team using our FREE! presentation on Heartbleed

Why spend time turning this article into a presentation when we have done the work for you?

Click here to download the presentation (registration required) - In progress

By exploiting a flaw in the Heartbeat request implementation in OpenSSL, that attacker can learn confidential information including Private SSL Keys from the server.

In Progress: powerpoint version of this article

by xkcd

Video Explaining Heartbleed

Video Explaining Heartbleed
Jesper Jurcenoks, VP of Research explains Heartbleed on the Whiteboard
Yahoo.com's new Certificate issued after they were vulnerable to Heartbleed and username and passwords were stolen.

Vulnerable Systems

  • OpenSSL <1.0.1
  • Apache
  • nginx
  • Debian Wheezy (stable), OpenSSL 1.0.1e-2+deb7u4
  • Ubuntu 12.04.4 LTS, OpenSSL 1.0.1-4ubuntu5.11
  • CentOS 6.5, OpenSSL 1.0.1e-15
  • Fedora 18, OpenSSL 1.0.1e-4
  • OpenBSD 5.3 (OpenSSL 1.0.1c 10 May 2012) 
  • OpenBSD 5.4 (OpenSSL 1.0.1c 10 May 2012)
  • FreeBSD 10.0 - OpenSSL 1.0.1e 11 Feb 2013
  • NetBSD 5.0.2 (OpenSSL 1.0.1e)
  • OpenSUSE 12.2 (OpenSSL 1.0.1c)

Deal with the Data loss

  1. Use an online heartbleed checker to make sure your servers are safe 
  2. Revoke your existing SSL Certificates and get new ones - (WITH A NEW KEY!19)
  3. Reset all your users passwords
  4. Invalidate all sessions and cookies.

Check this list of Major Internet Sites and see their Heaertbleed status.

According to Cynthia Rose16 your company could be on the hook for legally required breach notifications going 2 years back, since either:

  1. Usernames and passwords were stolen in cleartext
  2. SSL encryption Keys were breached.


Heartbleed Security Advisories from Vendors

  • Aruba - http://www.arubanetworks.com/support/alerts/aid-040814.asc
  • Bluecoat - http://kb.bluecoat.com/index?page=content&id=SA79
  • CACert - https://blog.cacert.org/2014/04/openssl-heartbleed-bug/
  • Cisco - http://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20140409-heartbleed
  • CheckPoint - https://supportcenter.checkpoint.com/supportcenter/portal?F5 - http://support.f5.com/kb/en-Debian - https://lists.debian.org/debian-security-announce/2014/msg00072.html
  • eventSubmit_doGoviewsolutiondetails=&solutionid=sk100173
  • us/solutions/public/15000/100/sol15159.html
  • Fortinet - http://www.fortiguard.com/advisory/FG-IR-14-011/
  • Gentoo Linux - http://www.gentoo.org/security/en/glsa/glsa-201404-07.xml
  • Juniper -  http://kb.juniper.net/InfoCenter/index?page=content&id=KB29004 (login required)
  • Juniper - http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10623
  • Novell - http://support.novell.com/security/cve/CVE-2014-0160.html 
  • openssl - https://www.openssl.org/news/secadv_20140407.txt
  • OpenVPN - https://community.openvpn.net/openvpn/wiki/heartbleed
  • redhat - https://access.redhat.com/security/cve/CVE-2014-0160
  • Slackware - hxxp://www.slackware.com/security/viewer.php?l=slackware-security&y=2014&m=slackware-security.533622
  • Sophos - http://blogs.sophos.com/2014/04/09/sophos-utm-manager-and-openssl-vulnerability/
  • sparklabs/viscosity openvpn client - https://www.sparklabs.com/viscosity/releasenotes/
  • Ubuntu Security Notice: http://www.ubuntu.com/usn/usn-2165-1/
  • viscosity - https://www.sparklabs.com/blog/
  • watchguard - http://watchguardsecuritycenter.com/2014/04/08/the-heartbleed-openssl-vulnerability-patch-openssl-asap/
Free online Heartbleed Tester
Heartbleed Explained by xkcd

Brilliant Heartbleed Explanation by xkcd

Should I change my Password or what?

Short answer:

  • If you logged into Yahoo Mail between Monday April 7 Afternoon and Tuesday April 8 Afternoon, change your password now!
  • Otherwise be normally vigilant, use different passwords for each site and use a password manager15

Long Answer:

  1. If you don't login to the web-site - e.g. No username and password - don't worry - Keep surfing.
  2. If the web-site does not use "https (lock symbol) and you still login
    1. Heartbleed does not affect this web-site
    2. This web-site is already more insecure than a web-site with the Heartbleed bug.
  3. Check The Heartbleed hit list for a status of popular web-sites 
  4. Check the web-site using our online Heartbleed tester if they are vulnerable - do not login - if you logged in to the web-site since April 7 2014, assume your password could be compromised and change your passwords on other web-sites where you use the same username and password!
  5. Check the date of the certificate on the web-site and make sure it has been renewed on 2 April 2014 or later18
How to check certificate date
how to check certificate date

In this example Yahoo.com changed its certifcate after remdiating the Heartbleed bug and it is now safe to login - if you logged into yahoo between Monday April 7 afternoon (us time) and Tuesday April 8 (Afternoon), then you need to change your password.

Question: My favorite web-site is not vulnerable now and they didn't change their Certificate - how can I tell if they were vulnerable in the past to Heartbleed?
Answer: Unless someone posted the answer to that question online then you will have to ask their support.

Question: Why only worry about sites I have used since April 7, 2014 - when the Heartbleed bug has existed since March 14, 2012?
Answer: Mass exploitation of the bug did not start until April 7, indications of exploitations before that date are very rare13

Please correct the following errors: