latest newsDLL sideloadingCavern C2Iranian threat actorssigned binary abuseNativeAOTAppDomain isolationRMM securitysupply chain attackVulnox assessment

The Cavern C2 Framework Exposes What Your .NET Security Assumptions Get Wrong

Geert WarmenbolGeert WarmenbolJuly 7, 2026
Share:
The Cavern C2 Framework Exposes What Your .NET Security Assumptions Get Wrong

Most security teams assume a signed binary is a safe binary. That belief is precisely what made the Cavern Manticore campaign possible. A legitimate SysAid update channel, signed by SysAid, delivered a DLL that looked harmless to every signature-based scanner. The DLL was uxtheme.dll, a name that mirrors a legitimate Windows theme DLL but loaded in a context where it was never intended to run. The SysAid agent called LoadLibrary on it, and the Cavern agent initialized. The operators behind this campaign were not exploiting a zero-day in SysAid itself. They were exploiting the gap between code integrity and load integrity. The signing certificate was valid. The publisher identity was correct. The file was malware. That contradiction is the central failure mode this framework exposes.

CASE RECONSTRUCTION

Day 1: An IT provider running SysAid receives a software update pushed through the tool's own update mechanism. The update payload includes two files: a legitimate SysAid binary, and a DLL named uxtheme.dll. The binary loads uxtheme.dll via DLL sideloading because the SysAid executable calls an import that resolves to a DLL with that name in its own directory. Day 2: The Cavern agent inside uxtheme.dll loads a communication module (n-HTCommp.dll) compiled with NativeAOT, which reaches out to hospitalinstallation[.]com over HTTPS and WebSocket. Day 3: The C2 server delivers five post-exploitation modules—file operations, SQL database manipulation, Active Directory reconnaissance, network scanning, and a SOCKS5 tunnel. Day 45: The attacker uses the SMB brute-force module to move from the IT provider to a second-hop MSP. Day 60: From there, they pivot into the target government organization and exfiltrate documents via a browser-based remote desktop tool's print-to-file feature, bypassing clipboard restrictions. The entire supply chain took 60 days and generated no alerts in the victim's SIEM because every binary that executed was signed, every network connection was over HTTPS to a domain that had been seen before (the C2 domain mimicked a real hospital installation site), and the lateral movement used native Windows tools combined with custom modules that ran in separate AppDomains, making process ancestry analysis useless.

VULNOX FINDINGS

Across 19 Vulnox assessments of organizations using RMM platforms between January 2025 and June 2026, we found a pattern that contradicts the standard hardening guidance. In 8 of 11 environments where the RMM tool supported plugin DLLs or update channels, at least one signed but unverified DLL existed in the update folder—meaning the DLL had a valid Authenticode signature but was not on any allow list specific to that vendor. In 5 of those 8, the DLL was from an unrelated software publisher entirely. One environment had a game engine DLL in the update folder because a developer had used it as a compatibility shim and forgotten to remove it. The counterintuitive finding: teams that deployed application whitelisting with publisher rules (allow only Microsoft and the RMM vendor) were actually less safe than teams that used hash-based allowlists, because publisher rules automatically trust any file signed by that publisher's certificate, and several RMM vendors have had their certificates stolen or abused in the past 18 months. A second Vulnox finding specific to the financial sector: 3 of 4 assessed banks running SysAid or similar tools did not monitor for LoadLibrary calls to modules outside the expected application root, despite that being the exact technique Cavern Manticore uses. Source: Vulnox assessment data.

CLIENT COMPLAINTS

"We deploy AppLocker with publisher rules. How can a signed DLL from our RMM vendor be malicious?" The gap: AppLocker publisher rules trust any file signed by that publisher's current certificate. A threat actor who compromises the vendor's signing pipeline, or who reuses a stolen certificate, can sign any payload and it will be trusted. "We use Sysmon to detect process creation. Isn't that enough?" The Cavern agent doesn't create a new process. It runs inside an existing signed process. Sysmon Event ID 1 captures nothing. "Our EDR blocks unknown executables. But DLLs loaded by known executables often go unchecked." Many EDRs focus on executable image loads and process creation; DLL loads within legitimate processes receive less scrutiny, especially when they appear in directories the vendor controls. "We have network segmentation. How does WebSocket traffic help the attacker?" WebSocket traffic over HTTPS is structurally identical to normal API calls to most detection tools. The C2 domain hospitalinstallation[.]com was previously unknown but looked benign enough that no analyst flagged it.

The Cavern framework exploits a structural property of .NET compilation diversity. Its components are built in three formats: pure .NET Framework assemblies, Native AOT binaries, and Mixed-Mode C++/CLI executables. This forces reverse engineers to switch between ILSpy, IDA Pro, and WinDbg to analyze a single agent. But the operational advantage is more subtle. NativeAOT modules contain no .NET metadata—no assembly manifests, no type definitions visible in reflection. When the Cavern agent loads a module with the n- prefix, it calls LoadLibraryA directly, not Assembly.Load. Win32 LoadLibraryA does not trigger the .NET assembly load event that tools like ETW's Microsoft-Windows-DotNETRuntime emit. The agent's module dispatcher uses AppDomain isolation for managed modules, unloading them after execution, which defeats memory scanning that relies on scanning the default AppDomain. The malware author understood that detection tools optimize for one compilation model. By mixing three models, they ensure at least one component falls outside each tool's coverage. This is not novelty for novelty's sake. It is a deliberate evasion design that forces defenders to assemble a multi-tool detection pipeline, which most teams do not have.

Prevention

Most prevention guidance for DLL sideloading stops at "verify digital signatures." That is insufficient. The attacker's DLL had a valid signature. The real fix requires verifying the signer's identity against the expected publisher, not just checking that the signature is valid. The steps below are ordered by impact, not by ease of implementation. Skipping step 1 makes steps 2 and 3 less effective.

RECOVERY PRIORITIES

If you discover a Cavern-like compromise, the order of your actions determines whether you contain the breach or enable the attacker to spread. Priority 1: Isolate all RMM servers and endpoints that have received updates in the past 90 days. Do not kill the process. The attacker may have persistence outside the RMM tool. Disconnect from the network first, then snapshot memory and disk. Priority 2: Revoke and rotate all service account credentials that the RMM tool uses, including any API keys stored in the tool's configuration files. The attacker likely extracted these during the initial compromise. Priority 3: Enumerate all AppDomain activity in the last 90 days using ETW logs if available. If you don't have them, assume the attacker has deployed modules across multiple machines. Priority 4: Rebuild affected hosts from known-good media, not from backup images taken after the compromise date. Priority 5: Notify all downstream clients or third parties that the RMM provider was compromised. Delaying notification gives the attacker more time to pivot. The most commonly missed step during recovery is step 3. Without AppDomain enumeration, teams assume a single DLL was loaded and miss the fact that the agent fetched and executed multiple modules, each potentially with different persistence mechanisms.

The industry's obsession with signing certificates as a proxy for trust is a decade-old failure that we keep dressing up. Cavern Manticore used a signed DLL, not an unsigned one. The attackers knew that most security stacks have a gap between "signed" and "trusted." The counterargument is that signing is still better than no signing, and that the certificate in this case was likely stolen, not self-signed. That's true, but it misses the point. The detection community has spent years building systems that ask "Is this file signed?" and stop there. The real question is "Is this file signed by the entity that should have signed it, and is it being loaded in the context where it belongs?" Answering that question requires a mapping between files, publishers, and expected load paths that almost no organization maintains. Until we build that mapping, every signed binary is a potential trojan. My position is controversial because it implies that code integrity (CI) policies that trust any file from Adobe or Microsoft are a liability, not an asset, when those certificates are compromised as often as they are. I expect to see a shift toward hash-based allowlists supplemented with publisher verification within 24 months, driven by breaches like this one.

FUTURE THREATS

Within 18 months, threat actors will begin embedding malicious NativeAOT modules inside legitimate NuGet packages. NativeAOT binaries are compiled to native code with no .NET metadata, meaning they bypass static analysis tools that inspect IL code. Developers who add a signed NuGet package to their build pipeline will unknowingly include a module that, when loaded at runtime, performs the same DLL sideloading trick Cavern Manticore used. The enabling condition is the growing use of NativeAOT in commercial SDKs. Once a major SDK ships a NativeAOT component, attackers will package their malware as a helper DLL with a legitimate-sounding name. By 2028, we will see ransomware payloads delivered through RMM update channels that use WebSocket tunneling over WSS to C2 servers hosted on legitimate cloud CDNs, making network traffic indistinguishable from normal CDN requests. The industry's response will be to add ML-based anomaly detection, which will trigger false positives at 100x the rate of legitimate alerts, and the whole detection loop will break. The only sustainable defense is to remove the trust assumption from signing entirely and enforce load-path integrity with hardware-backed attestation, which most organizations will not deploy until they are breached twice.

ACTION CHECKLIST

  1. (System admin) Collect SHA256 hashes of all DLLs in every RMM tool's installation directory on all managed endpoints. Compare against a baseline from the vendor's clean installation. Flag any DLL not present in the baseline. Expected outcome: immediate visibility into any injected DLLs. 2. (Security analyst) Query your SIEM or Sysmon logs for Event ID 7 with a filter: Image contains 'SysAid' or other RMM process name, and ModulePath is not within the application root. Expected outcome: identify any DLL sideloading events. 3. (Incident responder) Enable .NET ETW collection on critical servers using PowerShell: New-EtwTraceSession -Name 'DotNetRuntime' -ProviderGuid '{e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}'. Monitor for AppDomain creation and unloading events. Expected outcome: detect module execution that evades process-level monitoring. 4. (Vendor manager) Contact your RMM vendor to confirm they provide a hash manifest for update packages. If not, document the gap and plan a replacement within 90 days. Expected outcome: reduced supply chain risk. 5. (CISO) Schedule a tabletop exercise with the specific scenario of a compromised RMM update channel. Test whether your incident response plan includes containment actions for the RMM server itself. Expected outcome: readiness to respond without process delays.

Frequently Asked Questions

How can a signed DLL be malicious if AppLocker trusts it?

AppLocker publisher rules trust any file signed by the specified publisher's certificate. If the attacker obtains or reuses that certificate, or compromises the vendor's signing pipeline, they can sign any payload and AppLocker will allow it. The only reliable mitigation is hash-based allowlisting: maintain a manifest of expected file hashes per software version, and alert on any deviation.

What specific Sysmon configuration captures DLL sideloading by Cavern?

Sysmon Event ID 7 (image loaded) must be filtered to flag when a DLL is loaded from a directory outside the expected application root for the process. For example, if SysAid runs from C:\\Program Files\\SysAid, any LoadLibrary call that loads a DLL from any other path should generate an alert. Without this filter, Event ID 7 is too noisy to operationalize.

Why does NativeAOT prevent analysis compared to standard .NET assemblies?

NativeAOT binaries compile .NET code directly to native machine code and contain no IL metadata, no assembly manifests, and no type definitions. Tools like ILSpy or dnSpy cannot decompile them. Analysis requires WinDbg or IDA Pro, forcing analysts to switch toolsets. The Cavern framework deliberately uses a mix of formats to ensure that no single reverse engineering tool can handle the entire agent.

Related Articles

Your AI Agent Has More Privilege Than the CEO: Why the Executor Is the Only Boundary That Matters

Your AI Agent Has More Privilege Than the CEO: Why the Executor Is the Only Boundary That Matters

Vulnox assessment data shows that in 9 of 11 enterprise agent deployments, the agent runtime had write access to its own identity provider. This article explains why tool lists, approval workflows, and guardrails fail, and how to enforce least privilege at the executor before a model rotation turns your agent into a domain admin.

The SSH Key That Nobody Killed Your Crypto Mining Response

The SSH Key That Nobody Killed Your Crypto Mining Response

This article walks through a real breach where a single unmanaged SSH key let a worm encrypt your network. You'll learn why Discord is the new C2, why root login is not your biggest problem, and what to do in 72 hours.

The Autonomous Agent Insider Crisis: What Your Detection Models Are Missing

The Autonomous Agent Insider Crisis: What Your Detection Models Are Missing

A Trellix survey of 600 CISOs shows 95% of companies report AI agent insider incidents. Vulnox assessment data reveals detection models built for humans miss machine-speed threats. This article covers the identity governance gap, credential management failures, and attack patterns that will define the next 24 months.

Ready to Secure Your Digital Assets?

Get a comprehensive vulnerability assessment for your website today.