Proof of concept for exploiting the Heartbeat Extension bug detailed in the CVE-2014-0160. :old_key: :unlock:Heartbleed (CVE-2014-0160)
==========
## Setup
You will require **docker** in order to perform the setup.
The exploit, dynamically generates the random bytes from the Client Hello message,
therefore you will need to link the library when building the executable.
The required package to be installed, in order to link properly:
```
sudo apt-get install libssl-dev
```
The tool was tested on ***Docker for Desktop - Version: 20.10.21*** with ***WSL 2***.
The steps to reproduce the vulnerability are:
1. Vulnerable server initialization
```
cd server-image/
docker build -t <image_name> .
docker run -d -p <port>:443 --name <name> <image_name>
```
2. Starting the script
```
cd ..
gcc -o heartbleed heartbleed.c -lcrypto
./heartbleed <ip> <port>
```
**You do need to specify the correct port.**

## Preview
| Thesis | Presentation |
|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|
| <a href="article/export.pdf"><kbd><img src="article/preview.png" width="400px" alt="Article preview"></kbd></a> | <a href="presentation/export.pdf"><kbd><img src="presentation/preview.png" width="400px" alt="Presentation preview"></kbd></a> |
[4.0K] /data/pocs/cddea7315e6f167985d6ed56f5933fa34e38dec3
├── [4.0K] article
│ ├── [219K] export.pdf
│ ├── [281K] preview.png
│ └── [4.0K] project
│ ├── [1.6K] bibliography.bib
│ ├── [275K] IEEEtran.cls
│ ├── [4.0K] images
│ │ └── [173K] heartbeat-packet.png
│ └── [ 17K] main.tex
├── [2.8K] Dockerfile
├── [ 21K] heartbleed.c
├── [4.0K] presentation
│ ├── [455K] export.pdf
│ ├── [ 44K] preview.png
│ └── [4.0K] project
│ ├── [4.0K] Images
│ │ ├── [ 52K] creodocs_logo.pdf
│ │ ├── [173K] heartbeat-packet.png
│ │ ├── [7.1K] heartbleed.png
│ │ ├── [431K] Hokie2.png
│ │ ├── [ 26K] Newey et al Graph.PNG
│ │ ├── [3.1K] Slide Logo.png
│ │ └── [359K] xkcd.png
│ └── [ 13K] template.tex
├── [1.6K] README.md
├── [4.0K] resources
│ └── [ 20K] heartbleed-dump.png
└── [4.0K] server-image
├── [1.2K] Dockerfile
└── [4.0K] web
└── [1.3K] index.html
9 directories, 22 files