

This repository offers a comprehensive collection of exploits and documentation specifically designed for penetration testers and red team professionals. It serves as a valuable resource for those aiming to exploit the Linux Dirty Pipe vulnerability effectively.
Dirty Pipe (CVE-2022-0847) is a local privilege escalation vulnerability discovered in the Linux kernel. This security flaw allows an unprivileged user to perform several critical actions, including:
This vulnerability arises from improper handling of pipe buffer operations within the Linux kernel, enabling an attacker to inject malicious data into sensitive files. Consequently, it poses a significant threat to system integrity and security, necessitating immediate attention and patching.
The vulnerability affects Linux kernel versions newer than 5.8. Patches have been released for the following Linux kernel versions:
For more detailed information about the vulnerability, CVE-2022-0847.
An automated compiler Bash script is available to streamline the compilation process for both exploits.
Prerequisites Ensure you have GCC installed on your system. You can install it using the following command:
sudo apt-get install gcc
Compilation Steps
chmod +x compile.sh
./compile.sh
/etc/passwd file in /tmp/passwd.bak. Additionally, the exploit grants an elevated root shell and restores the original passwd file upon completion../exploit-1
find / -perm -4000 2>/dev/null
./exploit-2 /usr/bin/sudo