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
| Name | Type | Dir | Description |
|---|---|---|---|
| ThreadId | HANDLE | in | TID of the thread to wake, as a HANDLE-shaped value (the TEB ClientId.UniqueThread field). |
Syscall IDs by Windows version
| Windows version | Syscall ID | Build |
|---|---|---|
| Win10 1507 | 0x6E | win10-1507 |
| Win10 1607 | 0x6E | win10-1607 |
| Win10 1703 | 0x6F | win10-1703 |
| Win10 1709 | 0x6F | win10-1709 |
| Win10 1803 | 0x6F | win10-1803 |
| Win10 1809 | 0x6F | win10-1809 |
| Win10 1903 | 0x6F | win10-1903 |
| Win10 1909 | 0x6F | win10-1909 |
| Win10 2004 | 0x70 | win10-2004 |
| Win10 20H2 | 0x70 | win10-20h2 |
| Win10 21H1 | 0x70 | win10-21h1 |
| Win10 21H2 | 0x70 | win10-21h2 |
| Win10 22H2 | 0x70 | win10-22h2 |
| Win11 21H2 | 0x70 | win11-21h2 |
| Win11 22H2 | 0x70 | win11-22h2 |
| Win11 23H2 | 0x70 | win11-23h2 |
| Win11 24H2 | 0x71 | win11-24h2 |
| Server 2016 | 0x6E | winserver-2016 |
| Server 2019 | 0x6F | winserver-2019 |
| Server 2022 | 0x70 | winserver-2022 |
| Server 2025 | 0x71 | winserver-2025 |
Kernel module
Related APIs
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 ENDPrustPair 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