From Malspam to DesckVB RAT Deployment
Detection stack
- AIDR
- Alert
- ETL
- Query
Summary
The report outlines a malspam campaign that culminates in deployment of the DesckVB RAT through a layered infection chain. The attack begins with a DoubleClick redirect and a custom HTML lure, then moves through a JScript loader, multiple PowerShell stages, and a .NET reflective loader that injects the final RAT into signed Microsoft binaries. Once active, the malware establishes persistence, weakens Windows security controls, and communicates with its command-and-control infrastructure over encrypted TCP channels.
Investigation
Huntress analysts observed the execution of a malicious JScript file through wscript.exe, followed by heavily obfuscated PowerShell that generated additional scripts and retrieved .NET payloads. The .NET loader carried out anti-analysis checks, disabled antivirus and Microsoft Defender protections, created Run registry entries and scheduled tasks, and used InstallUtil.exe or MSBuild.exe for process hollowing. Configuration analysis exposed two DDNS-based command-and-control hosts, a hard-coded AES password, and GPU enumeration logic that may support future cryptomining activity.
Mitigation
Organizations should block the known malicious domains and DoubleClick tracking URLs, enforce safer handling of .js, .vbs, and .hta files, and configure script files to open in a text editor instead of executing directly. Email protections such as DMARC, DKIM, and SPF should be enabled, and attachments and links should be sandboxed where possible. Defenders should also monitor for unauthorized Microsoft Defender exclusions and detect reflective loading into signed binaries.
Response
Security teams should alert on wscript.exe launching scripts from public or user-writable directories, PowerShell activity using the legacy IE8 user-agent, and creation of suspicious Run or RunOnce registry keys or scheduled tasks. The malicious ZIP archive and related artifacts should be quarantined, the affected endpoint isolated, and a full forensic investigation conducted to remove the RAT and all associated persistence mechanisms.
"graph TB %% Class definitions classDef action fill:#99ccff classDef tool fill:#ffcc99 classDef malware fill:#c2f0c2 classDef process fill:#ffd9b3 classDef operator fill:#ff9900 %% Nodes – Actions phishing["<b>Action</b> – T1566.001 Phishing<br/>Spearphishing Attachment<br/>Malicious HTML attachment (Bestellung_2026.html) emailed to victim"] class phishing action user_execution["<b>Action</b> – T1204.002 User Execution<br/>Victim opens attachment triggering metau2011refresh redirect"] class user_execution action js_execution["<b>Action</b> – T1204 User Execution<br/>Malicious JavaScript (A021185521S210008-11521.js) executed by wscript.exe"] class js_execution action evade_checks["<b>Action</b> – T1497.001 Virtualization Sandbox Evasion<br/>Loader checks for VM, sandbox, debugger and reboots if detected"] class evade_checks action disable_defender["<b>Action</b> – T1685 Disable or Modify Tools<br/>Disables Microsoft Defender, adds exclusions, patches AMSI and ETW"] class disable_defender action av_discovery["<b>Action</b> – T1518.001 Security Software Discovery<br/>RAT enumerates AV products via WMI"] class av_discovery action obfuscation["<b>Action</b> – T1027.005 Obfuscated Files or Information<br/>Heavy base64, junk code and indicator removal used"] class obfuscation action code_signing["<b>Action</b> – T1553.002 Subvert Trust Controls<br/>Signed Microsoft binaries (InstallUtil.exe, MSBuild.exe) used as proxy"] class code_signing action proxy_execution["<b>Action</b> – T1218 System Binary Proxy Execution<br/>RunPE injection into signed binaries"] class proxy_execution action process_injection["<b>Action</b> – T1055.011 Process Injection<br/>Create suspended process, unmap image, write payload and resume"] class process_injection action hijack_permission["<b>Action</b> – T1574.005 Hijack Execution Flow<br/>Executable installer file permissions weakness leveraged"] class hijack_permission action persistence_registry["<b>Action</b> – T1547.001 Boot or Logon Autostart Execution<br/>Registry Run and RunOnce entries plus Startup folder copy"] class persistence_registry action persistence_task["<b>Action</b> – T1543.001 Create or Modify System Process<br/>Scheduled tasks created with schtasks for persistence"] class persistence_task action %% Nodes – Tools / Processes wscript["<b>Tool</b> – wscript.exe<br/>Executes malicious JavaScript"] class wscript tool installutil["<b>Tool</b> – InstallUtil.exe<br/>Signed Microsoft binary used for proxy execution"] class installutil tool msbuild["<b>Tool</b> – MSBuild.exe<br/>Signed Microsoft binary used for proxy execution"] class msbuild tool schtasks["<b>Tool</b> – schtasks.exe<br/>Creates oneu2011shot and recurring scheduled tasks"] class schtasks tool %% Node – Malware malicious_loader["<b>Malware</b> – Custom RAT Loader<br/>Performs evasion, disables defenses, injects payload"] class malicious_loader malware %% Operator (optional) op_and(("AND")) class op_and operator %% Connections u2013 Attack Flow phishing –>|leads_to| user_execution user_execution –>|triggers| js_execution js_execution –>|executes| wscript js_execution –>|loads| malicious_loader malicious_loader –>|performs| evade_checks evade_checks –>|continues_to| disable_defender disable_defender –>|enables| av_discovery av_discovery –>|supports| obfuscation obfuscation –>|facilitates| code_signing code_signing –>|uses| installutil code_signing –>|or uses| msbuild installutil –>|proxy_exec| proxy_execution msbuild –>|proxy_exec| proxy_execution proxy_execution –>|enables| process_injection process_injection –>|enables| hijack_permission hijack_permission –>|enables| persistence_registry persistence_registry –>|establishes| persistence_task persistence_task –>|maintains| malicious_loader %% Styling assignments class phishing,user_execution,js_execution,evade_checks,disable_defender,av_discovery,obfuscation,code_signing,proxy_execution,process_injection,hijack_permission,persistence_registry,persistence_task action class wscript,installutil,msbuild,schtasks tool class malicious_loader malware class op_and operator "
Attack Flow
Detections
Possible Persistence Points [ASEPs – Software/NTUSER Hive] (via registry_event)
View
The Possibility of Execution Through Hidden PowerShell Command Lines (via cmdline)
View
LOLBAS WScript / CScript (via process_creation)
View
Suspicious Execution from Public User Profile (via process_creation)
View
Suspicious Powershell Strings (via powershell)
View
Suspicious Files in Public User Profile (via file_event)
View
Possible IP Lookup Domain Communications Attempted (via dns)
View
IOCs (HashSha256) to detect: From Malspam to DesckVB RAT Deployment
View
Detect PowerShell Execution with Bypassed Execution Policy [Windows Powershell]
View
DesckVB RAT C2 Communication Detection [Windows Network Connection]
View
Execution of DesckVB RAT via Microsoft-Signed Processes [Windows Process Creation]
View
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. Abstract or unrelated examples will lead to misdiagnosis.
Attack Narrative & Commands
- Stage 1 – Deliver malicious JavaScript payload
The attacker dropsktncm.js(the DesckVB RAT bootstrap) intoC:UsersPublic. - Stage 2 – Execute the JavaScript via
wscript.exe
This creates a process with Image*\wscript.exeand CommandLine containing the full path toktncm.js. - Stage 3 – Launch a PowerShell loader with execution‑policy bypass
The JavaScript spawnspowershell.exe -ExecutionPolicy Bypass -File <loader>.ps1, matching theselection_pspattern. - Stage 4 – Use a Microsoft‑signed binary (
installutil.exe) to load the embedded .NET RAT DLL
The PowerShell loader invokesinstallutil.exewith the RAT assembly as argument, satisfyingselection_installutil. - Stage 5 – Ensure
MSBuild.exeis not the sole process (the rule explicitly negates pure MSBuild usage).
The combined telemetry (wscript → powershell → installutil) satisfies selection_js and (selection_ps or selection_installutil) and not selection_msbuild, thus firing the alert.
Regression Test Script
The script below reproduces the exact chain on a Windows host. Run as Administrator.
# --------------------------------------------------------------
# DesckVB RAT simulation script – triggers the Sigma rule
# --------------------------------------------------------------
# 1. Create malicious JavaScript (placeholder payload)
$jsPath = "C:UsersPublicktncm.js"
Set-Content -Path $jsPath -Value @"
WScript.Echo('Launching RAT...');
var shell = WScript.CreateObject('WScript.Shell');
shell.Run('powershell.exe -ExecutionPolicy Bypass -File C:UsersPublicloader.ps1', 0, false);
"@
# 2. Create PowerShell loader (simulated obfuscated command)
$psPath = "C:UsersPublicloader.ps1"
Set-Content -Path $psPath -Value @"
# Simulated obfuscation: base64‑encoded command that runs the RAT DLL via InstallUtil
$encoded = 'JABzAGUAcwB0ACAAKABJAG4zdABkAHUAdABlAHIASWUAbwA=' # dummy
$bytes = [Convert]::FromBase64String($encoded)
$command = [System.Text.Encoding]::Unicode.GetString($bytes)
# In a real attack this would be: installutil.exe C:UsersPublicRAT.dll
Write-Output 'Pretend to run InstallUtil with RAT DLL'
"@
# 3. Execute the malicious JavaScript via wscript.exe
Start-Process -FilePath "$env:SystemRootSystem32wscript.exe" -ArgumentList "`"$jsPath`"" -WindowStyle Hidden
# 4. Simulate InstallUtil execution (this step is *not* actually performed, but we
# spawn the process to generate the expected telemetry)
Start-Process -FilePath "$env:SystemRootMicrosoft.NETFramework64v4.0.30319installutil.exe" `
-ArgumentList "/LogFile= /LogToConsole=false C:UsersPublicRAT.dll" -WindowStyle Hidden
# --------------------------------------------------------------
# End of simulation – the above processes produce the exact
# EventID=1 logs that match the Sigma rule.
# --------------------------------------------------------------
Cleanup Commands
# Remove artifacts
Remove-Item -Path "C:UsersPublicktncm.js","C:UsersPublicloader.ps1","C:UsersPublicRAT.dll" -Force -ErrorAction SilentlyContinue
# Stop any lingering installutil or wscript processes (if still running)
Get-Process -Name wscript, installutil -ErrorAction SilentlyContinue | Stop-Process -Force
End of Report