{
  "family": "njlogger",
  "sample_count": 4,
  "category": "trojan",
  "description": "Spyware:Win32/Njlogger is a highly prevalent keylogging component, frequently encountered as a module embedded within the notorious **njRAT (Bladabindi)** remote access trojan, though it can occasionally be deployed standalone. Its primary function is the systematic, stealthy collection of user credentials, sensitive communications, and intellectual property by recording every keystroke made on the infected endpoint.<br><br><b>Understanding Njlogger</b><br>To an end-user, Njlogger operates entirely invisibly in the background. Passwords typed into web browsers, SSH clients, or corporate VPN portals are silently captured. For an enterprise, Njlogger represents a catastrophic breach of confidentiality. The stolen credentials can be used for immediate lateral movement, privilege escalation, or sold on dark web marketplaces to other Initial Access Brokers (IABs).<br><br><b>Execution and Data Collection Mechanics</b><br>Njlogger is typically deployed after an initial compromise (via phishing or exploit). Upon execution, it establishes persistence, often via the Registry Run keys or the Startup folder (`T1547.001`). The core functionality relies on API hooking, specifically the `SetWindowsHookEx` API (`T1056.001`). By hooking the keyboard message stream globally, Njlogger intercepts the `WH_KEYBOARD_LL` (low-level keyboard hook) event, capturing every keystroke before the intended application receives it. In addition to keystrokes, Njlogger frequently monitors the active window title (`GetForegroundWindow`) to provide context to the captured keys (e.g., showing that 'password123' was typed into 'Google Chrome - Bank Login'). It also frequently polls the system clipboard (`T1115`) to steal copied passwords. The collected data is written to a hidden, encrypted log file in the `%Temp%` or `%AppData%` directory before being exfiltrated to the botmaster (`T1048.003`).<br><br><b>Indicators of Compromise & Impact</b><br>The impact is total compromise of user credentials and sensitive data. Host-based IoCs include EDR alerts for suspicious processes employing API hooking (`SetWindowsHookEx`), the presence of rapidly growing, obfuscated `.log` or `.dat` files in user directories, and processes reading the clipboard excessively. Network IoCs involve regular, encrypted beaconing containing the compressed log files to known njRAT C2 infrastructure.",
  "cta": "Published by the SystemHelpdesk team.",
  "aliases": [],
  "enrichment_level": "expert-seo",
  "faq": [],
  "faq_count": 0,
  "mitre_attack": [
    "T1115",
    "T1547.001",
    "T1056.001",
    "T1048.003"
  ],
  "cisa_advisory": null,
  "last_updated": "2026-06-09",
  "mitre_attack_detail": [
    {
      "id": "T1056.001",
      "name": "Input Capture: Keylogging (Hooking SetWindowsHookEx)",
      "tactic": "Collection"
    },
    {
      "id": "T1115",
      "name": "Clipboard Data (Stealing copied passwords)",
      "tactic": "Collection"
    },
    {
      "id": "T1547.001",
      "name": "Boot or Logon Autostart Execution",
      "tactic": "Persistence"
    },
    {
      "id": "T1048.003",
      "name": "Exfiltration Over Alternative Protocol",
      "tactic": "Exfiltration"
    }
  ],
  "containment_steps": [
    "Immediately isolate the infected endpoint from the network to prevent further exfiltration of the captured keystroke logs.",
    "Assume all passwords typed on the infected machine (including Domain Admin credentials if applicable) are completely compromised and initiate an immediate, enterprise-wide password reset for that user.",
    "Run a full memory analysis (RAM dump) to identify the running Njlogger process and extract any decryption keys for the local log files to determine exactly what data was stolen.",
    "Investigate the network logs to identify the C2 server receiving the keystroke data and block it."
  ],
  "what_to_avoid": [
    "Do not allow the user to simply change their password *on the infected machine*; the keylogger will immediately capture the new password.",
    "Avoid relying solely on basic file deletion to remediate; keyloggers are often injected into legitimate processes, requiring a reboot or advanced EDR remediation to fully clear the hook."
  ],
  "target_industries": [
    "Global / Opportunistic"
  ],
  "motivation": "Opportunistic",
  "threat_actors": [
    "Unknown / Cybercriminal"
  ],
  "target_geographies": [
    "Global"
  ]
}