{
  "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": [
    {
      "@type": "Question",
      "name": "What is Code and what threat category does it belong to?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Code is classified as a Ransomware. Documented across security telemetry, it is engineered to execute unauthorized operations, establish persistent footholds on target endpoints, and facilitate malicious campaigns targeting enterprise and individual environments."
      }
    },
    {
      "@type": "Question",
      "name": "How does Code establish persistence and evade defensive controls?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Code typically establishes persistence through registry run keys, scheduled tasks, or service installations, while evading signature-based antivirus solutions through code obfuscation, memory injection, or anti-analysis sandbox checks."
      }
    },
    {
      "@type": "Question",
      "name": "What are the essential incident response steps for mitigating a Code compromise?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Security teams responding to Code should immediately isolate affected endpoints from the network, perform memory triage to capture volatile forensic artifacts, audit registry and startup persistence mechanisms, revoke exposed user credentials, and restore systems from verified, clean backups."
      }
    },
    {
      "@type": "Question",
      "name": "What cryptographic algorithms and file targeting techniques does Code employ during execution?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Code typically leverages hybrid cryptographic architectures combining symmetric stream or block ciphers (such as AES-256 or ChaCha20) for rapid file encryption with asymmetric algorithms (such as RSA-2048 or Curve25519) to securely protect the session keys. It aggressively targets sensitive file extensions including corporate documents, databases, virtual disks, and backups while systematically executing commands to delete Volume Shadow Copies (vssadmin delete shadows /all /quiet) and disable system recovery options."
      }
    },
    {
      "@type": "Question",
      "name": "Are decryptors available for Code, and what is the recommended recovery procedure?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Decryption availability for Code depends on whether security researchers or law enforcement (such as the No More Ransom initiative) have recovered the master private keys or discovered flaws in its key generation routines. Victims should never pay the extortion demand, as payment fuels criminal operations without guaranteeing file restoration. The recommended recovery procedure entails isolating infected hosts, conducting forensic disk imaging, identifying the root access vector, and restoring validated systems from immutable offline backups."
      }
    }
  ],
  "faq_count": 5,
  "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": [
    "Healthcare",
    "Critical Infrastructure",
    "Enterprise"
  ],
  "motivation": "Financial Extortion",
  "threat_actors": [
    "Unknown / Cybercriminal"
  ],
  "target_geographies": [
    "Global"
  ],
  "attack_stage": [
    "defense_evasion",
    "impact"
  ],
  "ecosystem": [
    "windows_pe"
  ],
  "is_emerging": false,
  "target_platforms": [
    "Windows 11",
    "Windows 10",
    "Windows Server 2022",
    "Windows Server 2019"
  ]
}