{
  "family": "hotkeyshook",
  "sample_count": 3,
  "category": "trojan",
  "description": "Behavior:Win32/Hotkeyshook is a critical **Heuristic and Behavioral Detection** flagged by modern EDR and antivirus solutions. It is not a specific malware family, but rather an alert that a running process is attempting to aggressively hook into the Windows API to intercept keyboard input. This is the primary, classic mechanism used by Keyloggers, Spyware, and Banking Trojans to steal passwords and sensitive data as it is being typed.<br><br><b>Understanding Hotkeyshook (API Hooking)</b><br>To an end-user, this behavior is invisible; their keyboard continues to work normally. For a security analyst, a Hotkeyshook alert is a severe privacy and credential compromise indicator. It means an unauthorized application is utilizing the `SetWindowsHookEx` API call, specifically requesting `WH_KEYBOARD` or `WH_KEYBOARD_LL` (low-level keyboard hook) privileges (`T1056.001`), allowing the malware to record every keystroke before it even reaches the intended application.<br><br><b>Execution and Hooking Mechanics</b><br>The infection typically begins with user execution (`T1204.002`) of a disguised trojan. Once running in memory, the malware calls `SetWindowsHookEx`, pointing the operating system to a malicious function (the 'hook procedure') within its own code or an injected DLL (`T1055.001`). From that point on, every time a key is pressed, Windows pauses, passes the key data to the malware's hook procedure (which logs it to a hidden file), and then passes it back to the legitimate application. The malware regularly exfiltrates this log file to a C2 server.<br><br><b>Indicators of Compromise & Impact</b><br>The impact is the total compromise of all typed data, including passwords, emails, and financial information. Host-based IoCs include EDR telemetry showing unauthorized DLLs loaded into `explorer.exe` or web browsers, and the presence of hidden text or `.dat` files accumulating data in the `%AppData%` directory. Network IoCs may involve periodic HTTP POST requests containing encrypted or base64-encoded strings.",
  "cta": "Published by the SystemHelpdesk team.",
  "aliases": [],
  "enrichment_level": "expert-seo",
  "faq": [],
  "faq_count": 0,
  "mitre_attack": [
    "T1055.001",
    "T1056.001",
    "T1562.001"
  ],
  "cisa_advisory": null,
  "last_updated": "2026-06-09",
  "mitre_attack_detail": [
    {
      "id": "T1056.001",
      "name": "Input Capture: Keylogging (via SetWindowsHookEx)",
      "tactic": "Collection"
    },
    {
      "id": "T1055.001",
      "name": "Process Injection: Dynamic-link Library Injection (Injecting the hook DLL)",
      "tactic": "Defense Evasion"
    },
    {
      "id": "T1562.001",
      "name": "Impair Defenses: Disable or Modify Tools (API Hooking)",
      "tactic": "Defense Evasion"
    }
  ],
  "containment_steps": [
    "Immediately isolate the endpoint to prevent the exfiltration of the captured keystroke logs.",
    "Assume all credentials typed on that machine during the infection window are compromised and initiate mandatory password resets.",
    "Analyze EDR telemetry to identify the specific process that initiated the `SetWindowsHookEx` call and terminate it.",
    "Locate and securely delete the hidden log file where the malware was storing the captured keystrokes."
  ],
  "what_to_avoid": [
    "Do not allow the user to continue using the machine or log into any accounts until the hook is definitively removed.",
    "Avoid ignoring the alert; even if the malware is 'just' a keylogger, the stolen credentials can be used for devastating lateral movement."
  ],
  "target_industries": [
    "Global / Opportunistic"
  ],
  "motivation": "Opportunistic",
  "threat_actors": [
    "Unknown / Cybercriminal"
  ],
  "target_geographies": [
    "Global"
  ]
}