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
cve_2019-5736-PoC — C-based PoC for CVE-2019-5736 | Kitploit
Tools/GitHubGitHub/perimora/cve_2019-5736-poc
Privilege EscalationContainer SecurityVulnerability AnalysisExploitationLearning & EducationContainer Escape
GitHubperimora/cve_2019-5736-poc

cve_2019-5736-PoC

C-based PoC for CVE-2019-5736

View Repository
1 year 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

CVE-2019-5736 PoC

This repository contains a C-based proof-of-concept exploit for CVE-2019-5736.

This vulnerability allows a malicious Docker container to overwrite the host's runc binary and execute arbitrary commands on the host with root privileges – fully compromising the host system.

Inspired by the original Go-based PoC by Frichetten

Disclaimer

This code is for educational purposes only. Do not run it on any system you do not own or have permission to test. Misuse may result in legal consequences.

Contents

  1. Project Structure
  2. Environment Setup & Installation
  3. Usage

1. Project Structure

root@kitploit:~
.
├── docker/                       
│   └── Dockerfile
├── lib/                           
│   └── exploit.h
├── scripts/                       
│   ├── build_docker.sh
│   ├── purge_docker_installation.sh
│   ├── setup_env.sh
│   ├── start_docker.sh
│   └── trigger_exploit.sh
├── src/                         
│   ├── exploit.c
│   └── main.c
├── LICENSE
├── Makefile
└── README.md

2. Environment Setup & Installation

This exploit has been tested on:

  • Ubuntu 18.04.1 → Download ISO
  • Docker 18.09.1 → Download binaries

Step-by-step Installation

0. Install dependencies

root@kitploit:~
sudo ./scripts/install_dependencies.sh

Note: You can safely skip this if you already have installed wget and build-essential.

1. Install Docker via script

root@kitploit:~
sudo ./scripts/setup_env.sh

This script installs Docker without systemd or socket activation. It’s ideal for VM labs.

2. Start Docker manually

root@kitploit:~
sudo dockerd

Note: You’ll need a second terminal to run this in the background.

3. Build the exploit container

root@kitploit:~
sudo ./scripts/build_docker.sh

This script compiles the exploit and builds a Docker image with the binary inside.

Note: You can also manually build the exploit binary by running make.

Optional: Clean up the environment

You can completely remove Docker and restore the system to a pre-installation state:

root@kitploit:~
sudo ./scripts/purge_docker_installation.sh

3. Usage

First we start our exploit container. You can either use this command:

root@kitploit:~
sudo docker run -it --name exp --rm runc_exploit

or the included shell script:

root@kitploit:~
sudo ./scripts/start_docker.sh

Inside the container we can now start our exploit binary:

root@kitploit:~
./exploit -c "$COMAND"

The binary takes three arguments: -h prints the usage message and -c defines the command string payload we want to execute on the host. The last -d argument toggles debug prints during execution. (eg. parsing information of /proc)

Note: If the -c argument is not provided the exploit will execute cp /etc/shadow > /tmp/pwned && chmod 644 /tmp/pwned.

The exploit now waits for an incomming runc process on the host execute

root@kitploit:~
sudo ./scripts/trigger_exploit.sh

This script will open a new process inside the container executing bin/sh and therefore triggering the exploit.

Note: You could also trigger the exploit by manually executing docker exec on the host but the timing is critical for the current PoC version to work. So it could take a few tries...

If runc was exploited successfully you should see a similiar output:

output

We are now able to open our pwned shadow file:

shadow

Download Tool