VeriKQL by Kaushik Saha

T1674 Input Injection

Executionon attack.mitre.org

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

How MITRE detects it

DET0568 Detection Strategy for Input Injection

AN1567 Windows

Detects suspicious USB HID device enumeration and keystroke injection patterns, such as rapid sequences of input with no user context, scripts executed through simulated keystrokes, or rogue devices presenting themselves as keyboards.

MITRE log sourceIn Microsoft Sentinel
WinEventLog:SystemEventCode=2003
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where EventLog in ("System") | where EventID in (2003)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Channel in ("System") | where EventID in (2003)
WinEventLog:SecurityEventCode=4688
  • Windows Security Events via AMA → SecurityEvent
    SecurityEvent | where EventID in (4688)
  • Security Events via Legacy Agent → SecurityEvent
    SecurityEvent | where EventID in (4688)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Channel == "Security" | where EventID in (4688)

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

WinEventLog:PowerShellEventCode=4103, 4104, 4105, 4106
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where EventLog in ("Microsoft-Windows-PowerShell/Operational", "Windows PowerShell") | where EventID in (4103, 4104, 4105, 4106)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Channel in ("Microsoft-Windows-PowerShell/Operational", "Windows PowerShell") | where EventID in (4103, 4104, 4105, 4106)

AN1568 Linux

Detects USB HID device enumeration under `/sys/bus/usb/devices/` and rapid keystroke injection resulting in command execution such as bash or Python scripts launched without interactive user activity.

MITRE log sourceIn Microsoft Sentinel
auditd:SYSCALLexecve: parent process is usb/hid device handler, child process bash/python invokedNot mapped to Sentinel yet.
linux:syslogNew HID device enumeration with type 'keyboard' followed by immediate input injectionNot mapped to Sentinel yet.

AN1569 macOS

Detects abnormal HID device enumeration via I/O Registry (ioreg -p IOUSB) and keystroke injection targeting AppleScript, osascript, or PowerShell equivalents. Defender correlates new USB device connections with rapid script execution.

MITRE log sourceIn Microsoft Sentinel
macos:unifiedlogNew IOUSB keyboard/HID device enumerated with suspicious attributesNot mapped to Sentinel yet.
macos:unifiedlogosascript, AppleScript, or Python execution triggered immediately after HID connectionNot mapped to Sentinel yet.

Content Hub rules tagged with it (0)

No Content Hub rule is tagged with this technique.

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

In Sigma rules

No SigmaHQ rule names it or one of its sub-techniques in their tags outright.

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.