Developer knowledge network · moderated exchange

UnreliableCode コミュニティ

開発者リサーチ、リバース エンジニアリング、コーディング コミュニティ

Tutorial

Invoking Direct x64 System Calls (NtProtectVirtualMemory) via Inline Assembly Stubs [v2.4 Technical Discussion]

x64_assembler
Assembly Guru
MEMBER
担当者: 99
参加日: Sep 2022
投稿: 14
ありがとう: 16
1 か月前 · Jul 21, 2026 10:09 PM
#1

How to bypass userland DLL hooks by issuing direct syscall opcodes:

ASM
; x64 Assembly Syscall Stub (NtProtectVirtualMemory SSN = 0x50 on Win11 23H2)
.code
SysNtProtectVirtualMemory PROC
    mov r10, rcx
    mov eax, 50h ; System Service Number
    syscall
    ret
SysNtProtectVirtualMemory ENDP
END

Userland hooks placed by security modules on ntdll.dll are completely bypassed because execution never traverses ntdll!

vtable_slayer
Senior Reverser
MEMBER
担当者: 215
参加日: Mar 2018
投稿: 86
ありがとう: 61
1 か月前 · Jul 22, 2026 12:24 AM
#2

Direct syscalls are the cornerstone of bypassing userland API surveillance.

kernel_komrade
Driver Dev
MEMBER
担当者: 145
参加日: Feb 2019
投稿: 26
ありがとう: 45
1 か月前 · Jul 22, 2026 8:30 AM
#3

Make sure you dynamically parse SSNs from ntdll export directory so Windows updates don't change numbers.