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

目标: 1000 元 · 已筹: 1336

100%

CVE-2021-38185 PoC — cpio 输入验证错误漏洞

来源
关联漏洞
标题: cpio 输入验证错误漏洞 (CVE-2021-38185)
Description:cpio是一款用于类UNIX系统的文件备份程序。 cpio 中存在安全漏洞。允许攻击者通过精心设计的模式文件执行任意代码,因为 dstring.c ds_fgetstr 整数溢出会触发越界堆写入。
Description
ACE poc exploit for glibc cpio 2.13 through mmap chunk metadata curruption (CVE-2021-38185)
介绍
# cpiopwn (CVE-2021-38185)
This is an ACE POC of an integer overflow bug in cpio. This exploit bypasses all binary protections except full RELRO. This exploit uses cpio 2.13 and libc 2.31. Video demo: https://youtu.be/F0yKJhu7Vak 

## Running the exploit

We've provided a Kali Dockerfile to run the exploit. The same exploit should work outside the Docker container, but offsets may be different.

### Instructions
* Build the file
  * `sudo docker build -t cpiopwn .`
* Start the image and mount files
  * `sudo docker run --mount type=bind,source=$(pwd),destination=/cpiopwn -it cpiopwn /bin/bash`
* `cd cpiopwn`
* Run the exploit, which will build a pattern file with `docker_fengshui.py` and call cpio with a large number of command line arguments.
  * `python3 exploit.py`

And that's it! After building the malicious pattern file, a prompt will show up, and it will start processing commands after a little bit of time.

### Notes
The exploit may take about a minute after the prompt appears before it starts responding to commands. We've provided a video of it running to show what should happen.

Additionally, the exploit may only work on computers with at least 12 GB of RAM, as it forces cpio to read gigabytes of input. We had some issues with servers running out of RAM with previous versions of the exploit - the current version has been tested on computers with 12 and 16 GB of RAM, but not smaller.

```
    |\__/,|   (`\
  _.|o o  |_   ) )
-(((---(((--------
```
文件快照

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

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