
pwncat module that automatically exploits CVE-2022-0847 (dirtypipe)
pwncat module that automatically exploits CVE-2022-0847 (dirtypipe)
The purpose of this module is to attempt to exploit CVE-2022-0847 (dirtypipe) on a target when using pwncat.
There is no need to setup any directories, compile any source or even have gcc on the remote target; the dirtypipe module takes care of this automatically using the pwncat framework.
dirtypipe.py somewhere on your host where pwncat-cs is installed. ie: /home/user/pwncat_modsload /home/user/pwncat_modssearch dirtypipe. You should see something like this:(local) pwncat$ search dirtypipe
Results
╷
Name │ Description
══════════════════╪══════════════════════════════════════════════════════════════════════════════════════════════
dirtypipe │ Exploit CVE-2022-0847 to local privesc to root via dirtypipe
run dirtypipe. If it's successful, you should see the UID change to 0, and now be root. ie:(local) pwncat$ run dirtypipe
load, you can have pwncat automatically load this module on startup by placing it in ~/.local/share/pwncat/modules# Set the gcc path
set cross "/usr/bin/gcc"
A special shout out to Caleb Stewart for having an awesome framework to build this on top of.