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
Exploit for the CVE-2019-5736 runc vulnerability
Readme
# cve-2019-5736-exp

This is a proof-of-concept (PoC) exploit for the CVE-2019-5736 vulnerability in
runc, the runtime used in Docker.

## Disclaimer

I undertook this project as an exercise, for educational reasons and for fun.
It should go without saying that I do not support unethical and/or illegal
misuse of this code.

## Description

The vulnerability was discovered by [Adam Iwaniuk] and [Borys Popławski] and
described in this [blog post][ds]. Thanks for the great research!

[Adam Iwaniuk]: https://twitter.com/adam_iwaniuk
[Borys Popławski]: https://twitter.com/boryspop
[ds]: https://blog.dragonsector.pl/2019/02/cve-2019-5736-escape-from-docker-and.html

## Usage

To build a malicious container:

```
docker build .
```

Running this container will cause the runc binary to be overwritten with the
contents of the `payload` file, i.e.

```
docker run <image_id>
```

Next time runc is executed (e.g when a different container is run), the host
will execute your payload.
File Snapshot

[4.0K] /data/pocs/2703734f5c27c6637d396e5a50bff4dde1f00673 ├── [ 842] Dockerfile ├── [1.5K] evil.c ├── [ 38] payload └── [ 988] README.md 0 directories, 4 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.