{
  "family": "code",
  "sample_count": 1,
  "category": "ransomware",
  "description": "Trojan:Win32/Code (or Exploit:JS/Code, Script:VBS/Code) is a generic classification denoting the detection of malicious scripting or raw exploit code, rather than a compiled executable binary. This signifies the presence of 'fileless' malware techniques, where attackers leverage built-in operating system interpreters (like PowerShell, VBScript, or JavaScript) (`T1059`) to execute malicious logic directly in memory, bypassing many traditional file-scanning antivirus engines.<br><br><b>Understanding Script-Based Threats ('Code')</b><br>To an end-user, an infection utilizing script-based code is often completely invisible, as there is no traditional `.exe` file to double-click. For a SOC analyst, a 'Code' detection usually points to the *delivery mechanism* or *initial access* phase of an attack. The script's job is typically to establish a foothold, disable defenses, and download the actual compiled payload (like ransomware or a RAT).<br><br><b>Execution and Fileless Mechanics</b><br>Malicious 'Code' is frequently delivered via weaponized Office documents (Macros), malicious HTML files, or shortcut (`.lnk`) files. Upon execution, the script (e.g., PowerShell) is often heavily obfuscated using Base64 encoding or string manipulation (`T1027`). It runs entirely within the memory space of the interpreter process (e.g., `powershell.exe`, `wscript.exe`, `mshta.exe`), meaning no malicious file is written to the hard drive during the execution phase. The script typically utilizes 'Living off the Land' techniques, employing legitimate administrative commands to download a payload (`T1105`) or create a reverse shell.<br><br><b>Indicators of Compromise & Impact</b><br>The impact depends on the payload the script is designed to download. Host-based IoCs require robust behavioral monitoring (EDR): look for anomalous command-line arguments passed to script interpreters (e.g., `powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -EncodedCommand...`), Office applications (`winword.exe`) spawning script interpreters, or `wscript.exe` making outbound network connections. Network IoCs involve the script interpreters making HTTP/HTTPS GET requests to unknown or compromised domains to fetch the secondary payload.",
  "cta": "Published by the SystemHelpdesk team.",
  "aliases": [],
  "enrichment_level": "expert-seo",
  "faq": [],
  "faq_count": 0,
  "mitre_attack": [
    "T1105",
    "T1059",
    "T1027"
  ],
  "cisa_advisory": null,
  "last_updated": "2026-06-09",
  "mitre_attack_detail": [
    {
      "id": "T1059",
      "name": "Command and Scripting Interpreter (Utilizing built-in OS tools like PowerShell or VBScript for execution)",
      "tactic": "Execution"
    },
    {
      "id": "T1027",
      "name": "Obfuscated Files or Information (Encoding scripts to bypass static analysis)",
      "tactic": "Defense Evasion"
    },
    {
      "id": "T1105",
      "name": "Ingress Tool Transfer (Using scripts to download compiled secondary payloads)",
      "tactic": "Command and Control"
    }
  ],
  "containment_steps": [
    "Isolate the endpoint and determine what the malicious script downloaded and executed; the script is usually just the first stage.",
    "Analyze the obfuscated command-line arguments captured by EDR (or PowerShell Script Block Logging) to extract the C2 domains and payload URLs.",
    "Implement strict Application Control (like AppLocker or WDAC) to restrict the execution of PowerShell and WScript to authorized administrators only.",
    "Disable Office Macros via Group Policy for all documents originating from the internet."
  ],
  "what_to_avoid": [
    "Do not assume the threat is neutralized simply because the AV blocked the initial script; always verify if any child processes were spawned.",
    "Avoid leaving PowerShell Script Block Logging (Event ID 4104) disabled; it is essential for investigating fileless attacks."
  ],
  "target_industries": [
    "Global / Opportunistic"
  ],
  "motivation": "Opportunistic",
  "threat_actors": [
    "Unknown / Cybercriminal"
  ],
  "target_geographies": [
    "Global"
  ]
}