pwncat 模块,用于自动利用 CVE-2022-0847 (dirtypipe)
该模块的目的是在使用 pwncat 时,尝试在目标上利用 CVE-2022-0847 (dirtypipe)。
无需在远程目标上设置任何目录、编译任何源代码,甚至无需安装 gcc;dirtypipe 模块会利用 pwncat 框架自动处理这一切。
dirtypipe.py 复制到主机上安装 pwncat-cs 的某个位置。例如:/home/user/pwncat_modsload /home/user/pwncat_modssearch dirtypipe。您应该会看到类似这样的内容:(local) pwncat$ search dirtypipe
Results
╷
Name │ Description
══════════════════╪══════════════════════════════════════════════════════════════════════════════════════════════
dirtypipe │ Exploit CVE-2022-0847 to local privesc to root via dirtypipe
run dirtypipe。如果成功,您应该会看到 UID 变为 0,并成为 root 用户。例如:(local) pwncat$ run dirtypipe
load,可以将该模块放在 ~/.local/share/pwncat/modules 中,让 pwncat 在启动时自动加载。# Set the gcc path
set cross "/usr/bin/gcc"
特别感谢 Caleb Stewart 提供了如此出色的框架,让我们能够在此基础上进行构建。