기술빙자사기

C setuid setgid --- 쉘권한관련 bada.c

권성재 2008. 7. 31. 18:07
      1 #include <stdio.h>
      2
      3 main(int argc, char *argv[]){
      4
      5     setuid(0);
      6     setgid(0);
      7     system("/root/bin/PCGI/cgibin/to.php");
      8 }

.... gcc aaa.c -o aaa
.... chmod 4755 aaa