Skip to main content
Mallory
← Back to News
endpoint-security-bypasspayload-delivery-evasiondefense-evasion-methodoffensive-tooling-release

Direct Syscalls and NTDLL Unhooking Used to Evade EDR in Windows Malware

Attack Tradecraft · 12 sources · Updated 3mo ago · First seen Dec 9, 2024

Direct Syscalls and NTDLL Unhooking Used to Evade EDR in Windows Malware

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.

Who uses this technique?Get the actors, campaigns, and ATT&CK mapping behind it.
Get the tradecraft
Event timeline

How this story unfolded

Events from the most recent confirmed update back to the earliest known activity.

12 events · 2019 – Dec 9, 2024
  1. Dec 9, 20242y ago

    XWorm shellcode analysis shows syscall-based payload injection

    An analysis of XWorm-delivering shellcode found it decrypted an intermediate payload from a temporary file and injected the final payload into newly created legitimate Windows processes using NtCreateSection, NtMapViewOfSection, NtWriteVirtualMemory, and NtResumeThread, while checking Nt functions for hooks.

    MalwareAnalysisReports/XWormShellcode/Packer Shellcode Delivering XWorm.md at main · VenzoV/MalwareAnalysisReports · GitHub
  2. Feb 12, 20243y ago

    WikiLoader shellcode analysis documents indirect syscalls and explorer injection

    A malware analysis reported that WikiLoader second-stage shellcode loaded bingmaps.dll, used indirect syscalls via ntdll.dll to patch GetBingsMapFactory, performed anti-debug checks, and injected a third shellcode into explorer.exe with ZwOpenProcess, ZwAllocateVirtualMemory, and ZwWriteVirtualMemory.

    MalwareAnalysisReports/WikiLoader/WikiLoader Shellcode pt2.md at main · VenzoV/MalwareAnalysisReports · GitHub
  3. Jun 9, 20233y ago

    Cocomelonc demonstrates direct syscall stub for NtAllocateVirtualMemory

    A follow-up tutorial showed how to replace the ntdll-exported NtAllocateVirtualMemory call with a custom assembly syscall stub in a DLL injection example to bypass userland hooks, and referenced SysWhispers as an alternative generator.

    Malware development trick - part 33. Syscalls - part 2. Simple C++ example. - cocomelonc
  4. Jun 7, 20233y ago

    Cocomelonc publishes introductory Windows syscall tutorial

    A tutorial introduced Windows syscalls and demonstrated replacing higher-level allocation APIs with NtAllocateVirtualMemory in a DLL injection workflow, while noting syscall IDs vary by Windows version and stub addresses should be resolved dynamically.

    Malware development trick - part 32. Syscalls - part 1. Simple C++ example. - cocomelonc
  5. Sep 3, 20224y ago

    SysWhispers2 publishes updated direct syscall generator

    The SysWhispers2 project was published as an updated tool for generating direct Windows syscall stubs to evade user-mode API hooks used by security products. Its documentation highlights syscall-address sorting instead of static syscall tables, randomized function name hashes, and optional random syscall jumps via clean ntdll syscall instructions.

    GitHub - jthuraisamy/SysWhispers2: AV/EDR evasion via direct system calls. · GitHub
  6. May 16, 20225y ago

    APT29 Dropbox loader analysis reveals direct syscalls and unhooking

    A malware analysis of AcroSup64.dll described a Dropbox-based loader that resolves syscalls using a SysWhispers2-like method, hijacks thread execution, restores in-memory .text sections from disk to remove hooks, and establishes Run-key persistence.

    Malware-analysis-and-Reverse-engineering/APT29_C2-Client_Dropbox_Loader/APT29-DropboxLoader_analysis.md at main · Dump-GUY/Malware-analysis-and-Reverse-engineering · GitHub
  7. Oct 27, 20215y ago

    Deep Instinct details TLS reentrancy hook bypass technique

    Deep Instinct published analysis of an evasion method that nulls TLS slots and TlsExpansionSlots to make a hooked NtWriteVirtualMemory path appear reentrant, causing the hook to skip behavioral checks.

    Evading EDR Detection with Reentrancy Abuse | Deep Instinct
  8. Jul 6, 20215y ago

    SysWhispers project publishes direct syscall generator for AV/EDR evasion

    The SysWhispers GitHub project was published as a tool that generates header and assembly files for invoking direct Windows system calls, aiming to bypass user-mode API hooks used by security products. Its documentation included DLL injection examples replacing Win32 APIs with Nt* syscalls and described cross-version support through PEB-based version handling.

    GitHub - jthuraisamy/SysWhispers: AV/EDR evasion via direct system calls. · GitHub
  9. Jan 31, 20216y ago

    EDR bypass overview summarizes direct syscall and unhooking methods

    An overview article summarized multiple Windows EDR bypass approaches, including patching hooks, restoring clean NTDLL .text sections, using direct syscalls via Dumpert and SysWhispers, and dynamic API invocation with D/Invoke.

    A tale of EDR bypass methods | S3cur3Th1sSh1t
  10. Dec 31, 20206y ago

    MDSec publishes user-mode hook bypass and direct syscall research

    MDSec published research on bypassing user-mode hooks and directly invoking Windows system calls for red-team operations. The article focused on techniques for evading userland API monitoring by security products through direct syscall usage.

    Bypassing User-Mode Hooks and Direct Invocation of System Calls for Red Teams - MDSec
  11. Jun 19, 20197y ago

    Outflank publishes direct syscall and sRDI AV/EDR bypass research

    Outflank published research on combining direct system calls with sRDI to bypass AV/EDR, an early public reference point later cited in discussions of userland-hook bypass techniques.

    Red Team Tactics: Combining Direct System Calls and sRDI to bypass AV/EDR | Outflank
  12. 2019

    Public research describes patch-the-patch EDR bypasses

    The EDR bypass overview cites public 2019 research by SpecialHoang and MDSec on bypassing EDR memory protection by patching hooked NTDLL functions, including proof-of-concept work against CylancePROTECT.

    A tale of EDR bypass methods | S3cur3Th1sSh1t
Linked entities

Related entities

Vulnerabilities, threat actors, malware, products, organizations, breaches, and observables Mallory has linked to this story. Indicator values are masked here and available in full in the app.

Open in app →

Affected products

1 linked
Windows

Organizations

1 linked
SysWhispers

Observables

4 linked

Indicator values are masked on this page. See the values in Mallory Domains, IPs, hashes, and URLs are exportable to your SIEM.

Do you run this?Get the adversaries, campaigns, and ATT&CK mapping behind this technique, with detections ready to deploy.
See Who Uses This Technique
Mallory platform

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which threat actors are using it right now, and what to deploy next.

Exposure mappingMap indicators from this story to your assets and identify affected systems in minutes.
Threat actor evidenceEvery observed campaign, victim, and pivot linked to actors named in this story.
Associated malwareMalware, exploits, and IOCs connected to the activity described here.
Detection signaturesYARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Scheduled alertsGet matching new stories delivered to your team as they break, not the next morning.
AI threadsAsk questions about this story and take action on the answers.