> Windows Syscalls
ntoskrnl.exeT1055T1055.004T1106

NtAlertResumeThread

Resumes a suspended thread and simultaneously alerts it so any pending APCs are delivered.

Prototype

NTSTATUS NtAlertResumeThread(
  HANDLE  ThreadHandle,
  PULONG  PreviousSuspendCount
);

Arguments

NameTypeDirDescription
ThreadHandleHANDLEinHandle to the target thread; must have THREAD_SUSPEND_RESUME access.
PreviousSuspendCountPULONGoutOptional. Receives the suspend count before the decrement; NULL discards it.

Syscall IDs by Windows version

Windows versionSyscall IDBuild
Win10 15070x6Cwin10-1507
Win10 16070x6Cwin10-1607
Win10 17030x6Dwin10-1703
Win10 17090x6Dwin10-1709
Win10 18030x6Dwin10-1803
Win10 18090x6Dwin10-1809
Win10 19030x6Dwin10-1903
Win10 19090x6Dwin10-1909
Win10 20040x6Ewin10-2004
Win10 20H20x6Ewin10-20h2
Win10 21H10x6Ewin10-21h1
Win10 21H20x6Ewin10-21h2
Win10 22H20x6Ewin10-22h2
Win11 21H20x6Ewin11-21h2
Win11 22H20x6Ewin11-22h2
Win11 23H20x6Ewin11-23h2
Win11 24H20x6Fwin11-24h2
Server 20160x6Cwinserver-2016
Server 20190x6Dwinserver-2019
Server 20220x6Ewinserver-2022
Server 20250x6Fwinserver-2025

Kernel module

ntoskrnl.exeNtAlertResumeThread

Related APIs

ResumeThreadNtResumeThreadNtAlertThreadNtQueueApcThreadNtQueueApcThreadExQueueUserAPC

Syscall stub

4C 8B D1            mov r10, rcx
B8 6F 00 00 00      mov eax, 0x6F
F6 04 25 08 03 FE 7F 01   test byte ptr [0x7FFE0308], 1
75 03               jne short +3
0F 05               syscall
C3                  ret
CD 2E               int 2Eh
C3                  ret

Undocumented notes

Functionally `NtAlertResumeThread` is the fusion of `NtAlertThread` + `NtResumeThread` in a single round-trip. The kernel decrements the suspend count *and* sets the alert flag, so when the thread next reaches an alertable wait — or has a queued APC waiting — the APC dispatches immediately. The Win32 layer has no direct equivalent; `ResumeThread` does not set the alert bit. Phnt documents it; the public SDK does not.

Common malware usage

Used in APC-injection chains where the attacker needs both halves atomically — wake the thread and guarantee the APC fires the moment it begins executing. Many Early Bird and Atom-Bombing variants prefer `NtAlertResumeThread` over `NtResumeThread + NtTestAlert` because it removes a TOCTOU window in which an EDR could observe the resumed thread before APC delivery. It is the canonical resume primitive in modern sleep-mask kits (Ekko, Cronos) that suspend the beacon thread to encrypt memory and then need a single-syscall wakeup that fires the decryption APC.

Detection opportunities

Calls to `NtAlertResumeThread` from a process targeting a thread inside another process are noisy: cross-process resume is rare in normal software and is a strong injection indicator when combined with prior `NtQueueApcThread` on the same thread. Kernel callbacks `PsSetCreateThreadNotifyRoutineEx` plus ETW `Microsoft-Windows-Threat-Intelligence` capture remote thread state transitions. Detection rules in CarbonBlack and Elastic SIEM commonly flag the sequence `NtQueueApcThread → NtAlertResumeThread` cross-process as APC injection.

Direct syscall examples

asmx64 direct stub (Win11 24H2)

; Direct syscall stub for NtAlertResumeThread (SSN 0x6F on Win11 24H2)
NtAlertResumeThread PROC
    mov  r10, rcx          ; ThreadHandle
    mov  eax, 6Fh          ; SSN
    syscall
    ret
NtAlertResumeThread ENDP

cAPC injection: queue + alert-resume

// Resume a suspended remote thread and atomically deliver the APC.
extern "C" NTSTATUS NTAPI NtQueueApcThread(HANDLE, PVOID, PVOID, PVOID, PVOID);
extern "C" NTSTATUS NTAPI NtAlertResumeThread(HANDLE, PULONG);

void InjectViaApc(HANDLE hThread, PVOID pShellcodeRX) {
    // 1. Queue user-APC pointing at our shellcode.
    NtQueueApcThread(hThread, pShellcodeRX, NULL, NULL, NULL);
    // 2. Atomically wake + alert; APC fires on next user-mode dispatch.
    ULONG prev = 0;
    NtAlertResumeThread(hThread, &prev);
}

rustSleep-mask wakeup

use std::arch::asm;

#[unsafe(naked)]
pub unsafe extern "system" fn nt_alert_resume_thread(
    _thread: *mut core::ffi::c_void,
    _prev: *mut u32,
) -> i32 {
    asm!(
        "mov r10, rcx",
        "mov eax, 0x6F",     // Win11 24H2 — resolve dynamically in production
        "syscall",
        "ret",
        options(noreturn),
    );
}

MITRE ATT&CK mappings

Last verified: 2026-05-20