Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2022-0847-DirtyPipe-Exploits — C exploit collection for Linux Dirty Pipe (CVE-2022-0847) local privilege escalation, including read-only file overwriting and SUID binary hijacking, with automated compilation and vulnerability scanning. | Kitploit
Tools/GitHubGitHub/eduquintanilha/cve-2022-0847-dirtypipe-exploits
Privilege EscalationVulnerability AnalysisExploitationPenetration TestingRed TeamingBinary Exploitation
GitHubeduquintanilha/cve-2022-0847-dirtypipe-exploits

CVE-2022-0847-DirtyPipe-Exploits

Share

C exploit collection for Linux Dirty Pipe (CVE-2022-0847) local privilege escalation, including read-only file overwriting and SUID binary hijacking, with automated compilation and vulnerability scanning.

View Repository
31234 years agoNot yet reviewed

Dirty Pipe

CVE-2022-0847-DirtyPipe-Exploits

A collection of exploits and documentation for penetration testers and red teamers that can be used to aid the exploitation of the Linux Dirty Pipe vulnerability.

About The Vulnerability

  • Dirty Pipe (CVE-2022-0847) is a local privilege escalation vulnerability in the Linux kernel that could potentially allow an unprivileged user to do the following:
    • Modify/overwrite arbitrary read-only files like /etc/passwd.
    • Obtain an elevated shell.

Affected versions

  • Linux kernel versions newer than 5.8 are affected.
  • So far the vulnerability has been patched in the following Linux kernel versions:
    • 5.16.11
    • 5.15.25
    • 5.10.102
  • You can learn more about the vulnerability here: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-0847

DirtyPipe Vulnerability Scanner

  • If you are not sure if a target system is vulnerable, use this really cool bash script developed by @basharkey.
  • DirtyPipe Checker: https://github.com/basharkey/CVE-2022-0847-dirty-pipe-checker

Compiling the exploit

  • An automated compiler bash script has been provided to you to automate the compilation of both exploits.
  • In order to compile the exploit succesfully, you will need to have GCC installed.
sudo apt-get install gcc
  • After installing GCC, you can run the 'compile.sh" script as follows:
chmod +x compile.sh
./compile.sh

Exploit-1 - Modifying/overwriting read only files

  • This repo contains 2 exploits, the 'exploit-1.c' exploit can be used to modify or overwrite arbitrary read only files.
  • This exploit is a proof of concept that was developed by Max Kellermann and has been modified to change the root password in the /etc/passwd file, consequently providing you with access to an elevated shell.

Running the exploit binary

  • The exploit code has already been configured to replace the root password with the password "piped" and will take a backup of the /etc/passwd file under /tmp/passwd.bak. Furthermore, the exploit will also provide you with an elevated root shell and will restore the original passwd file when done.
./exploit-1

Exploit-2 - Hijacking SUID binaries

  • This exploit can be used to inject and overwrite data in read-only SUID process memory that run as root.

Finding SUID binaries

find / -perm -4000 2>/dev/null

Running the exploit binary

./exploit-2 /usr/bin/sudo

Important Note

  • I do not claim credit/ownership/disclosure of the vulnerability and all corresponding exploits hosted in this GitHub repo.
  • All the credit goes to the awesome Max Kellerman, you can check out the official disclosure here: https://dirtypipe.cm4all.com/

Credits

  • https://github.com/febinrev/dirtypipez-exploit
  • https://github.com/basharkey/CVE-2022-0847-dirty-pipe-checker
Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    916
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    558
  • 3

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    370
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    360
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    317
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    289

Explore all tools

Browse our collection of tools

View all tools →