VeriKQL by Kaushik Saha

T1056.001 Keylogging

CollectionCredential Accesson attack.mitre.org

ATT&CK Enterprise 20.0 · 20.1 released, update in review

How MITRE detects it

DET0089 Behavioral Detection of Keylogging Activity Across Platforms

AN0243 Windows

Monitors suspicious usage of Windows API calls like SetWindowsHookEx, GetKeyState, or polling functions within non-UI service processes, combined with Registry or driver modifications.

MITRE log sourceIn Microsoft Sentinel
WinEventLog:SysmonEventCode=10
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where Source == "Microsoft-Windows-Sysmon" | where EventID in (10)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Provider == "Microsoft-Windows-Sysmon" | where EventID in (10)

Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent.

WinEventLog:SecurityEventCode=4663, 4670, 4656
  • Windows Security Events via AMA → SecurityEvent
    SecurityEvent | where EventID in (4663, 4670, 4656)
  • Security Events via Legacy Agent → SecurityEvent
    SecurityEvent | where EventID in (4663, 4670, 4656)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Channel == "Security" | where EventID in (4663, 4670, 4656)

The same events land in SecurityEvent (Windows Security Events connectors) or WindowsEvent (Windows Event Forwarding); many built-in rules read SecurityEvent only.

WinEventLog:SystemEventCode=7045
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where EventLog in ("System") | where EventID in (7045)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Channel in ("System") | where EventID in (7045)
WinEventLog:SysmonEventCode=13, 14
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where Source == "Microsoft-Windows-Sysmon" | where EventID in (13, 14)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Provider == "Microsoft-Windows-Sysmon" | where EventID in (13, 14)

Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent.

AN0244 Linux

Detects non-system processes accessing /dev/input/* or issuing ptrace/evdev syscalls used for reading keystroke buffers directly.

MITRE log sourceIn Microsoft Sentinel
auditd:SYSCALLopen, readNot mapped to Sentinel yet.
auditd:SYSCALLptrace, ioctlNot mapped to Sentinel yet.

AN0245 macOS

Detects unauthorized TCC access or use of Quartz Event Services (CGEventTapCreate) or IOHID for event tap installation within unexpected processes.

MITRE log sourceIn Microsoft Sentinel
macos:unifiedlogsubsystem=com.apple.TCCNot mapped to Sentinel yet.
macos:osqueryprocess_events OR launchdNot mapped to Sentinel yet.

AN0246 Network Devices

Keylogging on legacy network devices via unauthorized system image modification or remote capture of console keystrokes (telnet, SSH) through altered firmware or man-in-the-middle key sniffing.

MITRE log sourceIn Microsoft Sentinel
networkdevice:syslogImage Upgrade / Configuration ChangeNot mapped to Sentinel yet.
NSM:Flowpacket capture or DPI logsNot mapped to Sentinel yet.

Content Hub rules tagged with it (1)

Rules tagged with this technique (or a sub-technique) in their metadata. Whether one fits your connectors is the coverage view (M2).

How the Content Hub rules for T1056.001 are built: their tables, filters, joins, schedules and windows.

In Sigma rules

3 SigmaHQ community rules name it in their tags.

Community rules, not Microsoft's, and not checked by VeriKQL (Sigma is not KQL). From SigmaHQ/sigma at f083329, under the Detection Rule License (DRL) 1.1; each rule is credited to its author.

Mitigations

MITRE ATT&CK® is a registered trademark of The MITRE Corporation. VeriKQL is not affiliated with or endorsed by MITRE. ATT&CK data © The MITRE Corporation, used under its terms of use.