Files
shellcode/x86_64/Example_Code/clear_register.asm
Daniel Ashton cc0cee84ff init
2016-05-30 09:06:47 +02:00

23 lines
396 B
NASM

; shellcode-lab64
; dash@hack4.org
;
; some example to zero-out a register
BITS 64
global _start
_start:
xor rax, rax ; initial clearing - classic xor
mov rax, 0xDEADBEEF
sub rax, rax ; sub opcode
mov rax, 0xF00DBABE
xor rax, rax ; classic xor
; check value of register and add or sub from that
; let's assume 29A is in the register rcx
sub rcx, rcx
mov rcx, 0x29A
sub rcx, 666
; zero'd