Threat Advisory

CastleLoader Malware Attacking US Government Agencies and Critical Infrastructure

Threat: Malware Campaign
Targeted Region: United States
Targeted Sector: Government & Defense, Critical Infrastructure, Technology & IT
Criticality: High
[subscribe_to_unlock_form]

EXECUTIVE SUMMARY:

CastleLoader represents a modern evolution in loader-based malware, designed to operate as the foundational stage of multi-step intrusion chains targeting high-value environments. The malware has emerged as a highly effective initial-access and execution component, frequently observed in campaigns impacting government entities, critical infrastructure, and multiple commercial sectors. Rather than acting as a standalone payload, the loader is engineered to prepare the system for subsequent malicious activity by stealthily deploying follow-on malware such as information stealers and remote access trojans. Its growing adoption is driven by a flexible architecture, high infection success rates, and compatibility with multiple delivery techniques, including social-engineering methods like ClickFix. These characteristics allow attackers to reuse CastleLoader across campaigns while dynamically changing payloads based on operational objectives. The malware’s role as the first dependable stage in the attack chain makes it particularly dangerous, as successful execution dramatically increases the likelihood of deeper compromise. Overall, CastleLoader is best understood not as a single malicious binary, but as a campaign-enabling loader that supports coordinated, repeatable, and scalable attacks across diverse environments.[/subscribe_to_unlock_form]

EXECUTIVE SUMMARY:

CastleLoader represents a modern evolution in loader-based malware, designed to operate as the foundational stage of multi-step intrusion chains targeting high-value environments. The malware has emerged as a highly effective initial-access and execution component, frequently observed in campaigns impacting government entities, critical infrastructure, and multiple commercial sectors. Rather than acting as a standalone payload, the loader is engineered to prepare the system for subsequent malicious activity by stealthily deploying follow-on malware such as information stealers and remote access trojans. Its growing adoption is driven by a flexible architecture, high infection success rates, and compatibility with multiple delivery techniques, including social-engineering methods like ClickFix. These characteristics allow attackers to reuse CastleLoader across campaigns while dynamically changing payloads based on operational objectives. The malware’s role as the first dependable stage in the attack chain makes it particularly dangerous, as successful execution dramatically increases the likelihood of deeper compromise. Overall, CastleLoader is best understood not as a single malicious binary, but as a campaign-enabling loader that supports coordinated, repeatable, and scalable attacks across diverse environments.[emaillocker id="1283"]

Technically, CastleLoader relies on a structured, multi-stage execution chain that emphasizes stealth and evasion. Initial infection often begins with a bundled installer generated using Inno Setup, which appears legitimate and helps bypass basic security checks. This installer deploys AutoIt-based scripts responsible for system reconnaissance, execution flow control, and payload handling. One of the most notable techniques employed is process hollowing, where a legitimate Windows process is launched in a suspended state and then replaced with malicious code. This allows the final payload to execute under the identity of a trusted process, significantly reducing the chance of detection. Additionally, the loader ensures that secondary payloads are executed directly in memory, minimizing disk artifacts and hindering forensic analysis. CastleLoader also dynamically resolves Windows APIs using hashed function names, complicating reverse engineering and static detection. Network communication with command-and-control infrastructure typically occurs only after successful process manipulation, reinforcing its role as a stealth-focused loader.

CastleLoader illustrates the broader shift toward modular, campaign-oriented malware ecosystems where loaders act as critical enablers. Its consistent ability to deploy a variety of secondary payloads—including credential stealers and persistent remote access tools—makes it a valuable asset for threat actors. The combination of social-engineering-assisted delivery, layered execution stages, and memory-only payload deployment positions CastleLoader as a high-risk threat, particularly for organizations with sensitive or strategic assets. Defending against such malware requires behavioral visibility and runtime monitoring rather than reliance on static indicators alone. The repeated use of CastleLoader across multiple attacks, sectors, and regions demonstrates that it is a mature and operationally reliable tool, not an isolated experiment. As attackers continue to prioritize stealth, reuse, and adaptability, loader-based malware like CastleLoader will remain a central component of intrusion chains, making early-stage detection and disruption increasingly critical for effective defense.

THREAT PROFILE:

Tactic Technique ID Technique Sub-Technique
Initial Access T1566.002 Phishing Spearphishing Link
Execution T1059.005 Command and Scripting Interpreter Visual Basic
T1059.007 Command and Scripting Interpreter JavaScript
T1106 Native API
Defense Evasion T1027.002 Obfuscated Files or Information Software Packing
T1055.012 Process Injection Process Hollowing
T1140 Deobfuscate/Decode Files or Information
T1070.004 Indicator Removal File Deletion
Discovery T1082 System Information Discovery
T1012 Query Registry
Command and Control T1071.001 Application Layer Protocol Web Protocols
T1105 Ingress Tool Transfer
T1573.002 Encrypted Channel Asymmetric Cryptography

MBC MAPPING:

Objective Behaviour ID Behaviour
Defense Evasion E1055 Process Injection
Anti-Behavioral Analysis F0001 Software Packing
Collection F0002 Keylogging
Execution E1204 User Execution
Anti-Static Analysis B0012 Disassembler Evasion

REFERENCES:

The following reports contain further technical details:

https://cybersecuritynews.com/stealthy-castleloader-malware/

https://any.run/cybersecurity-blog/castleloader-malware-analysis/?utm_source=CSN&utm_medium=news&utm_campaign=castleloader&utm_content=malwareanalysis&utm_term=140126

[/emaillocker]
crossmenu