Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/victoriacfigueiredo/heartbleed-lab
Vulnerability AnalysisNetwork SecurityCryptographyLearning & EducationBinary ExploitationLabs & Practice
GitHubvictoriacfigueiredo/heartbleed-lab

heartbleed-lab

Educational laboratory for studying CVE-2014-0160 (Heartbleed) and framing inconsistencies in TLS heartbeat handling.

View Repository
83 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Heartbleed Lab

Educational laboratory for studying the Heartbleed vulnerability
(CVE-2014-0160) using a real vulnerable OpenSSL environment inside Docker.

This project reproduces a vulnerable TLS server using OpenSSL 1.0.1f and implements a custom raw TLS heartbeat client to demonstrate how malformed heartbeat packets can trigger memory disclosure.

The lab was created for educational and research purposes, especially for studying:

  • TLS record framing
  • Heartbeat extension parsing
  • Memory disclosure vulnerabilities
  • Parser trust failures
  • Framing inconsistencies across protocols
  • Conceptual similarities between Heartbleed and HTTP desynchronization vulnerabilities

Current Project Structure

root@kitploit:~
heartbleed-lab/
├── client/
│   ├── attacker.py
│   └── Dockerfile
│
├── vulnerable/
│   ├── Dockerfile
│   └── server/
│
├── fixed/
│   ├── Dockerfile
│   └── server/
│
├── docs/
│   └── diagrams/
│
├── notes/
│
├── docker-compose.yml
├── .gitignore
└── README.md

Architecture

root@kitploit:~
heartbleed-client
        ↓
 Docker internal network
        ↓
vulnerable-heartbleed

Where:

  • heartbleed-client sends raw TLS records
  • vulnerable-heartbleed runs OpenSSL 1.0.1f
  • communication occurs inside an isolated Docker network

Vulnerable Environment

The vulnerable server uses:

  • Ubuntu 14.04
  • OpenSSL 1.0.1f (2014 vulnerable release)
  • openssl s_server

The environment is intentionally configured to reproduce the original Heartbleed behavior.


Implemented Features

Vulnerable TLS Server

  • Real OpenSSL 1.0.1f build
  • TLS handshake support
  • Heartbeat extension enabled
  • Docker-isolated environment

Raw TLS Heartbeat Client

The client implementation:

  • creates raw TCP sockets
  • sends handcrafted TLS records
  • performs a manual TLS ClientHello
  • sends malformed heartbeat requests
  • receives leaked memory responses

Heartbleed Demonstration

The current implementation reproduces the original Heartbleed behavior by sending a malformed heartbeat packet where:

root@kitploit:~
payload_length > real payload size

Example:

root@kitploit:~
Declared payload length: 0x4000
Real payload: 1 byte ("A")

The vulnerable server incorrectly trusts the declared length and responds with memory contents beyond the actual payload boundaries.


Running the Lab

Build and start containers

root@kitploit:~
sudo COMPOSE_HTTP_TIMEOUT=300 docker-compose up --build

Access the client container

root@kitploit:~
sudo docker exec -it heartbleed-client bash

Run the Heartbleed proof-of-concept

root@kitploit:~
python attacker.py

Example Successful Output

root@kitploit:~
[+] Sending malformed heartbeat
[+] Got TLS record: type=24 version=(3, 2) length=16384
[!!!] Heartbeat response received

This indicates that the vulnerable server returned memory contents beyond the legitimate heartbeat payload.


Research Goals

This project explores the relationship between:

  • TLS framing inconsistencies
  • parser trust failures
  • boundary confusion
  • malformed length fields
  • protocol desynchronization concepts

One of the main research interests of this lab is comparing:

root@kitploit:~
HTTP Request Smuggling
vs
TLS Heartbeat Parsing Failures

from the perspective of:

  • framing inconsistencies
  • parser behavior
  • metadata trust assumptions

Future Work

Planned next steps include:

  • improved leak visualization
  • memory leak parsing helpers
  • comparison against patched OpenSSL versions
  • intermediary TLS proxy experiments
  • automated heartbeat mutation testing

References

  • CVE-2014-0160
  • RFC 6520 (TLS Heartbeat Extension)

Disclaimer

This repository exists solely for:

  • education
  • academic research
  • defensive security studies
Download Tool