Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2019-5736 PoC — Docker 操作系统命令注入漏洞

Source
Associated Vulnerability
Title: Docker 操作系统命令注入漏洞 (CVE-2019-5736)
Description:runc through 1.0-rc6, as used in Docker before 18.09.2 and other products, allows attackers to overwrite the host runc binary (and consequently obtain host root access) by leveraging the ability to execute a command as root within one of these types of containers: (1) a new container with an attacker-controlled image, or (2) an existing container, to which the attacker previously had write access, that can be attached with docker exec. This occurs because of file-descriptor mishandling, related to /proc/self/exe.
Description
Proof of concept code for breaking out of docker via runC
Readme
# Breaking out of Docker via RunC
A proof of concept code for CVE-2019-5736

This POC is heavily based on [YuvalAvra's POC](https://github.com/twistlock/RunC-CVE-2019-5736).
I do not claim any credit for the code utilised in this POC.

More information about this vulnerability and a demonstration of how it can be exploited can be found in the [worksheet](Worksheet.pdf).
Information in the worksheet is based a [blog post](https://www.twistlock.com/labs-blog/breaking-docker-via-runc-explaining-cve-2019-5736/)
by Twistlock Labs.

## Usage
This POC has the ability to modify binaries on the host system, therefore, is recommended to be conducted in a virtual machine.

The POC overwrites runC on the host machine with code to setup a persistent remote desktop using VNC

Clone the repository:
```shellscript
$ git clone https://github.com/RyanNgWH/CVE-2019-5736-POC
```

Build and run the Docker image:
```shellscript
$ docker build -t image_name:latest /path/to/malicious_image_POC
$ docker run --rm image_name:latest
```
File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →