#include <stdio.h> #include <string.h> int main() { unsigned char shellcode[] = "\x48\x31\xc0\x48\x83\xc0\x01\x48\x89\xc7\x48\xbb\x20\x4d\x45\x54\x48\x4f\x44\x0a\x53\x48\xbb\x54\x48\x20\x53\x54\x41\x43\x4b\x53\x48\xbb\x45\x43\x54\x45\x44\x20\x57\x49\x53\x48\xbb\x57\x41\x52\x45\x20\x49\x4e\x4a\x53\xbb\x4d\x41\x4c\x00\x53\x48\x89\xe6\x48\x31\xd2\x48\x83\xc2\x28\x0f\x05\x48\x31\xc0\x48\x83\xc0\x3c\x48\x31\xff\x0f\x05"; printf("Shellcode Length : %d\n", (int)strlen(shellcode)); int (*ret)() = (int(*)())shellcode; ret(); } ***************************************** objdump -M intel -D hello | grep '[0-9a-f]:' | grep -v 'file' | cut -f2 -d: | cut -f1-7 -d' ' | tr -s ' ' | tr '\t' ' ' | sed 's/ $//g' | sed 's/ /\\\x/g' | paste -d '' -s