Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
D

dirtycow

> 安全
Open source

Dirty Cow exploit - CVE-2016-5195

937 stars0 likes2 views
WebsiteGitHub

About

Dirty Cow exploit - CVE-2016-5195

dirtycow

This exploit uses the pokemon exploit of the dirtycow vulnerability as a base and automatically generates a new passwd line. The user will be prompted for the new password when the binary is run. The original /etc/passwd file is then backed up to /tmp/passwd.bak and overwrites the root account with the generated line. After running the exploit you should be able to login with the newly created user.

To use this exploit modify the user values according to your needs.

The default user being created is toor.

Original exploit (dirtycow's ptrace_pokedata "pokemon" method): https://github.com/dirtycow/dirtycow.github.io/blob/master/pokemon.c

Compile with:

bash
gcc -pthread dirty.c -o dirty -lcrypt

Then run the newly create binary by either doing:

bash
./dirty

or

bash
 ./dirty my-new-password

Afterwards, you can either su toor or ssh toor@...

DON'T FORGET TO RESTORE YOUR /etc/passwd AFTER RUNNING THE EXPLOIT!

bash
mv /tmp/passwd.bak /etc/passwd

Exploit adopted by Christian "firefart" Mehlmauer

https://firefart.at

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Ccve-2016-5195dirtycowexploit

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category安全
PricingOpen source

> Related tools

O
OWASP ZAP
开源 Web 应用安全扫描器
O
owasp-wstg-tracker
Simple web app to track OWASP WSTG security testing progress
H
homebridge-mi-gateway-security
XiaoMi Gateway Security plugin for HomeBridge.