Windows Hotkey Keyloggers Detected Through win32k Kernel Table Inspection
Attack Tradecraft · 4 sources · Updated 2mo 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.


