← ClaudeAtlas

detect-keyloggerslisted

Detection and hunt methodology for software keyloggers and input-capture hooks across Windows, macOS, and Linux endpoints (MITRE ATT&CK T1056, T1056.001, T1056.004). Keys off the signals each capture method leaves: Sysmon image-load, injection, file, registry, and driver-load events, Security 4688 and PowerShell 4104 for SetWindowsHookEx and GetAsyncKeyState P/Invoke, macOS TCC Input Monitoring and Accessibility grants, and Linux /dev/input opens and ld.so.preload writes. Gives per-method event IDs, a cross-platform hunt, hardening that removes the hook surface, and links to SigmaHQ, ATT&CK, and D3FEND rule sources. Use when triaging a suspected keylogger, hunting for input-capture hooks, chasing SetWindowsHookEx or GetAsyncKeyState activity, investigating a new macOS Input Monitoring or Accessibility grant, or hardening endpoints against keystroke capture.
umbrasec-labs/umbra-blue · ★ 0 · DevOps & Infrastructure · score 62
Install: claude install-skill umbrasec-labs/umbra-blue
# Keyloggers and Input-Capture Hooks - Defensive Methodology > **Tier 2 - methodology skill.** No bespoke UMBRASEC detection rule ships with this skill yet. It gives the defender's method, the log sources and signals, and the hardening, and points to public rule sources. Promotion to Tier 1 (a sourced, tuned UMBRASEC rule) is tracked in [COVERAGE.md](https://github.com/umbrasec-labs/umbra-blue/blob/main/COVERAGE.md). Do not treat the content below as citing a UMBRASEC rule; there is none for this threat yet. ## TL;DR for defenders A keylogger captures keystrokes by one of a few mechanisms, and each mechanism leaves a different trace, so there is no single event to watch. On Windows the loud case is a **global message hook** (`SetWindowsHookEx` with `WH_KEYBOARD` or `WH_GETMESSAGE`): the hook DLL is mapped into every interactive process, so the same unsigned DLL fans out across many processes in **Sysmon Event ID 7**. The quiet cases leave no injection artifact at all: a low-level hook (`WH_KEYBOARD_LL`), `GetAsyncKeyState` polling, and Raw Input (`RegisterRawInputDevices` with `RIDEV_INPUTSINK`) all run in the collector's own process, so for those the real signal is **EDR API telemetry** and **PowerShell 4104** P/Invoke text, plus the **Sysmon 11 FileCreate** of a keystroke log that grows in a temp or AppData path. On macOS the gold signal is a **TCC grant**: a keylogger needs Input Monitoring (`kTCCServiceListenEvent`) or Accessibility (`kTCCServiceAccessibility`), both r