Windows API reference
SetWindowsHookExW
Installs an application-defined hook procedure into a hook chain to monitor messages, keyboard or mouse input for a thread or all threads on a desktop.
- Library
- User32.dll
- Suspicion
- high
- MITRE ATT&CK
- T1056.001 Input Capture: Keylogging
Detection summary
SetWindowsHookExW is not directly logged; Sysmon 7 may show hook-DLL loading but not the hook call itself.
- Sysmon: No Sysmon event mapped
- ETW: No ETW provider mapped
- Notes: Correlate hook installation with Sysmon 7 image loads only when a DLL is injected; low-level keyboard hooks may stay in-process. EDR hooks, call stacks and subsequent keylogging or input-capture behavior are the practical signals.
Sources and documentation
- Microsoft Learn documentation (direct documentation)
- MITRE ATT&CK T1056.001: Input Capture: Keylogging
- Microsoft Sysmon events
Last reviewed: . Page metadata generated .
Legitimate use
Accessibility tools, remote support, clipboard managers, macro utilities, input remapping and UI automation.
Related APIs
- UnhookWindowsHookEx — User32.dll
- CallNextHookEx — User32.dll
- GetAsyncKeyState — User32.dll