> Windows Syscalls
ntoskrnl.exeT1106T1027

NtAlertThreadByThreadId

Wakes a single thread, identified by its TID, that is parked in NtWaitForAlertByThreadId — the kernel side of WakeByAddressSingle.

Prototype

NTSTATUS NtAlertThreadByThreadId(
  HANDLE ThreadId
);

Arguments

NameTypeDirDescription
ThreadIdHANDLEinTID of the thread to wake, as a HANDLE-shaped value (the TEB ClientId.UniqueThread field).

Syscall IDs by Windows version

Windows versionSyscall IDBuild
Win10 15070x6Ewin10-1507
Win10 16070x6Ewin10-1607
Win10 17030x6Fwin10-1703
Win10 17090x6Fwin10-1709
Win10 18030x6Fwin10-1803
Win10 18090x6Fwin10-1809
Win10 19030x6Fwin10-1903
Win10 19090x6Fwin10-1909
Win10 20040x70win10-2004
Win10 20H20x70win10-20h2
Win10 21H10x70win10-21h1
Win10 21H20x70win10-21h2
Win10 22H20x70win10-22h2
Win11 21H20x70win11-21h2
Win11 22H20x70win11-22h2
Win11 23H20x70win11-23h2
Win11 24H20x71win11-24h2
Server 20160x6Ewinserver-2016
Server 20190x6Fwinserver-2019
Server 20220x70winserver-2022
Server 20250x71winserver-2025

Kernel module

ntoskrnl.exeNtAlertThreadByThreadId

Related APIs

WakeByAddressSingleWakeByAddressAllWaitOnAddressNtWaitForAlertByThreadIdNtAlertThreadRtlWakeAddressSingle

Syscall stub

4C 8B D1            mov r10, rcx
B8 71 00 00 00      mov eax, 0x71
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

Introduced in Windows 8 and used heavily from Windows 10 onward as the kernel underpinning of `WakeByAddressSingle` / `WakeByAddressAll`. Together with `NtWaitForAlertByThreadId`, this pair implements per-thread alerts that do *not* require a named kernel object (no Event, no Mutex, no Semaphore). The synchronization state is purely a user-mode address that the kernel hashes into a per-process wait table; the kernel only needs the destination TID and uses no object-manager lookups, making the dispatch path very cheap. Slim Reader/Writer locks, the new `WaitOnAddress`, and the modern condition-variable implementation in ntdll all sit on top of this primitive.

Common malware usage

Low-signal sync for sleep masks, beacon scheduling and command pumps. Because there is no kernel object created or named, there are no `\BaseNamedObjects\…` artifacts for tools like ProcessHacker / SystemInformer to surface — which is the main appeal over `NtSetEvent` / `NtWaitForSingleObject`. A few Cobalt-Strike-derived sleep-mask variants and the more recent Sliver scheduling backends use `WaitOnAddress` (and hence this syscall) to park worker threads between beacon cycles. As of mid-2026 it remains a relatively *low-malware-signal* syscall: the same code path is exercised by every modern Win32 program that uses SRWLOCK or std::mutex on MSVC, so the volume of legitimate calls swamps any malicious use.

Detection opportunities

Effectively undetectable on its own — `NtAlertThreadByThreadId` is invoked by SRWLOCK release, condition-variable wake, and any C++17/20 `std::mutex` unlock that finds a waiter. EDRs do not hook it because the noise floor is enormous. The only useful detection angle is the *combination* with sleep-mask telemetry: short, periodic NtWaitForAlertByThreadId returns coupled with NtAlertThreadByThreadId from a single non-system thread, on a process that also performs network beaconing, *plus* an RX-only code region — there the syscall is a corroborating signal, never a primary one.

Direct syscall examples

cStealth wake of a parked worker

// Replace SetEvent on a globally named event with WaitOnAddress/WakeByAddressSingle
// to avoid creating an object visible to handle-listers.
typedef NTSTATUS(NTAPI* fnNtAlertThreadByThreadId)(HANDLE);

void PokeWorker(DWORD workerTid) {
    HMODULE n = GetModuleHandleA("ntdll.dll");
    fnNtAlertThreadByThreadId p = (fnNtAlertThreadByThreadId)
        GetProcAddress(n, "NtAlertThreadByThreadId");
    p((HANDLE)(ULONG_PTR)workerTid);
}

asmx64 direct stub (Win11 24H2 SSN)

; SSN 0x71 on win11-24h2 / winserver-2025. 0x70 on most prior 20H2+ builds.
NtAlertThreadByThreadId PROC
    mov  r10, rcx
    mov  eax, 71h
    syscall
    ret
NtAlertThreadByThreadId ENDP

rustPair with WaitOnAddress equivalent

// Wake a worker parked in NtWaitForAlertByThreadId without ever instantiating
// a named kernel object. Useful in implants that want to look like a normal
// Win32 program using SRWLOCK.
use windows_sys::Win32::System::LibraryLoader::{GetModuleHandleA, GetProcAddress};

type NtAlertThreadByThreadId = unsafe extern "system" fn(tid: isize) -> i32;

pub unsafe fn wake_worker(tid: u32) -> i32 {
    let n = GetModuleHandleA(b"ntdll.dll\0".as_ptr());
    let addr = GetProcAddress(n, b"NtAlertThreadByThreadId\0".as_ptr()).unwrap();
    let f: NtAlertThreadByThreadId = std::mem::transmute(addr);
    f(tid as isize)
}

MITRE ATT&CK mappings

Last verified: 2026-05-20