-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathsyscalls.asm
48 lines (40 loc) · 1.15 KB
/
syscalls.asm
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
; NOT MASM , this file is in NASM syntax and can only be assembled with NASM assembler
[BITS 64]
DEFAULT REL
extern dwNtCreateUserProccess
extern dwNtReadVirtualMemory
extern dwNtProtectVirtualMemory
extern dwNtTerminateProcess
extern sysCallNtCreateProcess
extern sysCallNtRead
extern sysCallNtProtect
extern sysCallNtTerminate
section .code
; Procedure for NtCreateUserProcess
global SysNtCreateUserProcess
SysNtCreateUserProcess:
lea r10, [rcx]
mov eax, dword [dwNtCreateUserProccess]
jmp qword [sysCallNtCreateProcess]
ret
; Procedure for NtReadVirtualMemory
global SysNtReadVirtualMemory
SysNtReadVirtualMemory:
mov r10, rcx
mov eax, dword [dwNtReadVirtualMemory]
jmp qword [sysCallNtRead]
ret
; Procedure for NtProtectVirtualMemory
global SysNtProtectVirtualMemory
SysNtProtectVirtualMemory:
mov r10, rcx
mov eax, dword [dwNtProtectVirtualMemory]
jmp qword [sysCallNtProtect]
ret
; Procedure for NtTerminateProcess
global SysNtTerminateProcess
SysNtTerminateProcess:
mov r10, rcx
mov eax, dword [dwNtTerminateProcess]
jmp qword [sysCallNtTerminate]
ret