Blog
/
/
June 27, 2021

Post-Mortem Analysis of a SQL Server Exploit

Learn about the post-mortem analysis of a SQL Server exploit. Discover key insights and strategies to enhance your cybersecurity defenses.
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
Max Heinemeyer
Global Field CISO
Default blog imageDefault blog imageDefault blog imageDefault blog imageDefault blog imageDefault blog image
27
Jun 2021

While SaaS and IoT devices are increasingly popular vectors of intrusion, server-side attacks remain a serious threat to organizations worldwide. With sophisticated vulnerability scanning tools, attackers can now pinpoint security flaws in seconds, finding points of entry across the attack surface. Human security teams often struggle to keep pace with the constant wave of newly documented vulnerabilities and patches.

Darktrace recently stopped a targeted cyber-attack by an unknown attacker. After the initial entry, the attacker exploited an unpatched vulnerability (CVE-2020-0618), granting a low-privileged credential the ability to remotely execute code. This enabled the attacker to spread laterally and eventually establish a foothold in the system by creating a new user account.

The server-side attack cycle: authenticates user; scans network; infects three servers; downloads malware; c2 traffic; creates new user.

Figure 1: Overview of the server-side attack cycle.

This blog breaks down the intrusion and explores how Darktrace’s Autonomous Response technology took three surgical actions to halt the attacker’s movements.

Unknown threat actors exploit a vulnerability

Initial compromise

At a financial firm in Canada with around 3,000 devices, Cyber AI detected the use of a new credential, ‘parents’. The attacker used this credential to access the company’s internal environment through the VPN. From there, the credential authenticated to a desktop using NT LAN Manager (NTLM). No further suspicious activity was observed.

NTLM is a popular attack vector for cyber-criminals as it is vulnerable to multiple methods of compromise, including brute-force and ‘pass the hash’. The initial access to the credential could have been obtained via phishing before Darktrace had been deployed.

Figure 2: The credential was first observed on the device five days prior to reconnaissance. The attacker performed reconnaissance and lateral movement for two days, until the compromised devices were taken down.

Internal reconnaissance

Five days later, the ‘parents’ credential was seen logging onto the desktop. The desktop began scanning the network – over 80 internal IPs – on Port 443 and 445.

Shortly after the scan, the device used Nmap to attempt to establish SMBv1 sessions to 139 internal IPs, using guest / user credentials. 79 out of the 278 sessions were successful, all using the login.

Figure 3: New failed internal connections performed by an initially infected desktop, in a similar incident. The graph highlights a surge in failed internal connections and model breaches.

The network scan was the first stage after intrusion, enabling the attacker to find out which services were running, before looking for unpatched vulnerabilities.

Nmap has multiple built-in functionalities which are often exploited for reconnaissance and lateral movement. In this case, it was being used to establish the SMBv1 sessions to the domain controller, saving the attacker from having to initiate SMBv1 sessions with each destination one by one. SMBv1 has well-known vulnerabilities and best practice is to disable it where possible.

Lateral movement

The desktop began controlling services (svcctl endpoint) on a SQL server. It was observed both creating and starting services (CreateServiceW, StartServiceW).

The desktop then initiated an unencrypted HTTP connection to a SQL Reporting server. This was the first HTTP connection between the two devices and the first time the user agent had been seen on the device.

A packet capture of the connection reveals a POST that is seen in an exploit of CVE-2020-0613. This vulnerability is a deserialization issue, whereby the server mishandles carefully crafted page requests and allows low-privileged accounts to establish a reverse shell and remotely execute code on the server.

Figure 4: A partial PCAP of the HTTP connection. The traffic matches the CVE-2020-0618 exploit, which enables Remote Code Execution (RCE) in SQL Server Reporting Services (SSRS).

Most movements were seen in East-West traffic, with readily-available remote procedure call (RPC) methods. Such connections are abundant in systems. Without learning an organization’s ‘pattern of life’, it would have been near-impossible to highlight the malicious connections.

Cyber AI detected connections to the svcctl endpoint, via the DCE-RPC endpoint. This is called the 'service control' endpoint and is used to remotely control running processes on a device.

During the lateral movement from the desktop, the HTTP POST request revealed that the desktop was exploiting CVE-2020-0613. The attacker had managed to find and exploit an existing vulnerability which hadn’t been patched.

Darktrace was the only tool which alerted to the HTTP connection, revealing this underlying (and concluding) exploit. The AI determined that the user agent was unusual for the device and for the wider organization, and that the connection was highly anomalous. This connection would have gone otherwise amiss, since HTTP connections are common in most digital environments.

Because the attacker on the desktop used readily-available tools and protocols, such as Nmap, DCE-RPC, and HTTP, the device went undetected by all the other cyber defenses. However, Cyber AI noticed multiple scanning and lateral movement anomalies – triggering high-fidelity detections which would have been alerted to with Proactive Threat Notifications.

Command and control (C2) communication

The next day, the attacker connected to an SNMP server from the VPN. The connection used the ‘parents’ RDP cookie.

Immediately after the RDP connection began, the server connected to Pastebin and downloaded small amounts of encrypted data. Pastebin was likely being used as a vector to drop malicious scripts onto the device.

The SNMP server then started controlling services (svcttl) on the SQL server: again, creating and starting services.

Following this, both the SQL server and the SNMP server made a high volume of SSL connections to a rare external domain. One upload to the destination was around 21 MB, but otherwise the connections were mostly the same packet size. This, among other factors, indicated that the destination was being used as a C2 server.

Figure 5: Example Cyber AI Analyst investigation into beaconing activity by a SQL server.

With just one compromised credential, the attacker was now connecting to the VPN and infecting multiple servers on the company’s internal network.

The attacker dropped scripts onto the host using Pastebin. Darktrace alerted on this because Pastebin is highly rare for the organization. In fact, these connections were the first time it had been seen. Most security tools would miss this, as Pastebin is a legitimate site and would not be blocked by open-source intelligence (OSINT).

Even if a lesser-known Pastebin alternative had been used – say, in an environment where Pastebin was blocked on the firewall but the alternative not — Darktrace would have picked up on it in exactly the same way.

The C2 beaconing endpoint – dropbox16[.]com – has no OSINT information available online. The connections were on Port 443 and nothing about them was notable except from their rarity on the company’s system. Darktrace sent alerts because of its high rarity, rather than relying on known signatures.

Achieve persistence

After another Pastebin pull, the attacker attempted to maintain a greater foothold and escalate privileges by creating a new user using the SamrCreateUser2InDomain operation (endpoint: samr).

To establish persistence, the attacker now created a new user through a specific DCE-RPC command to the domain controller. This was highly unusual activity for the device, and was given a 100% anomaly score for ‘New or Uncommon Occurrence’.

If Darktrace had not alerted on this activity, the attacker would have continued to access files and make further inroads in the company, extracting sensitive data and potentially installing ransomware. This could have led to sensitive data loss, reputational damage, and financial losses for the company.

The value of Autonomous Response

The organization had Antigena in passive mode, so although it was not able to respond autonomously, we have visibility into the actions that it would have taken.

Antigena would have taken three actions on the initially infected desktop, as shown in the table below. The actions would have taken effect immediately in response to the first scan and the first service control requests.

During the two days of reconnaissance and lateral movement activity, these were the only steps Antigena suggested. The steps were all directly relevant to the intrusion – there was no attempt to block anything unrelated to the attack, and no other Antigena actions were triggered during this period.

By surgically blocking connections on specific ports during the scanning activity and enforcing the ‘pattern of life’ on the infected desktop, Antigena would have paralyzed the attacker’s reconnaissance efforts.

Furthermore, unusual service control attempts performed by the device would have been halted, minimizing the damage to the targeted destination.

Antigena would have delivered these blocks directly or via whatever integration was most suitable for the customer, such as firewall integrations or NAC integrations.

Lessons learned

The threat story above demonstrates the importance of controlling the access granted to low-privileged credentials, as well as remaining up-to-date with security patches. Since such attacks take advantage of existing network infrastructure, it is extremely difficult to detect these anomalous connections without the use of AI.

There was a delay of several days between the initial use of the ‘parents’ credentials and the first signs of lateral movement. This dormancy period – between compromise and the start of internal activities – is commonly seen in attacks. It likely indicates that the attacker was checking initially if their access worked, and then re-visiting the victim for further compromise once their schedule allowed for it.

Stopping a server-side attack

This compromise is reflective of many real-life intrusions: attacks cannot be easily attributed and are often conducted by sophisticated, unidentified threat actors.

Nevertheless, Darktrace managed to detect each stage of the attack cycle: initial compromise, reconnaissance, lateral movement, established foothold, and privilege escalation, and had Antigena been in active mode, it would have blocked these connections, and even prevented the initial desktop from ever exploiting the SQL vulnerability, which allowed the attacker to execute code remotely.

One day later, after seeing the power of Autonomous Response, the company decided to deploy Antigena in active mode.

Thanks to Darktrace analyst Isabel Finn for her insights on the above threat find.

Darktrace model detections:

  • Device / Anomalous Nmap SMB Activity
  • Device / Network Scan - Low Anomaly Score
  • Device / Network Scan
  • Device / ICMP Address Scan
  • Device / Suspicious Network Scan Activity
  • Anomalous Connection / New or Uncommon Service Control
  • Device / Multiple Lateral Movement Model Breaches
  • Device / New User Agent To Internal Server
  • Compliance / Pastebin
  • Device / Repeated Unknown RPC Service Bind Errors
  • Anomalous Server Activity / Rare External from Server
  • Compromise / Unusual Connections to Rare Lets Encrypt
  • User / Anomalous Domain User Creation Or Addition To Group


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
Max Heinemeyer
Global Field CISO

More in this series

No items found.

Blog

/

Network

/

March 10, 2026

NetSupport RAT: How Legitimate Tools Can Be as Damaging as Malware

NetSupport RAT: How Legitimate Tools Can Be as Damaging as MalwareDefault blog imageDefault blog image

What is NetSupport Manager?

NetSupport Manager is a legitimate IT tool used by system administrators for remote support, monitoring, and management. In use since 1989, NetSupport Manager enables users to remotely access and navigate systems across different platforms and operating systems [1].

What is NetSupport RAT?

Although NetSupport Manager is a legitimate tool that can be used by IT and security professionals, there has been a rising number of cases in which it is abused to gain unauthorized access to victim systems. This misuse has become so prevalent that, in recent years, security researchers have begun referring to NetSupport as a Remote Access Trojan (RAT), a term typically used for malware that enables a threat actor to remotely access or control an infected device [2][3][4].

NetSupport RAT activity summary

The initial stages of NetSupport RAT infection may vary depending on the source of the initial compromise. Using tactics such as the social engineering tactic ClickFix, threat actors attempt to trick users into inadvertently executing malicious PowerShell commands under the guise of resolving a non-existent issue or completing a fake CAPTCHA verification [5]. Other attack vectors such as phishing emails, fake browser updates, malicious websites, search engine optimization (SEO) poisoning, malvertising and drive-by downloads are also employed to direct users to fraudulent pages and fake reCAPTCHA verification checks, ultimately inducing them to execute malicious PowerShell commands [5][6][7]. This leads to the successful installation of NetSupport Manager on the compromised device, which is often placed in non-standard directories such as AppData, ProgramData, or Downloads [3][8].

Once installed, the adversary is able to gain remote access to the affected machine, monitor user activity, exfiltrate data, communicate with the command-and-control (C2) server, and maintain persistence [5]. External research has also highlighted that post-exploitation of NetSupport RAT has involved the additional download of malicious payloads [2][5].

Attack flow diagram highlighting key events across each phase of the attack phase
Figure 1: Attack flow diagram highlighting key events across each phase of the attack phase [2][5].

Darktrace coverage

In November of 2025, suspicious behavior indicative of the malicious abuse of NetSupport Manager was observed on multiple customers across Europe, the Middle East, and Africa (EMEA) and the Americas (AMS).

While open-source intelligence (OSINT) has reported that, in a recent campaign, a threat actor impersonated government entities to trick users in organizations in the Information Technology, Government and Financial Services sectors in Central Asia into downloading NetSupport Manager [8], approximately a third of Darktrace’s affected customers in November were based in the US while the rest were based in EMEA. This contrast underscores how widely NetSupport Manager is leveraged by threat actors and highlights its accessibility as an initial access tool.  

The Darktrace customers affected were in sectors including Information and Communication, Manufacturing and Arts, entertainment and recreation.

The ClickFix social engineering tactic typically used to distribute the NetSupport RAT is known to target multiple industries, including Technology, Manufacturing and Energy sectors [9]. It also reflects activity observed in the campaign targeting Central Asia, where the Information Technology sector was among those affected [8].

The prevalence of affected Education customers highlights NetSupport’s marketing focus on the Education sector [10]. This suggests that threat actors are also aware of this marketing strategy and have exploited the trust it creates to deploy NetSupport Manager and gain access to their targets’ systems. While the execution of the PowerShell commands that led to the installation of NetSupport Manager falls outside of Darktrace's purview in cases identified, Darktrace was still able to identify a pattern of devices making connections to multiple rare external domains and IP addresses associated with the NetSupport RAT, using a wide range of ports over the HTTP protocol. A full list of associated domains and IP addresses is provided in the Appendices of this blog.

Although OSINT identifies multiple malicious domains and IP addresses as used as C2 servers, signature-based detections of NetSupport RAT indicators of compromise (IoCs) may miss broader activity, as new malicious websites linked to the RAT continue to appear.

Darktrace’s anomaly‑based approach allows it to establish a normal ‘pattern of life’ for each device on a network and identify when behavior deviates from this baseline, enabling the detection of unusual activity even when it does not match known IoCs or tactics, techniques and procedures (TTPs).

In one customer environment in late 2025, Darktrace / NETWORK detected a device initiating new connections to the rare external endpoint, thetavaluemetrics[.]com (74.91.125[.]57), along with the use of a previously unseen user agent, which it recognized as highly unusual for the network.

Darktrace’s detection of HTTP POST requests to a suspicious URI and new user agent usage.
Figure 2: Darktrace’s detection of HTTP POST requests to a suspicious URI and new user agent usage.

Darktrace identified that user agent present in connections to this endpoint was the ‘NetSupport Manager/1.3’, initially suggesting legitimate NetSupport Manager activity. Subsequent investigation, however, revealed that the endpoint was in fact a malicious NetSupportRAT C2 endpoint [12]. Shortly after, Darktrace detected the same device performing HTTP POST requests to the URI fakeurl[.]htm. This pattern of activity is consistent with OSINT reporting that details communication between compromised devices and NetSupport Connectivity Gateways functioning as C2 servers [11].

Conclusion

As seen not only with NetSupport Manager but with any legitimate or open‑source software used by IT and security professionals, the legitimacy of a tool does not prevent it from being abused by threat actors. Open‑source software, especially tools with free or trial versions such as NetSupport Manager, remains readily accessible for malicious use, including network compromise. In an age where remote work is still prevalent, validating any anomalous use of software and remote management tools is essential to reducing opportunities for unauthorized access.

Darktrace’s anomaly‑based detection enables security teams to identify malicious use of legitimate tools, even when clear signatures or indicators of compromise are absent, helping to prevent further impact on a network.


Credit to George Kim (Analyst Consulting Lead – AMS), Anna Gilbertson (Senior Cyber Analyst)

Edited by Ryan Traill (Analyst Content Lead)

Appendices

Darktrace Model Alerts

·       Compromise / Suspicious HTTP and Anomalous Activity

·       Compromise / New User Agent and POST

·       Device / New User Agent

·       Anomalous Connection / New User Agent to IP Without Hostname

·       Anomalous Connection / Posting HTTP to IP Without Hostname

·       Anomalous Connection / Multiple Failed Connections to Rare Endpoint

·       Anomalous Connection / Application Protocol on Uncommon Port

·       Anomalous Connection / Multiple HTTP POSTs to Rare Hostname

·       Compromise / Beaconing Activity To External Rare

·       Compromise / HTTP Beaconing to Rare Destination

·       Compromise / Agent Beacon (Medium Period)

·       Compromise / Agent Beacon (Long Period)

·       Compromise / Quick and Regular Windows HTTP Beaconing

·       Compromise / Sustained TCP Beaconing Activity To Rare Endpoint

·       Compromise / POST and Beacon to Rare External

Indicators of Compromise (IoCs)

Indicator           Type     Description

/fakeurl.htm URI            NetSupportRAT C2 URI

thetavaluemetrics[.]com        Connection hostname              NetSupportRAT C2 Endpoint

westford-systems[.]icu            Connection hostname              NetSupportRAT C2 Endpoint

holonisz[.]com                Connection hostname              NetSupportRAT C2 Endpoint

heaveydutyl[.]com      Connection hostname              NetSupportRAT C2 Endpoint

nsgatetest1[.]digital   Connection hostname              NetSupportRAT C2 Endpoint

finalnovel[.]com            Connection hostname              NetSupportRAT C2 Endpoint

217.91.235[.]17              IP             NetSupportRAT C2 Endpoint

45.94.47[.]224                 IP             NetSupportRAT C2 Endpoint

74.91.125[.]57                 IP             NetSupportRAT C2 Endpoint

88.214.27[.]48                 IP             NetSupportRAT C2 Endpoint

104.21.40[.]75                 IP             NetSupportRAT C2 Endpoint

38.146.28[.]242              IP             NetSupportRAT C2 Endpoint

185.39.19[.]233              IP             NetSupportRAT C2 Endpoint

45.88.79[.]237                 IP             NetSupportRAT C2 Endpoint

141.98.11[.]224              IP             NetSupportRAT C2 Endpoint

88.214.27[.]166              IP             NetSupportRAT C2 Endpoint

107.158.128[.]84          IP             NetSupportRAT C2 Endpoint

87.120.93[.]98                 IP             Rhadamanthys C2 Endpoint

References

1.         https://mspalliance.com/netsupport-debuts-netsupport-24-7/

2.         https://blogs.vmware.com/security/2023/11/netsupport-rat-the-rat-king-returns.html

3.          https://redcanary.com/threat-detection-report/threats/netsupport-manager/

4.         https://www.elastic.co/guide/en/security/8.19/netsupport-manager-execution-from-an-unusual-path.html

5.          https://rewterz.com/threat-advisory/netsupport-rat-delivered-through-spoofed-verification-pages-active-iocs

6.           https://thehackernews.com/2025/11/new-evalusion-clickfix-campaign.html

7.         https://corelight.com/blog/detecting-netsupport-manager-abuse

8.         https://thehackernews.com/2025/11/bloody-wolf-expands-java-based.html

9.         https://unit42.paloaltonetworks.com/preventing-clickfix-attack-vector/

10.  https://www.netsupportsoftware.com/education-solutions/

11.  https://www.esentire.com/blog/unpacking-netsupport-rat-loaders-delivered-via-clickfix

  1. https://threatfox.abuse.ch/browse/malware/win.netsupportmanager_rat/
  2. https://www.virustotal.com/gui/url/5fe6936a69c786c9ded9f31ed1242c601cd64e1d90cecd8a7bb03182c47906c2

Continue reading
About the author
George Kim
Analyst Consulting Lead – AMS

Blog

/

/

March 5, 2026

Inside Cloud Compromise: Investigating Attacker Activity with Darktrace / Forensic Acquisition & Investigation

Forensic Acquisition and investigationDefault blog imageDefault blog image

Investigating cloud attacks with Darktrace/ Forensic Acquisition & Investigation

Darktrace / Forensic Acquisition & Investigation™ is the industry’s first truly automated forensic solution purpose-built for the cloud. This blog will demonstrate how an investigation can be carried out against a compromised cloud server in minutes, rather than hours or days.

The compromised server investigated in this case originates from Darktrace’s Cloudypots system, a global honeypot network designed to observe adversary activity in real time across a wide range of cloud services. Whenever an attacker successfully compromises one of these honeypots, a forensic copy of the virtual server's disk is preserved for later analysis. Using Forensic Acquisition & Investigation, analysts can then investigate further and obtain detailed insights into the compromise including complete attacker timelines and root cause analysis.

Forensic Acquisition & Investigation supports importing artifacts from a variety of sources, including EC2 instances, ECS, S3 buckets, and more. The Cloudypots system produces a raw disk image whenever an attack is detected and stores it in an S3 bucket. This allows the image to be directly imported into Forensic Acquisition & Investigation using the S3 bucket import option.

As Forensic Acquisition & Investigation runs cloud-natively, no additional configuration is required to add a specific S3 bucket. Analysts can browse and acquire forensic assets from any bucket that the configured IAM role is permitted to access. Operators can also add additional IAM credentials, including those from other cloud providers, to extend access across multiple cloud accounts and environments.

Figure 1: Forensic Acquisition & Investigation import screen.

Forensic Acquisition & Investigation then retrieves a copy of the file and automatically begins running the analysis pipeline on the artifact. This pipeline performs a full forensic analysis of the disk and builds a timeline of the activity that took place on the compromised asset. By leveraging Forensic Acquisition & Investigation’s cloud-native analysis system, this process condenses hour of manual work into just minutes.

Successful import of a forensic artifact and initiation of the analysis pipeline.
Figure 2: Successful import of a forensic artifact and initiation of the analysis pipeline.

Once processing is complete, the preserved artifact is visible in the Evidence tab, along with a summary of key information obtained during analysis, such as the compromised asset’s hostname, operating system, cloud provider, and key event count.

The Evidence overview showing the acquired disk image.
Figure 3: The Evidence overview showing the acquired disk image.

Clicking on the “Key events” field in the listing opens the timeline view, automatically filtered to show system- generated alarms.

The timeline provides a chronological record of every event that occurred on the system, derived from multiple sources, including:

  • Parsed log files such as the systemd journal, audit logs, application specific logs, and others.
  • Parsed history files such as .bash_history, allowing executed commands to be shown on the timeline.
  • File-specific events, such as files being created, accessed, modified, or executables being run, etc.

This approach allows timestamped information and events from multiple sources to be aggregated and parsed into a single, concise view, greatly simplifying the data review process.

Alarms are created for specific timeline events that match either a built-in system rule, curated by Darktrace’s Threat Research team or an operator-defined rule  created at the project level. These alarms help quickly filter out noise and highlight on events of interest, such as the creation of a file containing known malware, access to sensitive files like Amazon Web Service (AWS) credentials, suspicious arguments or commands, and more.

 The timeline view filtered to alarm_severity: “1” OR alarm_severity: “3”, showing only events that matched an alarm rule.
Figure 4: The timeline view filtered to alarm_severity: “1” OR alarm_severity: “3”, showing only events that matched an alarm rule.

In this case, several alarms were generated for suspicious Base64 arguments being passed to Selenium. Examining the event data, it appears the attacker spawned a Selenium Grid session with the following payload:

"request.payload": "[Capabilities {browserName: chrome, goog:chromeOptions: {args: [-cimport base64;exec(base64...], binary: /usr/bin/python3, extensions: []}, pageLoadStrategy: normal}]"

This is a common attack vector for Selenium Grid. The chromeOptions object is intended to specify arguments for how Google Chrome should be launched; however, in this case the attacker has abused the binary field to execute the Python3 binary instead of Chrome. Combined with the option to specify command-line arguments, the attacker can use Python3’s -c option to execute arbitrary Python code, in this instance, decoding and executing a Base64 payload.

Selenium’s logs truncate the Arguments field automatically, so an alternate method is required to retrieve the full payload. To do this, the search bar can be used to find all events that occurred around the same time as this flagged event.

Pivoting off the previous event by filtering the timeline to events within the same window using timestamp: [“2026-02-18T09:09:00Z” TO “2026-02-18T09:12:00Z”].
Figure 5: Pivoting off the previous event by filtering the timeline to events within the same window using timestamp: [“2026-02-18T09:09:00Z” TO “2026-02-18T09:12:00Z”].

Scrolling through the search results, an entry from Java’s systemd journal can be identified. This log contains the full, unaltered payload. GCHQ’s CyberChef can then be used to decode the Base64 data into the attacker’s script, which will ultimately be executed.

Decoding the attacker’s payload in CyberChef.
Figure 6: Decoding the attacker’s payload in CyberChef.

In this instance, the malware was identified as a variant of a campaign that has been previously documented in depth by Darktrace.

Investigating Perfctl Malware

This campaign deploys a malware sample known as ‘perfctl to the compromised host. The script executed by the attacker downloads a Go binary named “promocioni.php” from 200[.]4.115.1. Its functionality is consistent with previously documented perfctl samples, with only minor changes such as updated filenames and a new command-and-control (C2) domain.

Perfctl is a stealthy malware that has several systems designed  to evade detection. The main binary is packed with UPX, with the header intentionally tampered with to prevent unpacking using regular tools. The binary also avoids executing any malicious code if it detects debugging or tracing activity, or if artifacts left by earlier stages are missing.

To further aid its evasive capabilities, perfctl features a usermode rootkit using an LD preload. This causes dynamically linked executables to load perfctl’s rootkit payload before other system modules, allowing it to override functions, such as intercepting calls to list files and hiding output from the returned list. Perfctl uses this to hide its own files, as well as other files like the ld.so.preload file, preventing users from identifying that a rootkit is present in the first place.

This also makes it difficult to dynamically analyze, as even analysts aware of the rootkit will struggle to get around it due to its aggressiveness in hiding its components. A useful trick is to use the busybox-static utilities, which are statically linked and therefore immune to LD preloading.

Perfctl will attempt to use sudo to escalate its permissions to root if the user it was executed as has the required privileges. Failing this, it will attempt to exploit the vulnerability CVE-2021-4034.

Ultimately, perfctl will attempt to establish a C2 link via Tor and spawn an XMRig miner to mine the Monero cryptocurrency. The traffic to the mining pool is encapsulated within Tor to limit network detection of the mining traffic.

Darktrace’s Cloudypots system has observed 1,959 infections of the perfctl campaign across its honeypot network in the past year, making it one of the most aggressive campaigns seen by Darktrace.

Key takeaways

This blog has shown how Darktrace / Forensic Acquisition & Investigation equips defenders in the face of a real-world attacker campaign. By using this solution, organizations can acquire forensic evidence and investigate intrusions across multiple cloud resources and providers, enabling defenders to see the full picture of an intrusion on day one. Forensic Acquisition & Investigation’s patented data-processing system takes advantage of the cloud’s scale to rapidly process large amounts of data, allowing triage to take minutes, not hours.

Darktrace / Forensic Acquisition & Investigation is available as Software-as-a-Service (SaaS) but can also be deployed on-premises as a virtual application or natively in the cloud, providing flexibility between convenience and data sovereignty to suit any use case.

Support for acquiring traditional compute instances like EC2, as well as more exotic and newly targeted platforms such as ECS and Lambda, ensures that attacks taking advantage of Living-off-the-Cloud (LOTC) strategies can be triaged quickly and easily as part of incident response. As attackers continue to develop new techniques, the ability to investigate how they use cloud services to persist and pivot throughout an environment is just as important to triage as a single compromised EC2 instance.

Credit to Nathaniel Bill (Malware Research Engineer)

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