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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

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

Source
Associated Vulnerability
Title:Docker 操作系统命令注入漏洞 (CVE-2019-5736)
Description:Docker是美国Docker公司的一款开源的应用容器引擎。该产品支持在Linux系统上创建一个容器(轻量级虚拟机)并部署和运行应用程序,以及通过配置文件实现应用程序的自动化安装、部署和升级。 Docker 18.09.2之前版本和其他产品中的runc 1.0-rc6及之前版本中存在安全漏洞,该漏洞源于程序没有正确地处理文件描述符。攻击者可利用该漏洞覆盖主机runc的二进制文件并以root权限执行命令。
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

[4.0K] /data/pocs/b9d9e460e77eaa40a4ede4b59dc9ade6c3fac842 ├── [1006] Dockerfile ├── [1.7K] new_runc ├── [ 13K] overwrite_runc ├── [2.9K] overwrite_runc.c ├── [1.0K] README.md ├── [ 929] run_at_link.c └── [2.4M] Worksheet.pdf 0 directories, 7 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.