my asm file is not working...
i am making a direct syscall injector in c but i am getting errors if someone could help me that woud be great here is my .asm file code:
; syscall_stubs.asm // syntax error: '.' this seems very unusual to me it also says: syntax error: missing '{' before '.' which i also find strange another error here is 'g_NtOpenProcessSSN': undeclared identifier. i know i sound like a total skid (which i am) but i have asked google and ai and they don't seem to be able to support me. if you could help me it would be much appreciated thanks!
EXTERN g_NtOpenProcessSSN:DWORD
EXTERN g_NtAllocateVirtualMemorySSN:DWORD
EXTERN g_NtWriteVirtualMemorySSN:DWORD
EXTERN g_NtProtectVirtualMemorySSN:DWORD
EXTERN g_NtCreateThreadExSSN:DWORD
EXTERN g_NtWaitForSingleObjectSSN:DWORD
EXTERN g_NtFreeVirtualMemorySSN:DWORD
EXTERN g_NtCloseSSN:DWORD
.code
PUBLIC NtOpenProcess
NtOpenProcess PROC
mov r10, rcx
mov eax, DWORD PTR g_NtOpenProcessSSN
syscall
ret
NtOpenProcess ENDP
PUBLIC NtAllocateVirtualMemory
NtAllocateVirtualMemory PROC
mov r10, rcx
mov eax, DWORD PTR g_NtAllocateVirtualMemorySSN
syscall
ret
NtAllocateVirtualMemory ENDP
PUBLIC NtWriteVirtualMemory
NtWriteVirtualMemory PROC
mov r10, rcx
mov eax, DWORD PTR g_NtWriteVirtualMemorySSN
syscall
ret
NtWriteVirtualMemory ENDP
PUBLIC NtProtectVirtualMemory
NtProtectVirtualMemory PROC
mov r10, rcx
mov eax, DWORD PTR g_NtProtectVirtualMemorySSN
syscall
ret
NtProtectVirtualMemory ENDP
PUBLIC NtCreateThreadEx
NtCreateThreadEx PROC
mov r10, rcx
mov eax, DWORD PTR g_NtCreateThreadExSSN
syscall
ret
NtCreateThreadEx ENDP
PUBLIC NtWaitForSingleObject
NtWaitForSingleObject PROC
mov r10, rcx
mov eax, DWORD PTR g_NtWaitForSingleObjectSSN
syscall
ret
NtWaitForSingleObject ENDP
PUBLIC NtFreeVirtualMemory
NtFreeVirtualMemory PROC
mov r10, rcx
mov eax, DWORD PTR g_NtFreeVirtualMemorySSN
syscall
ret
NtFreeVirtualMemory ENDP
PUBLIC NtClose
NtClose PROC
mov r10, rcx
mov eax, DWORD PTR g_NtCloseSSN
syscall
ret
NtClose ENDP
END
2 Replies
I applaud the effort, I'm not sure we have any ASM experts that I know of. I've only dabbled myself. You might have to seek a more targeted server for that.
It’s alright I solved it turns it visual studio was trying to complete using c syntax