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
linux-privilege-escalation — Scripted Linux Privilege Escalation for the CVE-2022-0847 "Dirty Pipe" vulnerability | Kitploit
Tools/GitHubGitHub/rexpository/linux-privilege-escalation
Privilege EscalationVulnerability AnalysisExploitationPost-ExploitationPenetration TestingBinary Exploitation
GitHubrexpository/linux-privilege-escalation

linux-privilege-escalation

Share

Scripted Linux Privilege Escalation for the CVE-2022-0847 "Dirty Pipe" vulnerability

View Repository
99264 years agoNot yet reviewed

Linux Privilege Escalation

Bash script to check and exploit the CVE-2022-0847 Linux "Dirty Pipe" vulnerability

About this Proof of Concept

This script allows an unprivileged user on a vulnerable system to do the following:

  • Modify/overwrite read-only files like /etc/passwd.
  • Obtain an elevated shell

This repo contains 2 exploits:

Exploit 1:

Replaces the root password with the password "piped" and backups the original /etc/passwd file under /tmp/passwd.bak. Then, the exploit provides you with access to an elevated root shell and restores the original passwd file when you exit the shell.

Exploit 2:

Injects and overwrites data in read-only SUID process memory that run as root.

Usage

Clone this repository and change working directory

git clone https://github.com/rexpository/linux-privilege-escalation.git
cd linux-privilege-escalation

Check if the current target system is vulnerable

./check.sh

Install GCC to compile the exploit

sudo apt-get install gcc

Compile and run the bashscript to automate the compilation of both exploits

chmod +x compile.sh
./compile.sh

Run your desired exploit binary

./exploit-1

or

./exploit-2 /usr/bin/sudo

Technical Details

This vulnerability resides in the pipe tool used for unidirectional communication between processes, hence the name "Dirty Pipe".

An unprivileged local user could exploit this vulnerability to overwrite supposedly read-only files in the Linux kernel and as such, escalate their privileges on the system.

This vulnerabilty occurs due to the usage of partially uninitialized memory of the pipe buffer structure during its construction. A lack of zero initialization of the new structures's member results in a stale value of flags, which can be abused by anattacker to gain write acces to pages in the cache even if they originally were marked with a read-only attribute.

Mitigations

To ensure that your infrastructure is protected against this and similar threats:

  • Apply all relevant security updates once they are available. To patch CVE-2022-0847, update your Linux systems to version 5.16.11, 5.15.25, and 5.10.102 or newer.
  • Use a security solution that provides patch management and endpoint protection.
  • Use the latest Threat Intelligence information to stay aware of actual TTPs used by threat actors.

Credits

  • Credits to Max Kellermann [email protected]
  • Check out the official disclosure here: https://dirtypipe.cm4all.com/
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.

    869
  • 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.

    433
  • 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.

    374
  • 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.

    367
  • 6

    wifit3

    derv82/wifit3

    Wifite but USB-only & cross-platform.

    339

Explore all tools

Browse our collection of tools

View all tools →