Advertisement
FlyFar

non-destructive-payload64.asm

Jun 18th, 2023
1,244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ASM (NASM) 0.45 KB | Cybersecurity | 0 0
  1.         global _start
  2.  
  3.         section .text
  4.  
  5. _start:
  6.     jmp message
  7.  
  8. message:
  9.     call shellcode
  10.     db "The only antidote to mental suffering is physical pain - Karl Marx", 0xa
  11.  
  12. shellcode:
  13.     mov rax, 0x1        ;write system call
  14.     mov rdi, 0x1        ;stdout fd
  15.  
  16.     pop rsi             ;make rsi a ptr to message
  17.     mov rdx, 0x2a       ;message length
  18.     syscall        
  19.  
  20.     ;xor rdi, rdi       ; 0 return status
  21.     ;xor rax, rax
  22.     ;mov al, 0x3c       ; syscall for exit
  23.     ;syscall
  24.  
  25.  
  26.  
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement