Windows API reference
NtQueueApcThreadEx
Queues a user-mode asynchronous procedure call to a thread, with an optional reserve handle for special-user APC handling; the native extended form of QueueUserAPC.
- Library
- Ntdll.dll
- Category
- Injection
- Suspicion
- high
Detection summary
APC injection, including early-bird injection: queue an APC to a remote thread that will enter an alertable wait, often a newly created suspended process, so the callback executes before or during legitimate code; detect ETW-TI APC-queue events, cross-process thread-handle access, APC routine addresses in private executable memory, and process/thread creation followed by APC queuing. Sysmon 8 is not emitted for APC queuing.
- Sysmon: No Sysmon event mapped
- ETW: Microsoft-Windows-Threat-Intelligence
- Notes: Sysmon 8 logs remote thread creation, not APC queuing. ETW-TI or EDR kernel callbacks are needed; direct syscalls can bypass user-mode hooks.
Sources and documentation
- Microsoft Learn documentation (equivalent API documentation)
Not yet human-reviewed. Page metadata generated .
Legitimate use
Runtimes and security tools that queue APCs with extended options.
Related APIs
- QueueUserAPC — Kernel32.dll