DirtyCow root privilege escalation (CVE-2016-5195)# root-dirtyc0w (CVE-2016-5195)
### DirtyCow root privilege escalation
Dirty COW was a race-condition vulnerability in the Linux kernel. This vulnerability lived inside the kernel functions which handle the copy-on-write (COW) feature of memory mappings and when exploited allowed processes to write to read-only files.
An example use case of this vulnerability includes overwriting any SUID (Set User ID) binary such as passwd executable with a different elf executable (which we create) that executes /bin/sh to gain root privileges (as shown in this repository).
You can find more executables in Linux that have the SUID bit set and change them in the exploit code here: https://pentestlab.blog/2017/09/25/suid-executables/
<div align="center">
<div style="border: 1.5px solid #ccc; display: inline-block; padding: 4px;">
<img src="/assets/gif/root-dirtyc0w.gif" alt="root-dirtyc0w PoC GIF" width = 70% style="display: block; border: none;">
</div>
<p style="margin-top: 5px;"><em>Privilege Escalation PoC: Exploiting Dirty COW for Root Access (CVE-2016-5195) - Ran on Kali Linux 2016.2</em></p>
</div>
[4.0K] /data/pocs/51dcf3d5f5c566b077f6fc63f3c085df26218283
├── [4.0K] assets
│ └── [4.0K] gif
│ └── [694K] root-dirtyc0w.gif
├── [ 138] makefile
├── [1.1K] README.md
└── [4.0K] root-dirtyc0w.c
2 directories, 4 files