Direct Syscalls and NTDLL Unhooking Used to Evade EDR in Windows Malware
Attack Tradecraft · 12 sources · Updated 3mo ago · First seen Dec 9, 2024

Windows malware and offensive tradecraft increasingly rely on direct system calls, NTDLL unhooking, and related userland-hook bypass methods to evade antivirus and EDR monitoring during code injection and process manipulation. Public research describes replacing high-level WinAPI calls with Nt* syscalls such as NtAllocateVirtualMemory, NtWriteVirtualMemory, and NtCreateSection, often through custom assembly stubs or frameworks like SysWhispers, to avoid hooks placed in ntdll.dll. Other documented techniques include restoring clean .text sections of loaded DLLs from disk, dynamically invoking APIs without standard imports, and abusing TLS-based reentrancy checks in inline hooks so security products skip behavioral inspection.
These methods are reflected in real malware analyses. WikiLoader was observed using indirect syscalls via ntdll.dll to change memory protections, inject code into bingmaps.dll, and later inject shellcode into explorer.exe with ZwOpenProcess, ZwAllocateVirtualMemory, and ZwWriteVirtualMemory. An XWorm loader used direct Nt* syscalls for section-based payload injection into legitimate processes while checking for JMP opcodes on Nt functions as an anti-hooking measure. A separate APT29-linked Dropbox loader resolved direct syscalls through hashed lookups and restored DLL code sections from disk to remove user-mode hooks before maintaining persistence and exchanging encrypted payloads through Dropbox-based command and control.


