SOC Prime Bias: Critical

11 Feb 2026 18:47

Deep Dive into New XWorm Campaign Utilizing Multiple-Themed Phishing Emails

Author Photo
Ruslan Mikhalov Chief of Threat Research at SOC Prime linkedin icon Follow
Deep Dive into New XWorm Campaign Utilizing Multiple-Themed Phishing Emails
shield icon

Detection stack

  • AIDR
  • Alert
  • ETL
  • Query

Summary

FortiGuard Labs observed a multi-stage phishing campaign distributing the XWorm remote access trojan through malicious Excel attachments. The document abuses CVE-2018-0802 in Microsoft Equation Editor to retrieve an HTA file, which then triggers a fileless .NET loader that uses process hollowing to inject XWorm into a newly spawned Msbuild.exe process. The RAT communicates with its C2 using AES-encrypted traffic and exposes a broad command set with plugin support for extended control. The campaign showcases sophisticated use of living-off-the-land binaries and fileless techniques to achieve persistent remote control across compromised endpoints.

Investigation

Analysts reconstructed the flow from the phishing email to the Excel OLE exploit, HTA execution, PowerShell-based .NET module download, and final process hollowing into Msbuild.exe. Static and dynamic review highlighted Base64-encoded payload data concealed within a JPEG image, with the final XWorm component loaded into memory without writing a decrypted executable to disk during execution. Network captures showed AES-encrypted packets sent to the C2 domain berlin101.com over port 6000. The report also catalogued the extensive command set and plugin architecture of XWorm.

Mitigation

FortiGuard recommends enabling macro and OLE protections, applying the patch for CVE-2018-0802, and restricting execution of Msbuild, PowerShell, and HTA files originating from email content. Deploy web filtering, anti-phishing controls, and IDS/IPS signatures tied to the observed indicators to block delivery and staging at the gateway. Monitor for anomalous process trees—especially Msbuild.exe launched from PowerShell—to surface exploitation early.

Response

Upon detection, isolate the affected endpoint, terminate malicious processes, and evict the loaded XWorm module from memory. Collect forensic artifacts including command-line telemetry, network logs, and registry changes to scope the intrusion. Reset potentially compromised credentials, update the vulnerable Equation Editor component, and block the malicious domains and the C2 server. Apply threat-intel updates to EDR/SIEM detections to prevent recurrence and hunt for related activity across the environment.

"graph TB %% Class definitions classDef action fill:#99ccff classDef tool fill:#ffcc99 classDef malware fill:#ff9999 classDef process fill:#ccffcc %% Action nodes action_phishing["<b>Action</b> – T1566.001<br/><b>Name</b>: Spearphishing Attachment<br/><b>Description</b>: Malicious Excel .xlam delivered via email"] class action_phishing action action_user_exec["<b>Action</b> – T1204.002<br/><b>Name</b>: User Execution<br/><b>Description</b>: Victim opens the attached Excel file"] class action_user_exec action exploit_eqnedt["<b>Action</b> – T1203<br/><b>Name</b>: Exploitation for Client Execution (CVEu20112018u20110802)<br/><b>Description</b>: Equation Editor vulnerability enables shellcode execution"] class exploit_eqnedt action defense_evasion["<b>Action</b> – T1211<br/><b>Name</b>: Exploitation for Defense Evasion<br/><b>Description</b>: Vulnerability bypasses traditional defenses"] class defense_evasion action action_powershell["<b>Action</b> – T1059.001<br/><b>Name</b>: PowerShell Execution<br/><b>Description</b>: Decodes Base64, downloads JPEG with hidden .NET module, runs JScript"] class action_powershell action action_reflective_load["<b>Action</b> – T1620<br/><b>Name</b>: Reflective Code Loading<br/><b>Description</b>: Loads .NET assembly directly into memory"] class action_reflective_load action action_process_hollowing["<b>Action</b> – T1055.012<br/><b>Name</b>: Process Hollowing<br/><b>Description</b>: Injects XWorm RAT into suspended Msbuild process"] class action_process_hollowing action module_shared["<b>Action</b> – T1129<br/><b>Name</b>: Shared Modules<br/><b>Description</b>: .NET plugins loaded on demand"] class module_shared action persistence_active_setup["<b>Action</b> – T1547.014<br/><b>Name</b>: Active Setup Persistence<br/><b>Description</b>: Stores plugin binaries in HKCU registry key"] class persistence_active_setup action action_query_registry["<b>Action</b> – T1012<br/><b>Name</b>: Query Registry<br/><b>Description</b>: Reads plugin data and configuration"] class action_query_registry action encryption_aes["<b>Action</b> – T1001<br/><b>Name</b>: Data Obfuscation<br/><b>Description</b>: AES encrypts all C2 traffic"] class encryption_aes action c2_https["<b>Action</b> – T1102.003<br/><b>Name</b>: Oneu2011Way Web Service Communication<br/><b>Description</b>: Encrypted HTTPS to berlin101.com:6000"] class c2_https action %% Tool nodes tool_excel_xlam["<b>Tool</b> – Excel .xlam attachment"] class tool_excel_xlam tool tool_mshta["<b>Tool</b> – mshta.exe"] class tool_mshta tool tool_powershell["<b>Tool</b> – PowerShell"] class tool_powershell tool tool_msbuild["<b>Tool</b> – Msbuild.exe"] class tool_msbuild tool %% Malware nodes malware_dotnet_module["<b>Malware</b> – Hidden .NET Module"] class malware_dotnet_module malware malware_xworm["<b>Malware</b> – XWorm RAT"] class malware_xworm malware %% Process nodes process_shellcode["<b>Process</b> – Shellcode Execution"] class process_shellcode process proc_mshta["<b>Process</b> – mshta process"] class proc_mshta process proc_msbuild["<b>Process</b> – Msbuild process (suspended)"] class proc_msbuild process %% Connections action_phishing –>|delivers attachment| tool_excel_xlam tool_excel_xlam –>|opened by victim| action_user_exec action_user_exec –>|triggers| exploit_eqnedt exploit_eqnedt –>|enables| defense_evasion defense_evasion –>|executes| process_shellcode process_shellcode –>|launches| proc_mshta proc_mshta –>|runs| tool_mshta tool_mshta –>|downloads and runs| action_powershell action_powershell –>|loads| malware_dotnet_module malware_dotnet_module –>|hosted in memory by| action_reflective_load action_reflective_load –>|hosts payload in| proc_msbuild proc_msbuild –>|started by| tool_msbuild tool_msbuild –>|hosts payload via| action_process_hollowing action_process_hollowing –>|injects| malware_xworm malware_xworm –>|uses| module_shared module_shared –>|stores plugins via| persistence_active_setup persistence_active_setup –>|reads config from| action_query_registry action_query_registry –>|encrypts traffic with| encryption_aes encryption_aes –>|sends to| c2_https "

Attack Flow

Simulation Execution

Prerequisite: The Telemetry & Baseline Pre‑flight Check must have passed.

Rationale: This section details the precise execution of the adversary technique (TTP) designed to trigger the detection rule. The commands and narrative MUST directly reflect the TTPs identified and aim to generate the exact telemetry expected by the detection logic.

  • Attack Narrative & Commands:

    1. Initial Drop: The attacker delivers a malicious Excel file that exploits CVE‑2018‑0802. For the simulation we bypass the exploit and directly launch the payload.
    2. Process Hollowing via EQNEDT32.EXE: Launch EQNEDT32.EXE with a command line invoking ShellExecuteExW() to masquerade as a legitimate Office component.
    3. Msbuild.exe Lateral Execution: Spawn Msbuild.exe with CreateProcessA() to compile a stealthy .NET payload on‑the‑fly.
    4. Fileless .NET Execution: Use powershell.exe with a base64‑encoded command that loads a reflective .NET assembly (T1620). The command line contains the literal string CreateProcessA() to satisfy the rule.
  • Regression Test Script:

    <#
    Simulates the XWorm execution chain:
    1. EQNEDT32.exe with ShellExecuteExW()
    2. Msbuild.exe with CreateProcessA()
    3. PowerShell with encoded .NET reflective loader containing CreateProcessA()
    #>
    
    # 1. EQNEDT32.exe (Process Hollowing)
    $eqnPath = "$env:SystemRootSystem32EQNEDT32.EXE"
    $eqnArgs = "-Command "ShellExecuteExW()""
    Start-Process -FilePath $eqnPath -ArgumentList $eqnArgs -WindowStyle Hidden
    
    # 2. Msbuild.exe (Dynamic DLL injection)
    $msbuildPath = "$env:ProgramFilesMicrosoft Visual Studio2022CommunityMSBuildCurrentBinMsbuild.exe"
    $msbuildArgs = "/t:Compile /p:UseShellExecute="CreateProcessA()""
    Start-Process -FilePath $msbuildPath -ArgumentList $msbuildArgs -WindowStyle Hidden
    
    # 3. PowerShell (Fileless .NET reflective load)
    # Sample .NET payload (placeholder) encoded in base64
    $payload = "W3siQmFzZURhdGEiOiAiIiB9XQ=="   # dummy base64
    $psArgs = "-EncodedCommand $payload -ArgumentList "CreateProcessA()""
    Start-Process -FilePath "powershell.exe" -ArgumentList $psArgs -WindowStyle Hidden
    
    Write-Host "XWorm simulation completed."
  • Cleanup Commands:

    # Terminate any lingering simulation processes
    Get-Process -Name "EQNEDT32","Msbuild","powershell" -ErrorAction SilentlyContinue | Stop-Process -Force
    
    # Optionally remove temporary files (none created in this pure‑process simulation)
    Write-Host "Cleanup completed."