-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsharedlib.asm
More file actions
37 lines (32 loc) · 678 Bytes
/
sharedlib.asm
File metadata and controls
37 lines (32 loc) · 678 Bytes
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
; By Dreg
global _start
global ReflectiveLoader:function
section .text
_start:
mov rax, 1 ; write
mov rdi, 1 ; STDOUT_FILENO,
call nxt
msg: db "Hello Dreg from the sharedlib ASM from _start", 10
msglen: equ $ - msg
times 10 db 90h ; to fix disas
nxt:
pop rsi
mov rdx, msglen
syscall
jmp ext
ReflectiveLoader:
mov rax, 1 ; write
mov rdi, 1 ; STDOUT_FILENO,
call sgt
msg2: db "Hello Dreg from the sharedlib ASM from ReflectiveLoader", 10
msglen2: equ $ - msg2
times 10 db 90h ; to fix disas
sgt:
pop rsi
mov rdx, msglen2
syscall
jmp ext
ext:
mov rax, 60 ; exit
mov rdi, 0 ; EXIT_SUCCESS
syscall