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:runc through 1.0-rc6, as used in Docker before 18.09.2 and other products, allows attackers to overwrite the host runc binary (and consequently obtain host root access) by leveraging the ability to execute a command as root within one of these types of containers: (1) a new container with an attacker-controlled image, or (2) an existing container, to which the attacker previously had write access, that can be attached with docker exec. This occurs because of file-descriptor mishandling, related to /proc/self/exe.
Description
getshell test
Readme
To run:  
   - (1). edit poc command in stage2.c  
   - (2). build docker `docker build -t cve .`  
   - (3). run docker  `docker run -d cve /bin/bash -c "tail -f /dev/null"`  
   - (4). backup docker-runc  `cp /usr/bin/docker-runc /usr/bin/docker-runc.bak`  
   - (5). `docker exec -it docker-id /bin/bash`  
   - (6). in docker run `cd /root && ./run.sh && exit`  
   - (7). `docker exec -it docker-id /bin/bash`,bingo!!  

    run `strings /usr/bin/docker-runc | tail -n 2` view docker-runc  
    run  `cp /usr/bin/docker-runc.bak /usr/bin/docker-runc` recovery docker-runc  
File Snapshot

[4.0K] /data/pocs/6ea16398a54632e9a72dc8e53a7bbedadc10af2f ├── [ 369] Dockerfile ├── [ 579] README.md ├── [ 265] run.sh ├── [ 528] stage1.c └── [ 585] stage2.c 0 directories, 5 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →