rootpwn

Threat Intel

Detecting Hotkey‑Based Keyloggers via Undocumented Kernel Hotkey Table

Elastic Security Labs uncovered a new Windows keylogger technique that hijacks the RegisterHotKey API to capture keystrokes. The detection method uses the undocumented kernel hotkey table and ETW events from the Win32k provider, and is available in Elastic Defend 8.12.

What happened

Elastic Security Labs identified a new class of Windows keyloggers that hijack the operating system’s hotkey registration API to silently capture keystrokes. The technique was first demonstrated in a proof‑of‑concept called Hotkeyz, released by Microsoft researcher Jonathan Bar Or, and relies on the undocumented hotkey table in kernel space.

Impact

These hotkey‑based keyloggers can run with the same privileges as the user that registered the hotkey, allowing attackers to record sensitive input without triggering typical hook or polling detections. The attack is compatible with Windows 10 22H2 (build 19045.5371) and can evade many endpoint‑detection solutions that focus on user‑mode APIs.

Detection technique

Elastic introduced a behavior‑based rule in Elastic Defend 8.12 that listens to the Microsoft‑Windows‑Win32k ETW provider. By correlating RegisterHotKey events with subsequent WM_HOTKEY messages that are not matched to legitimate applications, the rule flags suspicious hotkey registrations. The rule also checks the undocumented kernel hotkey table for entries that persist after the registering process exits.

What to do

  • Upgrade to Elastic Defend 8.12 or later and enable the hotkey‑keylogger rule.
  • Configure ETW collection for the Win32k provider on all Windows endpoints and forward logs to Elastic Security.
  • Review hotkey registrations in the registry and via GetRegisteredHotKeys APIs; revoke any that are unnecessary.
  • Apply the latest Windows security patches and consider disabling the RegisterHotKey API for non‑trusted applications via group policy.
  • Complement the rule with user‑mode hook detection and polling‑based keylogger checks for a layered defense.

keyloggers hotkey ETW Windows Elastic

← All news