Technical Analysis & Remediation
MITRE ATT&CK Mapping
T1204.002 (User Execution: Malicious File)
User tricked into running "Setup.exe" or pasting code.
T1059.001 (Command and Scripting Interpreter: PowerShell) "ClickFix" injects malicious PowerShell directly into the clipboard.
T1027.003 (Obfuscated Files or Information: Steganography) CastleLoader hides payloads inside PNG IDAT chunks.
T1568.002 (Dynamic Resolution: Domain Generation Algorithms) CastleLoader generates "failed" DNS lookups to signal C2s.
The "ClickFix" Vector (Initial Access)
Mechanism
Users are presented with a fake error (e.g., "Word Connect Error" or "Verification Failed") and instructed to click a button to "fix" it.
The Injection
Clicking copies a malicious script to the clipboard. The user is then socially engineered to press Win+R (Run), Ctrl+V (Paste), and Enter.
Telemetry (PowerShell)
PowerShell
Code:
powershell.exe -w h -nop -c "..."
-w h
Hidden Window (invisible execution).
-nop
No Profile (bypasses profile logging).
Observed C2
hxxp[:]//185[.]102[.]115[.]69
The CastleLoader Pipeline (Execution & Persistence)
Loader Logic
If a file is downloaded instead (e.g., fake crack), Setup.exe drops a .js file executed by wscript.exe.
Evasion
It utilizes the AutoIt interpreter to run the loader in memory.
Network Signature
The malware generates noise by querying random, non-existent domains (resulting in NXDOMAIN responses) to mask its actual C2 traffic.
Remediation - THE ENTERPRISE TRACK (NIST SP 800-61r3 / CSF 2.0)
GOVERN (GV) – Policy & Risk
Command
Update the Incident Response Plan to include "Clipboard Injection" as a specific vector.
Command
Brief L1/L2 Support: "Users reporting 'I pasted code to fix an error' must be treated as a full compromise, not a software glitch."
DETECT (DE) – Monitoring & Hunting
Command (SIEM)
Alert on process creation where explorer.exe is the parent of powershell.exe with arguments containing -w h (Window Hidden) or EncodedCommand.
Command (Network)
Monitor for endpoints generating a high burst of NXDOMAIN (DNS failure) responses in a short window (CastleLoader beaconing).
Command (Endpoint)
Flag any wscript.exe or cscript.exe instance connecting to the internet.
RESPOND (RS) – Mitigation
Command
Isolate the host immediately. The "ClickFix" vector often grants immediate C2 access.
Command
Terminate active powershell.exe, wscript.exe, and any unknown AutoIt3.exe processes.
Command
Purge the user's %TEMP% folder (look for pfhq.ps1 or similar script artifacts).
RECOVER (RC) – Restoration
Command
Reset all session cookies and tokens (O365, Okta, VPN). LummaStealer exfiltrates these instantly.
Command
Re-image the device. The use of Scheduled Tasks (schtasks.exe) and registry keys makes manual cleanup risky.
IDENTIFY & PROTECT (PR) – Hardening
Command
Attack Surface Reduction (ASR) Rule: Block JavaScript or VBScript from launching downloaded executable content.
Command
Deploy a Group Policy Object (GPO) to associate .js, .vbs, and .wsf files with Notepad.exe instead of Windows Script Host.
Remediation - THE HOME USER TRACK (Safety Focus)
Priority 1: Safety (Stop the Bleeding)
Command
Disconnect from the internet immediately. (Pull the Ethernet cable or toggle Wi-Fi off).
Command
Do not use this computer for banking, email, or shopping until it is wiped.
Priority 2: Identity (The Real Target)
Command
Using a different device (like your smartphone on 5G/LTE), change your passwords for:
Email (Gmail, Outlook) - Do this first.
Banking & Finance.
Steam/Discord/Epic Games (common targets).
Command
Force a "Log out of all devices" on your Google/Apple accounts to kill the stolen session cookies.
Priority 3: Cleanup & Persistence
Command
Check the "Startup" tab in Task Manager for suspicious entries (random names or "Program").
Command
Run a full scan with Microsoft Defender Offline (Settings > Privacy & Security > Windows Security > Virus & threat protection > Scan options > Microsoft Defender Antivirus (offline scan)).
Hardening & References
Baseline
CIS Benchmark for Windows 10/11 (Scripting Engine Restrictions).
Framework
NIST CSF 2.0 (PR.AT-01: User Training).
Sources
Bitdefender Labs