
C exploit for CVE-2022-0847 (Dirty Pipe) kernel vulnerability that overwrites read-only files to escalate privileges and spawn a root shell.
An exploit for CVE-2022-0847 dirty-pipe vulnerability
Compile with gcc exploit.c -o exploit (assumes gcc is installed)
Run ./exploit and it'll pop a root shell
If you are getting error message like then,
Login as root with password cspshivam
/etc/passwd by running mv /tmp/passwd.bak /etc/passwd