OWASP Exercises: Exploiting the Heartbleed Bug

Developed with

Lab Steps

Logging into the Microsoft Azure Portal
Connecting to the Lab Host Virtual Machine Using RDP
Load the Virtual Machines (Kali & Heartbleed)
Navigate to the Victim Website
Test to Confirm the Webserver is Vulnerable
Create Data to Extract from the Server
Configure MetaSploit to Exploit the Heartbleed Server
Exploit the Heartbleed Server

Ready for the real environment experience?

Time Limit1h
star star star star star-half


The Heartbleed bug is a serious vulnerability that was found to exist on webservers using the OpenSSL cryptographic library, a popular implementation of the TLS protocol for webservers. This exploit will work on any unpatched webservers running an OpenSSL instance in either client or server mode. The vulnerability was disclosed in 2014, although the bug was found to have been present since a software patch in September 2012. It allows attackers to perform a buffer overflow attack, where they can read more information than they should be allowed to and can, therefore, read the entire contents of a webserver's memory buffer - an area where the server stores data ready for processing or that is yet to be overwritten by other processes. This could include passwords, key strings, hashes and all manner of other sensitive information that other users are inputting onto the server during normal use.

In this lab, you will perform the Heartbleed attack using the MetaSploit Framework in order to dump the contents of a vulnerable webserver using an unpatched version of OpenSSL.

Learning Objectives

Upon completion of this lab you will be able to:

  • Set up MetaSploit to exploit a server vulnerable to Heartbleed attacks

Intended Audience

This lab is intended for:

  • Individuals who want to learn how to defend their servers against Heartbleed attacks
  • Security engineers who want to understand whether their servers are vulnerable to attacks
  • Individuals who want to understand how a Heartbleed attack is performed on a server


This lab has no prerequisites.

About the Author

Richard Beck is Head of Cyber Security at QA, responsible for the entire Cyber Security portfolio. He works with customers to build effective and successful security training solutions tailored to business needs. Richard has over 10 years' experience in senior Information Security roles. Prior to QA, Richard was Head of Information Security for four years at Arqiva, which underpin 20% of the UK's Critical National Infrastructure. Richard also held Security and Technical Management posts at CPP, GEC, Pearson and the Royal Air Force. Richard sits on the IBM European Board of Security Advisors and previously chaired the Communication Industry Personnel Security Information Exchange (CPNI).