关联漏洞
标题:
Docker 操作系统命令注入漏洞
(CVE-2019-5736)
描述:Docker是美国Docker公司的一款开源的应用容器引擎。该产品支持在Linux系统上创建一个容器(轻量级虚拟机)并部署和运行应用程序,以及通过配置文件实现应用程序的自动化安装、部署和升级。 Docker 18.09.2之前版本和其他产品中的runc 1.0-rc6及之前版本中存在安全漏洞,该漏洞源于程序没有正确地处理文件描述符。攻击者可利用该漏洞覆盖主机runc的二进制文件并以root权限执行命令。
介绍
# Usage
Edit HOST inside `payload.c`, compile with `make`. Start `nc` and run `pwn.sh` inside the container.
# Notes
- This exploit is destructive: it'll overwrite `/usr/bin/docker-runc` binary *on the host* with the
payload. It'll also overwrite `/bin/sh` inside the container.
- Tested only on Debian 9.
- No attempts were made to make it stable or reliable, it's only tested to work when a `docker exec
<id> /bin/sh` is issued on the host.
The original commit I used to write the exploit is [here](https://github.com/lxc/lxc/commit/6400238d08cdf1ca20d49bafb85f4e224348bf9d).
The researchers who actually found the vulnerability have published a writeup
[here](https://web.archive.org/web/20190213095645/https://blog.dragonsector.pl/2019/02/cve-2019-5736-escape-from-docker-and.html).
I've added the original exploit `CVE_2019_5736_tar_xz` which works differently than mine. Thanks to
[cyphar](https://github.com/cyphar) for pointing me to it.
文件快照
[4.0K] /data/pocs/e997b80016368a063b18d3e056584d4b22625ca7
├── [4.0K] CVE-2019-5736
│ ├── [1.5K] bad_init.sh
│ ├── [2.8K] bad_libseccomp.c
│ ├── [2.3K] make.sh
│ └── [2.8K] README.md
├── [3.5K] CVE_2019_5736.tar.gz
├── [3.5K] CVE_2019_5736_tar_xz
├── [6.2K] exploit
├── [1.4K] exploit.c
├── [ 75] Makefile
├── [6.2K] payload
├── [ 647] payload.c
├── [ 52] push.sh
├── [ 455] pwn.sh
└── [ 951] README.md
1 directory, 14 files
备注
1. 建议优先通过来源进行访问。
2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。