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
dirtypipe — DirtyPipe (CVE-2022-0847) exploit written in Rust | Kitploit
Tools/GitHubGitHub/morgenm/dirtypipe
Privilege EscalationExploitationShellcodeLearning & EducationPayload DevelopmentBinary Exploitation
GitHubmorgenm/dirtypipe

dirtypipe

DirtyPipe (CVE-2022-0847) exploit written in Rust

View Repository
125Jul 5, 2025Not yet reviewed
Share
Website

DISCLAIMER

This code is for educational and research purposes only.

Do not use it on systems you do not own or have permission to test.

The author is not responsible for any misuse, damage, or legal consequences resulting from the use of this code.

DirtyPipe (CVE-2022-0847)

View the writeup for this exploit on my blog. This is an implementation of the DirtyPipe (CVE-2022-0847) exploit I wrote in Rust based on Max Kellermann's writeup. The program allows you to overwrite specific files or to overwrite an SUID binary in order to escalate privileges.

Features

  • Check if kernel version is vulnerable
  • Overwrite any file with data from specified input file
  • Overwrite a SUID binary (default passwd) to gain root
  • Backup target files to /tmp before exploitation

Usage

Overwriting a file

First create an input file. The data within this file will be used to overwrite the target. Then, simply run the following:

./dirtypipe_exploit -m overwrite -i input.txt -o target_file -b offset

Where offset is the offset in bytes to begin writing in the file. The offset must not be on a page boundary and writing cannot cros a page boundary, due to the nature of the vulnerability.

SUID for Privilege Escalation

SUID mode will replace a specified SUID binary with a given ELF payload. The suid ELF is provided in the release on this repo and will be used by the exploit unless otherwise specified in the options. Additionally, you can generate this on your own, or modify the payload using the gen_suid.py pwntools script and the loader.asm file. This option will be discussed below. The exploit sets the target to /usr/bin/passwd by default.

Run the following to replace /usr/bin/passwd with the provided payload (spawns a shell as root):

./dirtypipe_exploit -m suid

Then run /usr/bin/passwd to get a root shell.

To generate your own payload, follow these steps:

  1. Run the gen_suid.py script, which uses pwntools to generate a payload (shellcode.bin) that spawns a root shell. Modify it as you see fit.
  2. Create the ELF binary payload by running nasm -f bin -o [PAYLOAD_NAME] loader.asm. This will turn the shellcode.bin file into an executable.
  3. Run ./dirtypipe_exploit -m suid -i [PAYLOAD_NAME] -o [TARGET_FILE].
  4. Execute the target to gain root.

Thank you to the author of STALKR's BLOG for the 64-bit Tiny ELF header (here).

Download Tool

Related Tools

  • PEASS-ng

    PEASS - Privilege Escalation Awesome Scripts SUITE (with colors)

  • PrivescCheck

    Privilege Escalation Enumeration Script for Windows

  • LinEnum

    Scripted Local Linux Enumeration & Privilege Escalation Checks

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    Callisto

    jetp1ane/callisto

    Automated binary vulnerability analysis tool that decompiles executables via Ghidra, scans pseudo-C code with Semgrep, and validates findings using GPT-3.5-Turbo to reduce false positives.

    2.2k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    One-tap Android kernel exploit app for CVE-2026-43499, providing privilege escalation via kernel module loading, with offset extraction and on-device analysis tools.

    854
  • 3

    DFRoot

    a2333c/dfroot

    Android root tool for Samsung Galaxy S25 Ultra (SM-S938B) that chains DirtyFrag CVE-2026-43284 and CVE-2026-43499 to gain root automatically at boot via KernelSU.

    439
  • 4

    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.

    373
  • 5

    ARTEX

    baarai/artex

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

    365
  • 6

    wifit3

    derv82/wifit3

    Wifite but USB-only & cross-platform.

    336

Explore all tools

Browse our collection of tools

View all tools →