Detecting Metamorphic Malware with Darktrace's AI Technology
Detect metamorphic malware with Darktrace's AI. Learn how it uncovers self-modifying cyber-attacks and stops threats that evade traditional security measures.
Darktrace cyber analysts are world-class experts in threat intelligence, threat hunting and incident response, and provide 24/7 SOC support to thousands of Darktrace customers around the globe. Inside the SOC is exclusively authored by these experts, providing analysis of cyber incidents and threat trends, based on real-world experience in the field.
Written by
Justin Fier
SVP, Red Team Operations
Share
31
Jul 2017
Some of the most insidious threats that Darktrace finds use self-modifying technology to hide their presence on the network. These attacks can dynamically change their threat signatures, automatically extract data, and spread without a human controller.
Recently, we discovered anomalous activity on the network of a major US university. After investigation, we found that the anomaly was the ‘Smoke Malware Loader’ which employs numerous techniques to evade internal security. Most notably, the malware generates fake traffic to hide its presence.
Darktrace observed the initial infection when three anomalous executables were transferred over plain text. The malware did not match any known threat signatures, allowing it to bypass the network’s perimeter controls.
C1ulyq1wLrMBs6LG00 on Thu Sep 8, 13:19:01 Co2eAJ2GifEkWut700 on Thu Sep 8, 12:09:52 CdcZeu200UOsuf5u00 on Wed Sep 14, 16:38:44
The connections originated from a suspicious external domain that the company had never communicated with before:
lago666[.]com (91.243.193.149)
Both the anomalous download and the beaconing activity represented major deviations from the unique ‘pattern of life’ learned by the Enterprise Immune System.
Although the payload circumvented the network’s perimeter security, the company also had an alternate security system monitoring network flow. This tool raised an alert when the download occurred, but it was deemed a ‘false positive’ because the malware proceeded to install new, previously unknown versions of the executable to the Windows registry.
After the self-modifying modules were uploaded to the company device, a large number of HTTP POST requests were sent against /smk/log.php to the following domains:
The malware attempted to transfer data to these external destinations, but to hide its tracks, the remote machine replied with a fake 404 error code. These connections were deemed highly anomalous by Darktrace’s AI algorithms.
Since the payload was designed to be compatible with the password grabber module2 – which is often deployed side-by-side with Smoke Malware Loader – the data attempting to leave the network likely contained user credentials and passwords.
In conjunction with the initial transfer, another anomalous file was then delivered to a different device. This activity indicated that the threat actor was likely attempting to move laterally across the network:
hxxp://cdn.che[.]moe/izgmcx.exe (connection UID: CGH6uV3G5tdKSNY800) to 10.1.105.117 on Mon Sep 12 at 08:02:03.
Darktrace detected each anomaly in real time as the situation developed. By using AI algorithms to continuously learn normal behavior, Darktrace was able to monitor the malware’s changing threat signature.
Traditional security tools – no matter how advanced – are incapable of detecting such sophisticated threats. Legacy controls rely on rules and signatures, and these threats are specifically designed to bypass rules and signatures.
Darktrace’s real-time threat detection allowed the university’s security team to quarantine the infected devices before the malware could burrow deeper into the network, and before the attacker could use the passwords to further compromise the network. Darktrace then assisted the security team as they remediated the situation and changed their security protocols and passwords.
Darktrace cyber analysts are world-class experts in threat intelligence, threat hunting and incident response, and provide 24/7 SOC support to thousands of Darktrace customers around the globe. Inside the SOC is exclusively authored by these experts, providing analysis of cyber incidents and threat trends, based on real-world experience in the field.
Security After Signatures: Operating in a World of Pre‑CVE Disclosure Exploitation, Collapsed Trust Boundaries, and Autonomous Systems
Three shifts have reshaped what it means to defend an enterprise securely.
First, exploitation often begins before defenders have a Common Vulnerabilities and Exposures (CVE) identifier, a security advisory, or an entry in the Cybersecurity and Infrastructure Security Agency's (CISA) Known Exploited Vulnerabilities (KEV) catalog.
Secondly, the trust boundary has moved beyond the network edge into identities, tokens, APIs, and Software-as-a-Service (SaaS) workflows.
Third, an increasing share of business activity is executed through automation, integrations, and AI agent-like systems that can act faster than teams can verify intent.
If your security model still relies on detecting known bad artefacts, triaging isolated alerts, and waiting for confirmation before acting, you are already behind the threat.
This is not a failure of security teams; it’s a failure of the operating model to keep pace with how the environment has changed.
A SOC built around alerts and signatures assumes that malicious activity will eventually surface as an event. In real incidents, however, the decisive evidence is rarely a single event. Instead, it is a chain of individually explainable actions that only appears malicious once you connect the dots across identity, non-human identity, cloud, email, SaaS, operational technology (OT), and network telemetry.
The defenders succeeding today observe behaviors, link them into sequences, understand what those sequences mean, and contain impact before the full story unfolds. That is the operating model the current threat environment demands.
In one example, Darktrace observed a sequence of subtle but strategically significant anomalies within a customer environment that later aligned with exploitation of CVE‑2025‑0994 in Trimble Cityworks by likely Chinese-nexus threat actors. Behavioral indicators were visible at least 18 days before public disclosure, with related anomalies emerging 40 to 50 days earlier during the intrusion window.
This case illustrates a familiar pattern: clusters of weak‑signal anomalies combing to form an actionable picture of intrusion long before a CVE is published. Such activity reflects long‑horizon, option‑preserving operator models often associated with mature state‑linked activity.
Figure 1: Darktrace’s detection of malicious exploitation of CVE 2025-0994, later tied to Chinese-nexus threat actors targeting critical national infrastructure (CNI) in the US, weeks before public disclosure.
Throughout 2025 and 2026, Darktrace has continued to observe the value of anomaly-based detections across a range of incidents.
CVE
CVE public disclosure date
Darktrace detection date
Days between detection of exploitation and CVE public disclosure
CVE-2025-0994Trimble Cityworks
2025-02-06
2025-01-19
18 days
CVE-2025-24183Apache
2025-03-10
2025-02-18
20 days
CVE-2025-10035Fortra GoAnywhere
2025-09-18
2025-09-11
7 days
CVE-2026-0257PAN-OS
2026-05-13
—
—
Identity is the real control plane
The second shift is that identity has replaced perimeter as the primary control plane. As Darktrace’s Annual Threat Report 2026 illustrated, identity remains the main challenge in defending against modern intrusions. A clear example is the Adversary-in-the-Middle (AiTM) case published by Darktrace in December 2025. A phishing email led to the compromise of an Office 365 account. Session hijacking bypassed multi-factor authentication (MFA), and the compromised account was used for follow-on phishing and persistence activities including the creation of malicious email rules.
Every step in that sequence mattered. A successful login alone does not prove legitimacy. An inbox rule, on its own, may not appear catastrophic. Mail activity, viewed in isolation, may seem operationally normal. But the behavioral chain tells a different story: credential theft, token abuse, persistence, and onward compromise through a trusted identity.
This is why the question is no longer “Did the user authenticate successfully”. The more important question is, “Does this identity action make sense right now, in this context, given what came before it?” The AiTM case shows how identity can be compromised. In practice, however, attacks rarely remained confined to identity alone.
In another Darktrace case, a compromised SaaS account triggered activity across the email, SaaS, and network layers, including inbox rule changes, phishing propagation, and connections to suspicious infrastructure. Viewed in isolation, none of these events were decisive. Together, however, they formed a behavioral sequence that revealed the intrusion, with the full attack story automatically correlated and surfaced to defenders by Darktrace’s Cyber AI Analyst.
Figure 2: Cyber AI Analyst correlated and appended additional events to the incident, including other users who connected to the suspicious redirect link after outbound phishing emails were sent.
AI accelerates the threat
The third shift is the one many teams still underestimate: trusted tooling, integrations, and AI agent-like systems can create actions that appear legitimate but are strategically dangerous.
The shift becomes clearer when examining how governments are now framing AI risk. In 2026, guidance published by CISA, UK’s National Cyber Security Centre (NCSC) and Five Eyes partners warned that agentic systems expand attack surfaces, accumulate privilege, and can behave in ways that are difficult to predict or explain [1]. The advice is simple: assume unexpected behavior and design controls around it.
The real risk is not AI usage. It is unknown autonomy: systems with credentials, data access, and action paths that can execute workflow steps without sufficient behavioral validation, traceability, or human oversight. Darktrace’s Model Context Protocol (MCP) risk analysis provides a useful framework for understanding this challenge. Over-privileged agents, content injection, and tool abuse become high-consequence risks when connected systems can dynamically retrieve data, execute actions, and communicate externally.
Whether security teams like it or not, AI is already in the enterprise. It will help drive innovation, but it will also be abused, whether accidentally or maliciously. In each of the cases below, AI either scaled the attacker, built the tooling, or existed within the environment as something to exploit or misuse.
1. AI as an Attack Multiplier
In one campaign targeting Mexican government entities, a single operator used commercial AI platforms to generate exploits, automate reconnaissance, and process large volumes of data, compressing work that would traditionally have required an entire team into a single workflow [2].
Attempted AI exploitation is now appearing within customer environments. In one case involving an automation technology manufacturer, a compromised LLM proxy was seemingly used as a stepping stone to access additional AI services. When that attempt failed, the attacker pivoted to cryptomining.
What is clear is that the AI layer has already become an asset worth probing, exploiting, and pivoting through. It is also clear that defenders benefit from rapidly understanding how these activities connect. In this case, Cyber AI Analyst automatically pieced together the intrusion, while Darktrace’s Managed Threat Detection service alerted to the customer, enabling the activity to be contained before it could progress further.
Figure 3: Cyber AI Analyst's investigation into a compromised LLM proxy that was abused for cryptomining activity.
AI as a trusted but dangerous actor
This does not require a cinematic vision of “rogue AI.” The Salesloft incident provides a more grounded example, where AI and automation operate with legitimate access but served malicious intent. In that case, attackers abused compromised OAuth tokens associated with the Drift AI chat agent to export significant volumes of data from Salesforce environments.
The activity resembled legitimate API usage and relied on trusted SaaS integrations rather than malware or other obvious signs of intrusion. That is precisely the challenge. Traditional security controls are good at detecting forced entry, but far less effective when a trusted application integration behaves in a way that is technically permitted yet operationally harmful.
In these scenarios, the security challenge shifts from validating access to validating behavior.
This is what that looks like in practice: AI-linked identities executing legitimate actions that require behavioral validation rather than access validation.
Figure 4: Darktrace / SECURE AI highlights anomalous activity across AI identities, surfacing critical behavior that requires validation and containment.
Early observations from Darktrace / SECURE AI deployments reinforce this reality. Across Darktrace's observed fleet, AI service connections per deployment increased 13% during the first half of 2026, reaching over 16 million connections overall. The typical organisation now interacts with seven different AI providers, evidence that AI is no longer operating at the edges of the enterprise. It is increasingly woven into day-to-day business activity.
The most common risks are not compromised models or advanced AI attacks. Instead, they stem from employees and business functions exposing sensitive information through entirely legitimate-looking interactions. Darktrace has observed repeated submission of personally identifiable information (PII), tax information, identification documents, and medical data into LLM prompts, alongside widespread use of unsanctioned (shadow) AI services and growing AI activity from mobile devices.
For defenders, the challenge is increasingly one of context: understanding when legitimate business use crosses into material risk, while preserving privacy and user trust.
Conclusion
Across all three shifts, the pattern is the same: behavior precedes understanding. Security teams are not losing because adversaries have become invisible. An increasingly outdated security model assumes that malicious activity will reveal itself cleanly and early. It no longer does.
In 2026 and beyond, defenders win by understanding behavioral sequences, continuously validating trust, and acting before certainty becomes hindsight. That is security after signatures. That is security in the AI era.
Credit to: Daniel Levy, Threat Hunting Data Scientist
When AI Infrastructure Becomes Part of the Attack Surface
AI Infrastructure and the Evolving Attack Surface
As organizations deploy generative AI into production environments, a new layer of infrastructure has emerged inside enterprise cloud environments: AI gateways.
What is an AI gateway?
AI gateways are systems that sit between users, applications, and foundation models, often holding privileged cloud permissions and managing access to AI services at scale.
Because of that role, AI gateways are becoming an increasingly important part of the enterprise attack surface. A compromise may provide attackers with access not only to compute resources, but also to cloud identities, model services, sensitive prompts, and other connected systems.
This blog examines how Darktrace investigated a compromised AI gateway connected to Amazon Bedrock services that was subsequently observed communicating with cryptomining infrastructure. Based on its configuration and associated Identity and Access Management (IAM) role, the instance appeared to function as a gateway to Amazon Bedrock-hosted AI services. Following suspected compromise activity, the host was observed communicating repeatedly with known cryptomining infrastructure before subsequently being shut down. Darktrace detected and escalated the activity through its Enhanced Monitoring and Managed Threat Detection services.
While the ultimate impact in this case appeared to be unauthorized cryptomining, the incident is notable because of where it occurred. The compromised asset sat at the intersection of cloud infrastructure, identity, and AI services. Recent research has highlighted how AI gateways such as LiteLLM can become attractive targets due to their ability to centralize credentials, model access, and cloud permissions. Although Darktrace found no evidence linking this activity directly to publicly disclosed LiteLLM vulnerabilities, the incident demonstrates why organizations should treat AI infrastructure as part of their critical attack surface rather than as a standalone application tier [1].
Why cryptomining remains a common cloud post-compromise activity
Cryptomining can be a lucrative post-compromise activity in cloud environments. After gaining access to a cloud asset, attackers may deploy mining software to abuse the victim’s compute resources for financial gain. This type of activity is likely to be opportunistic, targeting exposed services, weak credentials, leaked access keys, vulnerable applications, or misconfigured cloud workloads.
A typical cloud cryptomining intrusion may involve:
Identifying exposed or vulnerable cloud infrastructure
Gaining access through exposed services, credentials, or application weaknesses
Downloading and executing mining software
Establishing repeated outbound connectivity to mining pool infrastructure
Continuing to consume compute resources until the activity is detected and disrupted
The notable element in this case is not the cryptomining alone, but where it occurred: on cloud infrastructure supporting AI-related activity. This shows how assets used to enable AI services can still be exposed to familiar cloud compromise risks.
Investigating a compromised AI gateway connected to Amazon Bedrock
On June 12, 2026, Darktrace observed activity consistent with active cryptomining from an Amazon Web Service (AWS) EC2 instance named LiteLLM-Proxy. The instance appeared to support LiteLLM activity and was associated with an instance profile that had access to Amazon Bedrock resources.
AI gateways are designed to centralize access to large language models, often handling authentication, routing, logging, and policy enforcement for AI applications. From a security perspective, they also aggregate cloud permissions, model access, and application workflows into a single control point. As a result, compromise of an AI gateway can have implications beyond the affected host itself.
While the exact initial access vector could not be confirmed, the activity appears to follow a sequence often seen in compromises of internet-facing systems: brute-forced access, payload delivery, and repeated outbound connectivity to mining pool infrastructure.
Prior to the observed cryptomining activity, the LiteLLM-Proxy EC2 instance appeared to be externally exposed over SSH, with port 22 open to 0.0.0.0/0.
Figure 1: Darktrace’s misconfiguration alert EC2 instance allowing all inbound traffic to SSH port 22.
Prior to the cryptomining activity, Darktrace observed a large volume of inbound connection attempts to the instance over port 22 from external IP addresses, predominantly from 145.241.123[.]102, suggesting brute-force activity [2]. Many of these connections were short-lived, lasting only a few seconds, indicating scanning or failed login attempts.
Figure 2: Darktrace’s detection of unusual incoming connection attempts to the device over port 22.
The available telemetry did not confirm whether any inbound SSH connection resulted in successful authentication, preventing this activity from being confirmed as the initial access vector. However, the combination of public SSH exposure, inbound connections from external IP addresses, and subsequent miner activity suggests that SSH was a plausible access path.
Stage 2: XMRig malware downloaded to the AI gateway
Before the first observed connection to the mining pool, the EC2 instance downloaded 3.42 MB of data over an HTTP connection on port 80 to the external endpoint, 185.62.1[.]8, which appears to host a ZIP file containing XMRig crypto-mining malware [3][4]. As host-level logs were not available, Darktrace could not confirm how the miner was executed or whether the earlier SSH activity directly enabled payload delivery. However, the timing of the download, followed shortly by repeated mining pool connectivity, supported the assessment that the instance had been compromised and was being used for unauthorized compute activity.
Stage 3 – Compromised AI gateway communicates with cryptomining infrastructure
Just a few minutes later, Darktrace observed the LiteLLM-Proxy EC2 instance connecting to the hostname pool.hasvault[.]pro over HTTPs on port 443. Following the initial connection, repeated outbound connectivity to the same hostname was observed. This pattern is consistent with active cryptomining pool communication, where a compromised host communicates with mining infrastructure to receive work and submit results.
This activity triggered the Enhanced Monitoring model “Compromise / High Priority Crypto Currency Mining”, which was escalated to the customer by Darktrace’s SOC. The activity was also summarized by Darktrace’s Cyber AI Analyst, which grouped the relevant events into a single investigation narrative, helping to identify the repeated mining pool connectivity from the affected cloud asset.
Figure 3: Cyber AI Analyst’s investigation of the cryptocurrency mining activity.
The use of HTTPS over port 443 is notable because, when viewed in isolation, this traffic may not appear inherently suspicious. In this case, however, the destination, volume of connections, and lack of similar activity provided the behavioral context needed to identify the communication as suspicious.
Stage 4: Managed Threat Detection identifies active resource abuse
The cryptomining activity was received by Darktrace’s Managed Threat Detection service and reviewed by Darktrace’s SOC. Following review, the activity was escalated to the customer. This escalation provided the customer with timely notification of active resource abuse in the AWS environment.
Stage 5: Suspicious IAM activity suggests possible cloud credential misuse
Separately, on June 13, Darktrace observed suspicious activity originating from an additional IAM user.
Figure 4: Darktrace’s Advanced Search highlighting suspicious activity performed by a second IAM user.
First, the user was observed attempting the “GetSendQuota” event, an action that had not performed by the account within at least the previous three months. Additionally, the source IP address of this command appeared to be 14.176.1[.]47, geolocated in Vietnam, whereas activity for this user had mostly been seen from Amazon IP addresses. Furthermore, the AWS CLI was also observed being used for this activity, which was also unusual for the user. This was detected by the model “IaaS / Unusual Activity / Unusual AWS CLI Activity”.
Figure 5: Darktrace’s detection of the “GetSendQuota” event.
Further suspicious activity was observed from the IAM user using the long-term access key. Notably, failed “InvokeModel” and “ListFoundationModels” commands were detected, suggesting attempted interaction with Amazon Bedrock services, including model enumeration or invocation. While this may suggest relation to the LiteLLM compromise observed the previous day, there is insufficient evidence to conclusively link the two events.
The attempted “CreateUser” command was also notable because the requested username appeared low-meaning, which may indicate an attempt to establish persistence by creating a new account. This activity triggered the model “IaaS / Admin / New AWS User Account Creation”.
Figure 6: Darktrace’s detection of the “CreateUser” event.
Even without a confirmed link between the two incidents, the IAM activity remains significant. It demonstrates the importance of incorporating workload both telemetry and control-plane telemetry into cloud compromise investigations. While the EC2 cryptomining activity indicated compute resource abuse, the IAM activity suggested potential credential compromise or misuse involving long-term access keys, along with attempted cloud service abuse.
Key lessons for securing AI infrastructure
This incident was notable not because of the cryptomining activity itself, but because of where it occurred. The compromised system appeared to function as an AI gateway with access to Amazon Bedrock services, placing it at the intersection of cloud infrastructure, identity, and AI operations. As organizations deploy AI capabilities into production environments, these platforms are becoming part of the same attack surface that adversaries already target through exposed services, credential theft, and cloud misconfigurations.
While the exact intrusion path could not be confirmed, and no definitive link was established between the compromised workload and the suspicious IAM activity observed during the investigation, both events reinforce a broader reality: AI infrastructure must be secured as part of the wider cloud environment rather than treated as a separate technology stack.
In this case, the most obvious sign of compromise was communication with cryptomining infrastructure. The more important lesson is that Darktrace’s behavioral analysis revealed risk surrounding a privileged AI-enabled asset before the full scope of the incident was understood. As AI gateways increasingly concentrate cloud permissions, model access, and application workflows, defenders will need to focus less on individual alerts and more on understanding how behaviors connect across workloads, identities, and services.
Credit to Angel Arribas Lopez (Associate Principal Cyber Analyst), Nathaniel Jones (Field CISO/VP Threat Research), Emma Foulger (Global Threat Ops), and Mark Turner (Security Researcher)
Edited by Ryan Traill (Content Manager)
Appendices
Darktrace Model Detections
· Compromise / High Priority Crypto Currency Mining
· Compromise / Monero Mining
· Device / Internet Facing Device with High Priority Alert