Windows Hotkey Keyloggers Detected Through win32k Kernel Table Inspection
Attack Tradecraft · 4 sources · Updated 3mo ago · First seen Oct 17, 2025

Elastic Security Labs detailed a Windows keylogging technique that abuses the RegisterHotKey API to register individual keys as global hotkeys and collect the resulting WM_HOTKEY messages. The Hotkeyz proof of concept temporarily unregisters a captured hotkey, replays the user’s original keystroke via keybd_event, re-registers the hotkey, and records its virtual-key code, allowing keystroke collection with little visible disruption.
The researchers found that Event Tracing for Windows does not produce telemetry for RegisterHotKey or UnregisterHotKey, limiting direct API-based detection. They instead created a kernel-driver-based detector that examines the undocumented gphkHashTable structure in win32kfull.sys for excessive alphanumeric hotkey registrations; registering 36 or more unmodified alphanumeric keys is identified as a likely indicator of hotkey-based keylogging. Elastic released the detector and demonstrated that it detects Hotkeyz.
Why it matters
Impact assessment
Hotkey-based keylogging can affect Windows endpoints across all industries, particularly systems where users enter credentials, financial information, source code, or other sensitive data. The technique enables credential and data theft with minimal user-visible disruption and has an ETW telemetry blind spot, reducing the effectiveness of conventional endpoint monitoring.
- Scope: Any interactive Windows user session in which a process can register large numbers of global hotkeys. The story describes a proof of concept, not confirmed in-the-wild exploitation.
- Business impact: Captured keystrokes can expose passwords, MFA recovery codes, payment data, proprietary information, and administrative commands, potentially enabling account takeover and lateral movement.
- Operational impact: Detection requires kernel-mode inspection of an undocumented, version-sensitive Windows kernel structure; this is not a standard EDR telemetry source.
- Affected population: Windows desktops, laptops, VDI sessions, and jump hosts with interactive logons. Session isolation means each logged-on user session requires separate visibility.
Supporting facts
- The Hotkeyz proof of concept logs virtual-key codes to a text file.
- It preserves apparent keyboard behavior by unregistering an intercepted hotkey, replaying the keypress, and registering it again.
- Elastic Security Labs demonstrated detection of Hotkeyz with its released detector.
- No CVE, affected-version range, or confirmed victim organization was reported.


