Blog
/

Inside the SOC

/
February 29, 2024

Protecting Against AlphV BlackCat Ransomware

Default blog imageDefault blog imageDefault blog imageDefault blog imageDefault blog imageDefault blog image
29
Feb 2024
Learn how Darktrace AI is combating AlphV BlackCat ransomware, including the details of this ransomware and how to protect yourself from it.

As-a-Service malware trending

Throughout the course of 2023, “as-a-Service” strains of malware remained the most consistently observed threat type to affect Darktrace customers, mirroring their overall prominence across the cyber threat landscape. With this trend expected to continue throughout 2024, organizations and their security teams should be prepared to defend their network against increasingly versatile and tailorable malware-as-a-service (MaaS) and ransomware-as-a-service (RaaS) strains [1].

What is ALPHV ransomware?

The ALPHV ransomware, also known as ‘BlackCat’ or ‘Noberus’, is one example of a RaaS strain that has been prominent across the threat landscape over the last few years.

ALPHV is a ransomware strain coded in the Rust programming language. The ransomware is sold as part of the RaaS economy [2], with samples of the ransomware being provided and sold by a criminal group (the RaaS ‘operator’) to other cybercriminals (the RaaS ‘affiliates’) who then gain entry to organizations' networks with the intention of detonating the ransomware and demanding ransom payments.

ALPHV was likely first used in the wild back in November 2021 [3]. Since then, it has become one of the most prolific ransomware strains, with the Federal Bureau of Investigation (FBI) reporting nearly USD 300 million in ALPHV ransom payments as of September 2023 [4].

In December 2023, the FBI and the US Department of Justice announced a successful disruption campaign against the ALPHV group, which included a takedown of the their data leak site, and the release of a decryption tool for the ransomware strain [5], and in February 2024, the US Department of State announced  a reward of up to USD 10 million for information leading to the identification or location of anyone occupying a key leadership position in the group operating the ALPHV ransomware strain [6].

The disruption campaign against the ransomware group appeared to have been successful, as evidenced by the recent, significant decline in ALPHV attacks, however, it would not be surprising for the group to simply return with new branding, in a similar vein to its apparent predecessors, DarkSide and BlackMatter [7].

How does ALPHV ransomware work?

ALPHV affiliates have been known to employ a variety of methods to progress towards their objective of detonating ALPHV ransomware [4]. In the latter half of 2023, ALPHV affiliates were observed using malicious advertising (i.e, malvertising) to deliver a Python-based backdoor-dropper known as 'Nitrogen' to users' devices [8][12]. These malvertising operations consisted in affiliates setting up malicious search engine adverts for tools such as WinSCP and AnyDesk.

Users' interactions with these adverts led them to sites resembling legitimate software distribution sites. Users' attempts to download software from these spoofed sites resulted in the delivery of a backdoor-dropping malware sample dubbed 'Nitrogen' to their devices. Nitrogen has been observed dropping a variety of command-and-control (C2) implants onto users' devices, including Cobalt Strike Beacon and Sliver C2. ALPHV affiliates often used the backdoor access afforded to them by these C2 implants to conduct reconnaissance and move laterally, in preparation for detonating ALPHV ransomware payloads.

Darktrace Detection of ALPHV Ransomware

During October 2023, Darktrace observed several cases of ALPHV affiliates attempting to infiltrate organizations' networks via the use of malvertising to socially engineer users into downloading and installing Nitrogen from impersonation websites such as 'wireshhark[.]com' and wìnscp[.]net (i.e, xn--wnscp-tsa[.]net).

While the attackers managed to bypass traditional security measures and evade detection by using a device from the customer’s IT team to perform its malicious activity, Darktrace DETECT™ swiftly identified the subtle indicators of compromise (IoCs) in the first instance. This swift detection of ALPHV, along with Cyber AI Analyst™ autonomously investigating the wide array of post-compromise activity, provided the customer with full visibility over the attack enabling them to promptly initiate their remediation and recovery efforts.

Unfortunately, in this incident, Darktrace RESPOND™ was not fully deployed within their environment, hindering its ability to autonomously counter emerging threats. Had RESPOND been fully operational here, it would have effectively contained the attack in its early stages, avoiding the eventual detonation of the ALPHV ransomware.

Figure 1: Timeline of the ALPHV ransomware attack.

In mid-October, a member of the IT team at a US-based Darktrace customer attempted to install the network traffic analysis software, Wireshark, onto their desktop. Due to the customer’s configuration, Darktrace's visibility over this device was limited to its internal traffic, despite this it was still able to identify and alert for a string of suspicious activity conducted by the device.

Initially, Darktrace observed the device making type A DNS requests for 'wiki.wireshark[.]org' immediately before making type A DNS requests for the domain names 'www.googleadservices[.]com', 'allpcsoftware[.]com', and 'wireshhark[.]com' (note the two 'h's). This pattern of activity indicates that the device’s user was redirected to the website, wireshhark[.]com, as a result of the user's interaction with a sponsored Google Search result pointing to allpcsoftware[.]com.

At the time of analysis, navigating to wireshhark[.]com directly from the browser search bar led to a YouTube video of Rick Astley's song "Never Gonna Give You Up". This suggests that the website, wireshhark[.]com, had been configured to redirect users to this video unless they had arrived at the website via the relevant sponsored Google Search result [8].

Although it was not possible to confirm this with certainty, it is highly likely that users who visited the website via the appropriate sponsored Google Search result were led to a fake website (wireshhark[.]com) posing as the legitimate website, wireshark[.]com. It seems that the actors who set up this fake version of wireshark[.]com were inspired by the well-known bait-and-switch technique known as 'rickrolling', where users are presented with a desirable lure (typically a hyperlink of some kind) which unexpectedly leads them to a music video of Rick Astley's "Never Gonna Give You Up".

After being redirected to wireshhark[.]com, the user unintentionally installed a malware sample which dropped what appears to be Cobalt Strike onto their device. The presence of Cobalt Strike on the user's desktop was evidenced by the subsequent type A DNS requests which the device made for the domain name 'pse[.]ac'. These DNS requests were responded to with the likely Cobalt Strike C2 server address, 194.169.175[.]132. Given that Darktrace only had visibility over the device’s internal traffic, it did not observe any C2 connections to this Cobalt Strike endpoint. However, the desktop's subsequent behavior suggests that a malicious actor had gained 'hands-on-keyboard' control of the device via an established C2 channel.

Figure 2: Advanced Search data showing an customer device being tricked into visiting the fake website, wireshhark[.]com.

Since the malicious actor had gained control of an IT member's device, they were able to abuse the privileged account credentials to spread Python payloads across the network via SMB and the Windows Management Instrumentation (WMI) service. The actor was also seen distributing the Windows Sys-Internals tool, PsExec, likely in an attempt to facilitate their lateral movement efforts. It was normal for this IT member's desktop to distribute files across the network via SMB, which meant that this malicious SMB activity was not, at first glance, out of place.

Figure 3: Advanced Search data showing that it was normal for the IT member's device to distribute files over SMB.

However, Darktrace DETECT recognized that the significant spike in file writes being performed here was suspicious, even though, on the surface, it seemed ‘normal’ for the device. Furthermore, Darktrace identified that the executable files being distributed were attempting to masquerade as a different file type, potentially in an attempt to evade the detection of traditional security tools.

Figure 4: Event Log data showing several Model Breaches being created in response to the IT member's DEVICE's SMB writes of Python-based executables.

An addition to DETECT’s identification of this unusual activity, Darktrace’s Cyber AI Analyst launched an autonomous investigation into the ongoing compromise and was able to link the SMB writes and the sharing of the executable Python payloads, viewing the connections as one lateral movement incident rather than a string of isolated events. After completing its investigation, Cyber AI Analyst was able to provide a detailed summary of events on one pane of glass, ensuring the customer could identify the affected device and begin their remediation.

Figure 5: Cyber AI Analyst investigation summary highlighting the IT member's desktop’s lateral movement activities.

C2 Activity

The Python payloads distributed by the IT member’s device were likely related to the Nitrogen malware, as evidenced by the payloads’ names and by the network behaviours which they engendered.  

Figure 6: Advanced Search data showing the affected device reaching out to the C2 endpoint, pse[.]ac, and then distributing Python-based executable files to an internal domain controller.

The internal devices to which these Nitrogen payloads were distributed immediately went on to contact C2 infrastructure associated with Cobalt Strike. These C2 connections were made over SSL on ports 443 and 8443.  Darktrace identified the attacker moving laterally to an internal SQL server and an internal domain controller.

Figure 7: Advanced Search data showing an internal SQL server contacting the Cobalt Strike C2 endpoint, 194.180.48[.]169, after receiving Python payloads from the IT member’s device.
Figure 8: Event Log data showing several DETECT model breaches triggering in response to an internal SQL server’s C2 connections to 194.180.48[.]169.

Once more, Cyber AI Analyst launched its own investigation into this activity and was able to successfully identify a series of separate SSL connections, linking them together into one wider C2 incident.

Figure 9: Cyber AI Analyst investigation summary highlighting C2 connections from the SQL server.

Darktrace observed the attacker using their 'hands-on-keyboard' access to these systems to elevate their privileges, conduct network reconnaissance (primarily port scanning), spread Python payloads further across the network, exfiltrate data from the domain controller and transfer a payload from GitHub to the domain controller.

Figure 10: Cyber AI Analyst investigation summary an IP address scan carried out by an internal domain controller.
Figure 12: Event Log data showing an internal domain controller contacting GitHub around the time that it was in communication with the C2 endpoint, 194.180.48[.]169.
Figure 13: Event Log data showing a DETECT model breach being created in response to an internal domain controller's large data upload to the C2 endpoint, 194.180.48[.]169.

After conducting extensive reconnaissance and lateral movement activities, the attacker was observed detonating ransomware with the organization's VMware environment, resulting in the successful encryption of the customer’s VMware vCenter server and VMware virtual machines. In this case, the attacker took around 24 hours to progress from initial access to ransomware detonation.  

If the targeted organization had been signed up for Darktrace's Proactive Threat Notification (PTN) service, they would have been promptly notified of these suspicious activities by the Darktrace Security Operations Center (SOC) in the first instance, allowing them to quickly identify affected devices and quarantine them before the compromise could escalate.

Additionally, given the quantity of high-severe alerts that triggered in response to this attack, Darktrace RESPOND would, under normal circumstances, have inhibited the attacker's activities as soon as they were identified by DETECT. However, due to RESPOND not being configured to act on server devices within the customer’s network, the attacker was able to seamlessly move laterally through the organization's server environment and eventually detonate the ALPHV ransomware.

Nevertheless, Darktrace was able to successfully weave together multiple Cyber AI Analyst incidents which it generated into a thread representing the chain of behavior that made up this attack. The thread of Incident Events created by Cyber AI Analyst provided a substantial account of the attack and the steps involved in it, which significantly facilitated the customer’s post-incident investigation efforts.  

Figure 14: Darktrace's AI Analyst weaved together 33 of the Incident Events it created together into a thread representing the attacker’s chain of behavior.

Conclusion

It is expected for malicious cyber actors to revise and upgrade their methods to evade organizations’ improving security measures. The continued improvement of email security tools, for example, has likely created a need for attackers to develop new means of Initial Access, such as the use of Microsoft Teams-based malware delivery.

This fast-paced ALPHV ransomware attack serves as a further illustration of this trend, with the actor behind the attack using malvertising to convince an unsuspecting user to download the Python-based malware, Nitrogen, from a fake Wireshark site. Unbeknownst to the user, this stealthy malware dropped a C2 implant onto the user’s device, giving the malicious actor the ‘hands-on-keyboard’ access they needed to move laterally, conduct network reconnaissance, and ultimately detonate ALPHV ransomware.

Despite the non-traditional initial access methods used by this ransomware actor, Darktrace DETECT was still able to identify the unusual patterns of network traffic caused by the attacker’s post-compromise activities. The large volume of alerts created by Darktrace DETECT were autonomously investigated by Darktrace’s Cyber AI Analyst, which was able to weave together related activities of different devices into a comprehensive timeline of the attacker’s operation. Given the volume of DETECT alerts created in response to this ALPHV attack, it is expected that Darktrace RESPOND would have autonomously inhibited the attacker’s operation had the capability been appropriately configured.

As the first post-compromise activities Darktrace observed in this ALPHV attack were seemingly performed by a member of the customer’s IT team, it may have looked normal to a human or traditional signature and rules-based security tools. To Darktrace’s Self-Learning AI, however, the observed activities represented subtle deviations from the device’s normal pattern of life. This attack, and Darktrace’s detection of it, is therefore a prime illustration of the value that Self-Learning AI can bring to the task of detecting anomalies within organizations’ digital estates.

Credit to Sam Lister, Senior Cyber Analyst, Emma Foulger, Principal Cyber Analyst

Appendices

Darktrace DETECT Model Breaches

- Compliance / SMB Drive Write

- Compliance / High Priority Compliance Model Breach

- Anomalous File / Internal / Masqueraded Executable SMB Write

- Device / New or Uncommon WMI Activity

- Anomalous Connection / New or Uncommon Service Control

- Anomalous Connection / High Volume of New or Uncommon Service Control

- Device / New or Uncommon SMB Named Pipe

- Device / Multiple Lateral Movement Model Breaches

- Device / Large Number of Model Breaches  

- SMB Writes of Suspicious Files (Cyber AI Analyst)

- Suspicious Remote WMI Activity (Cyber AI Analyst)

- Suspicious DCE-RPC Activity (Cyber AI Analyst)

- Compromise / Connection to Suspicious SSL Server

- Compromise / High Volume of Connections with Beacon Score

- Anomalous Connection / Suspicious Self-Signed SSL

- Anomalous Connection / Anomalous SSL without SNI to New External

- Compromise / Suspicious TLS Beaconing To Rare External

- Compromise / Beacon to Young Endpoint

- Compromise / SSL or HTTP Beacon

- Compromise / Agent Beacon to New Endpoint

- Device / Long Agent Connection to New Endpoint

- Compromise / SSL Beaconing to Rare Destination

- Compromise / Large Number of Suspicious Successful Connections

- Compromise / Slow Beaconing Activity To External Rare

- Anomalous Server Activity / Outgoing from Server

- Device / Multiple C2 Model Breaches

- Possible SSL Command and Control (Cyber AI Analyst)

- Unusual Repeated Connections (Cyber AI Analyst)

- Device / ICMP Address Scan

- Device / RDP Scan

- Device / Network Scan

- Device / Suspicious Network Scan Activity

- Scanning of Multiple Devices (Cyber AI Analyst)

- ICMP Address Scan (Cyber AI Analyst)

- Device / Anomalous Github Download

- Unusual Activity / Unusual External Data Transfer

- Device / Initial Breach Chain Compromise

MITRE ATT&CK Mapping

Resource Development techniques:

- Acquire Infrastructure: Malvertising (T1583.008)

Initial Access techniques:

- Drive-by Compromise (T1189)

Execution techniques:

- User Execution: Malicious File (T1204.002)

- System Services: Service Execution (T1569.002)

- Windows Management Instrumentation (T1047)

Defence Evasion techniques:

- Masquerading: Match Legitimate Name or Location (T1036.005)

Discovery techniques:

- Remote System Discovery (T1018)

- Network Service Discovery (T1046)

Lateral Movement techniques:

- Remote Services: SMB/Windows Admin Shares

- Lateral Tool Transfer (T1570)

Command and Control techniques:

- Application Layer Protocol: Web Protocols (T1071.001)

- Encrypted Channel: Asymmetric Cryptography (T1573.002)

- Non-Standard Port (T1571)

- Ingress Tool Channel (T1105)

Exfiltration techniques:

- Exfiltration Over C2 Channel (T1041)

Impact techniques:

- Data Encrypted for Impact (T1486)

List of Indicators of Compromise

- allpcsoftware[.]com

- wireshhark[.]com

- pse[.]ac • 194.169.175[.]132

- 194.180.48[.]169

- 193.42.33[.]14

- 141.98.6[.]195

References  

[1] https://darktrace.com/threat-report-2023

[2] https://www.microsoft.com/en-us/security/blog/2022/05/09/ransomware-as-a-service-understanding-the-cybercrime-gig-economy-and-how-to-protect-yourself/

[3] https://www.bleepingcomputer.com/news/security/alphv-blackcat-this-years-most-sophisticated-ransomware/

[4] https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-353a

[5] https://www.justice.gov/opa/pr/justice-department-disrupts-prolific-alphvblackcat-ransomware-variant

[6] https://www.state.gov/u-s-department-of-state-announces-reward-offers-for-criminal-associates-of-the-alphv-blackcat-ransomware-variant/

[7] https://www.bleepingcomputer.com/news/security/blackcat-alphv-ransomware-linked-to-blackmatter-darkside-gangs/

[8] https://www.trendmicro.com/en_us/research/23/f/malvertising-used-as-entry-vector-for-blackcat-actors-also-lever.html

[9] https://news.sophos.com/en-us/2023/07/26/into-the-tank-with-nitrogen/

[10] https://www.esentire.com/blog/persistent-connection-established-nitrogen-campaign-leverages-dll-side-loading-technique-for-c2-communication

[11] https://www.esentire.com/blog/nitrogen-campaign-2-0-reloads-with-enhanced-capabilities-leading-to-alphv-blackcat-ransomware

[12] https://www.esentire.com/blog/the-notorious-alphv-blackcat-ransomware-gang-is-attacking-corporations-and-public-entities-using-google-ads-laced-with-malware-warns-esentire

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.
Author
Sam Lister
SOC Analyst
Book a 1-1 meeting with one of our experts
Share this article

More in this series

No items found.

Blog

/

September 24, 2024

/

Inside the SOC

Lifting the Fog: Darktrace’s Investigation into Fog Ransomware

Default blog imageDefault blog image

Introduction to Fog Ransomware

As ransomware attacks continue to be launched at an alarming rate, Darktrace’s Threat Research team has identified that familiar strains like Akira, LockBit, and BlackBasta remain among the most prevalent threats impacting its customers, as reported in the First 6: Half-Year Threat Report 2024. Despite efforts by law agencies, like dismantling the infrastructure of cybercriminals and shutting down their operations [2], these groups continue to adapt and evolve.

As such, it is unsurprising that new ransomware variants are regularly being created and launched to get round law enforcement agencies and increasingly adept security teams. One recent example of this is Fog ransomware.

What is Fog ransomware?

Fog ransomware is strain that first appeared in the wild in early May 2024 and has been observed actively using compromised virtual private network (VPN) credentials to gain access to organization networks in the education sector in the United States.

Darktrace's detection of Fog Ransomware

In June 2024, Darktrace observed instances of Fog ransomware across multiple customer environments. The shortest time observed from initial access to file encryption in these attacks was just 2 hours, underscoring the alarming speed with which these threat actors can achieve their objectives.

Darktrace identified key activities typical of a ransomware kill chain, including enumeration, lateral movement, encryption, and data exfiltration. In most cases, Darktrace was able to successfully halt the progression Fog attacks in their early stages by applying Autonomous Response actions such as quarantining affected devices and blocking suspicious external connections.

To effectively illustrate the typical kill chain of Fog ransomware, this blog focuses on customer environments that did not have Darktrace’s Autonomous Response enabled. In these cases, the attack progressed unchecked and reached its intended objectives until the customer received Darktrace’s alerts and intervened.

Darktrace’s Coverage of Fog Ransomware

Initial Intrusion

After actors had successfully gained initial access into customer networks by exploiting compromised VPN credentials, Darktrace observed a series of suspicious activities, including file shares, enumeration and extensive scanning. In one case, a compromised domain controller was detected making outgoing NTLM authentication attempts to another internal device, which was subsequently used to establish RDP connections to a Windows server running Hyper-V.

Given that the source was a domain controller, the attacker could potentially relay the NTLM hash to obtain a domain admin Kerberos Ticket Granting Ticket (TGT). Additionally, incoming NTLM authentication attempts could be triggered by tools like Responder, and NTLM hashes used to encrypt challenge response authentication could be abused by offline brute-force attacks.

Darktrace also observed the use of a new administrative credential on one affected device, indicating that malicious actors were likely using compromised privileged credentials to conduct relay attacks.

Establish Command-and-Control Communication (C2)

In many instances of Fog ransomware investigated by Darktrace’s Threat Research team, devices were observed making regular connections to the remote access tool AnyDesk. This was exemplified by consistent communication with the endpoint “download[.]anydesk[.]com” via the URI “/AnyDesk.exe”. In other cases, Darktrace identified the use of another remote management tool, namely SplashTop, on customer servers.

In ransomware attacks, threat actors often use such legitimate remote access tools to establish command-and-control (C2) communication. The use of such services not only complicates the identification of malicious activities but also enables attackers to leverage existing infrastructure, rather than having to implement their own.

Internal Reconnaissance

Affected devices were subsequently observed making an unusual number of failed internal connections to other internal locations over ports such as 80 (HTTP), 3389 (RDP), 139 (NetBIOS) and 445 (SMB). This pattern of activity strongly indicated reconnaissance scanning behavior within affected networks. A further investigation into these HTTP connections revealed the URIs “/nice ports”/Trinity.txt.bak”, commonly associated with the use of the Nmap attack and reconnaissance tool.

Simultaneously, some devices were observed engaging in SMB actions targeting the IPC$ share and the named pipe “srvsvc” on internal devices. Such activity aligns with the typical SMB enumeration tactics, whereby attackers query the list of services running on a remote host using a NULL session, a method often employed to gather information on network resources and vulnerabilities.

Lateral Movement

As attackers attempted to move laterally through affected networks, Darktrace observed suspicious RDP activity between infected devices. Multiple RDP connections were established to new clients, using devices as pivots to propagate deeper into the networks, Following this, devices on multiple networks exhibited a high volume of SMB read and write activity, with internal share drive file names being appended with the “.flocked” extension – a clear sign of ransomware encryption. Around the same time, multiple “readme.txt” files were detected being distributed across affected networks, which were later identified as ransom notes.

Further analysis of the ransom note revealed that it contained an introduction to the Fog ransomware group, a summary of the encryption activity that had been carried out, and detailed instructions on how to communicate with the attackers and pay the ransom.

Packet capture (PCAP) of the ransom note file titled “readme.txt”.
Figure 1: Packet capture (PCAP) of the ransom note file titled “readme.txt”.

Data Exfiltration

In one of the cases of Fog ransomware, Darktrace’s Threat Research team observed potential data exfiltration involving the transfer of internal files to an unusual endpoint associated with the MEGA file storage service, “gfs302n515[.]userstorage[.]mega[.]co[.]nz”.

This exfiltration attempt suggests the use of double extortion tactics, where threat actors not only encrypt victim’s data but also exfiltrate it to threaten public exposure unless a ransom is paid. This often increases pressure on organizations as they face the risk of both data loss and reputational damage caused by the release of sensitive information.

Darktrace’s Cyber AI Analyst autonomously investigated what initially appeared to be unrelated events, linking them together to build a full picture of the Fog ransomware attack for customers’ security teams. Specifically, on affected networks Cyber AI Analyst identified and correlated unusual scanning activities, SMB writes, and file appendages that ultimately suggested file encryption.

Cyber AI Analyst’s analysis of encryption activity on one customer network.
Figure 2: Cyber AI Analyst’s analysis of encryption activity on one customer network.
Figure 3: Cyber AI Analysts breakdown of the investigation process between the linked incident events on one customer network.

Conclusion

As novel and fast-moving ransomware variants like Fog persist across the threat landscape, the time taken for from initial compromise to encryption has significantly decreased due to the enhanced skill craft and advanced malware of threat actors. This trend particularly impacts organizations in the education sector, who often have less robust cyber defenses and significant periods of time during which infrastructure is left unmanned, and are therefore more vulnerable to quick-profit attacks.

Traditional security methods may fall short against these sophisticated attacks, where stealthy actors evade detection by human-managed teams and tools. In these scenarios Darktrace’s AI-driven product suite is able to quickly detect and respond to the initial signs of compromise through autonomous analysis of any unusual emerging activity.

When Darktrace’s Autonomous Response capability was active, it swiftly mitigated emerging Fog ransomware threats by quarantining devices exhibiting malicious behavior to contain the attack and blocking the exfiltration of sensitive data, thus preventing customers from falling victim to double extortion attempts.

Credit to Qing Hong Kwa (Senior Cyber Analyst and Deputy Analyst Team Lead, Singapore) and Ryan Traill (Threat Content Lead)

Appendices

Darktrace Model Detections:

- Anomalous Server Activity::Anomalous External Activity from Critical Network Device

- Anomalous Connection::SMB Enumeration

- Anomalous Connection::Suspicious Read Write Ratio and Unusual SMB

- Anomalous Connection::Uncommon 1 GiB Outbound

- Anomalous File::Internal::Additional Extension Appended to SMB File

- Compliance::Possible Cleartext LDAP Authentication

- Compliance::Remote Management Tool On Server

- Compliance::SMB Drive Write

- Compromise::Ransomware::SMB Reads then Writes with Additional Extensions

- Compromise::Ransomware::Possible Ransom Note Write

- Compromise::Ransomware::Ransom or Offensive Words Written to SMB

- Device::Attack and Recon Tools

- User::New Admin Credentials on Client

- Unusual Activity::Anomalous SMB Move & Write

- Unusual Activity::Internal Data Transfer

- Unusual Activity::Unusual External Data Transfer

- Unusual Activity::Enhanced Unusual External Data Transfer

Darktrace Model Detections:

- Antigena::Network::External Threat::Antigena Suspicious File Block

- Antigena::Network::External Threat::Antigena Suspicious File Pattern of Life Block

- Antigena::Network::External Threat::Antigena File then New Outbound Block

- Antigena::Network::External Threat::Antigena Ransomware Block

- Antigena::Network::External Threat::Antigena Suspicious Activity Block

- Antigena::Network::Significant Anomaly::Antigena Controlled and Model Breach

- Antigena::Network::Significant Anomaly::Antigena Enhanced Monitoring from Server Block

- Antigena::Network::Significant Anomaly::Antigena Breaches Over Time Block

- Antigena::Network::Significant Anomaly::Antigena Significant Server Anomaly Block

- Antigena::Network::Insider Threat::Antigena Internal Data Transfer Block

- Antigena::Network::Insider Threat::Antigena Large Data Volume Outbound Block

- Antigena::Network::Insider Threat::Antigena SMB Enumeration Block

AI Analyst Incident Coverage

- Encryption of Files over SMB

- Scanning of Multiple Devices

- SMB Writes of Suspicious Files

MITRE ATT&CK Mapping

(Technique Name) – (Tactic) – (ID) – (Sub-Technique of)

Data Obfuscation - COMMAND AND CONTROL - T1001

Remote System Discovery - DISCOVERY - T1018

SMB/Windows Admin Shares - LATERAL MOVEMENT - T1021.002 - T1021

Rename System Utilities - DEFENSE EVASION - T1036.003 - T1036

Network Sniffing - CREDENTIAL ACCESS, DISCOVERY - T1040

Exfiltration Over C2 Channel - EXFILTRATION - T1041

Data Staged - COLLECTION - T1074

Valid Accounts - DEFENSE EVASION, PERSISTENCE, PRIVILEGE ESCALATION, INITIAL ACCESS - T1078

Taint Shared Content - LATERAL MOVEMENT - T1080

File and Directory Discovery - DISCOVERY - T1083

Email Collection - COLLECTION - T1114

Automated Collection - COLLECTION - T1119

Network Share Discovery - DISCOVERY - T1135

Exploit Public-Facing Application - INITIAL ACCESS - T1190

Hardware Additions - INITIAL ACCESS - T1200

Remote Access Software - COMMAND AND CONTROL - T1219

Data Encrypted for Impact - IMPACT - T1486

Pass the Hash - DEFENSE EVASION, LATERAL MOVEMENT - T1550.002 - T1550

Exfiltration to Cloud Storage - EXFILTRATION - T1567.002 - T1567

Lateral Tool Transfer - LATERAL MOVEMENT - T1570

List of Indicators of Compromise (IoCs)

IoC – Type – Description

/AnyDesk.exe - Executable File - Remote Access Management Tool

gfs302n515[.]userstorage[.]mega[.]co[.]nz- Domain - Exfiltration Domain

*.flocked - Filename Extension - Fog Ransomware Extension

readme.txt - Text File - Fog Ransom Note

xql562evsy7njcsngacphcerzjfecwotdkobn3m4uxu2gtqh26newid[.]onion - Onion Domain - Threat Actor’s Communication Channel

References

[1] https://arcticwolf.com/resources/blog/lost-in-the-fog-a-new-ransomware-threat/

[2] https://intel471.com/blog/assessing-the-disruptions-of-ransomware-gangs

[3] https://www.pcrisk.com/removal-guides/30167-fog-ransomware

Continue reading
About the author
Qing Hong Kwa
Senior Cyber Analyst and Deputy Analyst Team Lead, Singapore

Blog

/

September 11, 2024

/

Inside the SOC

Decrypting the Matrix: How Darktrace Uncovered a KOK08 Ransomware Attack

Default blog imageDefault blog image

What is Matrix Ransomware?

Matrix is a ransomware family that first emerged in December 2016, mainly targeting small to medium-sized organizations across the globe in countries including the US, Belgium, Germany, Canada and the UK [1]. Although the reported number of Matrix ransomware attacks has remained relatively low in recent years, it has demonstrated ongoing development and gradual improvements to its tactics, techniques, and procedures (TTPs).

How does Matrix Ransomware work?

In earlier versions, Matrix utilized spam email campaigns, exploited Windows shortcuts, and deployed RIG exploit kits to gain initial access to target networks. However, as the threat landscape changed so did Matrix’s approach. Since 2018, Matrix has primarily shifted to brute-force attacks, targeting weak credentials on Windows machines accessible through firewalls. Attackers often exploit common and default credentials, such as “admin”, “password123”, or other unchanged default settings, particularly on systems with Remote Desktop Protocol (RDP) enabled [2] [3].

Darktrace observation of Matrix Ransomware tactics

In May 2024, Darktrace observed an instance of KOK08 ransomware, a specific strain of the Matrix ransomware family, in which some of these ongoing developments and evolutions were observed. Darktrace detected activity indicative of internal reconnaissance, lateral movement, data encryption and exfiltration, with the affected customer later confirming that credentials used for Virtual Private Network (VPN) access had been compromised and used as the initial attack vector.

Another significant tactic observed by Darktrace in this case was the exfiltration of data following encryption, a hallmark of double extortion. This method is employed by attacks to increase pressure on the targeted organization, demanding ransom not only for the decryption of files but also threatening to release the stolen data if their demands are not met. These stakes are particularly high for public sector entities, like the customer in question, as the exposure of sensitive information could result in severe reputational damage and legal consequences, making the pressure to comply even more intense.

Darktrace’s Coverage of Matrix Ransomware

Internal Reconnaissance and Lateral Movement

On May 23, 2024, Darktrace / NETWORK identified a device on the customer’s network making an unusually large number of internal connections to multiple internal devices. Darktrace recognized that this unusual behavior was indicative of internal scanning activity. The connectivity observed around the time of the incident indicated that the Nmap attack and reconnaissance tool was used, as evidenced by the presence of the URI “/nice ports, /Trinity.txt.bak”.

Although Nmap is a crucial tool for legitimate network administration and troubleshooting, it can also be exploited by malicious actors during the reconnaissance phase of the attack. This is a prime example of a ‘living off the land’ (LOTL) technique, where attackers use legitimate, pre-installed tools to carry out their objectives covertly. Despite this, Darktrace’s Self-Learning AI had been continually monitoring devices across the customers network and was able to identify this activity as a deviation from the device’s typical behavior patterns.

The ‘Device / Attack and Recon Tools’ model alert identifying the active usage of the attack and recon tool, Nmap.
Figure 1: The ‘Device / Attack and Recon Tools’ model alert identifying the active usage of the attack and recon tool, Nmap.
Figure 2: Cyber AI Analyst Investigation into the ‘Scanning of Multiple Devices' incident.

Darktrace subsequently observed a significant number of connection attempts using the RDP protocol on port 3389. As RDP typically requires authentication, multiple connection attempts like this often suggest the use of incorrect username and password combinations.

Given the unusual nature of the observed activity, Darktrace’s Autonomous Response capability would typically have intervened, taking actions such as blocking affected devices from making internal connections on a specific port or restricting connections to a particular device. However, Darktrace was not configured to take autonomous action on the customer’s network, and thus their security team would have had to manually apply any mitigative measures.

Later that day, the same device was observed attempting to connect to another internal location via port 445. This included binding to the server service (srvsvc) endpoint via DCE/RPC with the “NetrShareEnum” operation, which was likely being used to list available SMB shares on a device.

Over the following two days, it became clear that the attackers had compromised additional devices and were actively engaging in lateral movement. Darktrace detected two more devices conducting network scans using Nmap, while other devices were observed making extensive WMI requests to internal systems over DCE/RPC. Darktrace recognized that this activity likely represented a coordinated effort to map the customer’s network and identity further internal devices for exploitation.

Beyond identifying the individual events of the reconnaissance and lateral movement phases of this attack’s kill chain, Darktrace’s Cyber AI Analyst was able to connect and consolidate these activities into one comprehensive incident. This not only provided the customer with an overview of the attack, but also enabled them to track the attack’s progression with clarity.

Furthermore, Cyber AI Analyst added additional incidents and affected devices to the investigation in real-time as the attack unfolded. This dynamic capability ensured that the customer was always informed of the full scope of the attack. The streamlined incident consolidation and real-time updates saved valuable time and resources, enabling quicker, more informed decision-making during a critical response window.

Cyber AI Analyst timeline showing an overview of the scanning related activity, while also connecting the suspicious lateral movement activity.
Figure 3: Cyber AI Analyst timeline showing an overview of the scanning related activity, while also connecting the suspicious lateral movement activity.

File Encryption

On May 28, 2024, another device was observed connecting to another internal location over the SMB filesharing protocol and accessing multiple files with a suspicious extension that had never previously been observed on the network. This activity was a clear sign of ransomware infection, with the ransomware altering the files by adding the “KOK08@QQ[.]COM” email address at the beginning of the filename, followed by a specific pattern of characters. The string consistently followed a pattern of 8 characters (a mix of uppercase and lowercase letters and numbers), followed by a dash, and then another 8 characters. After this, the “.KOK08” extension was appended to each file [1][4].

Cyber AI Analyst Investigation Process for the 'Possible Encryption of Files over SMB' incident.
Figure 4: Cyber AI Analyst Investigation Process for the 'Possible Encryption of Files over SMB' incident.
Cyber AI Analyst Encryption Information identifying the ransomware encryption activity,
Figure 5: Cyber AI Analyst Encryption Information identifying the ransomware encryption activity.

Data Exfiltration

Shortly after the encryption event, another internal device on the network was observed uploading an unusually large amount of data to the rare external endpoint 38.91.107[.]81 via SSH. The timing of this activity strongly suggests that this exfiltration was part of a double extortion strategy. In this scenario, the attacker not only encrypts the target’s files but also threatens to leak the stolen data unless a ransom is paid, leveraging both the need for decryption and the fear of data exposure to maximize pressure on the victim.

The full impact of this double extortion tactic became evident around two months later when a ransomware group claimed possession of the stolen data and threatened to release it publicly. This development suggested that the initial Matrix ransomware attackers may have sold the exfiltrated data to a different group, which was now attempting to monetize it further, highlighting the ongoing risk and potential for exploitation long after the initial attack.

External data being transferred from one of the involved internal devices during and after the encryption took place.
Figure 6: External data being transferred from one of the involved internal devices during and after the encryption took place.

Unfortunately, because Darktrace’s Autonomous Response capability was not enabled at the time, the ransomware attack was able to escalate to the point of data encryption and exfiltration. However, Darktrace’s Security Operations Center (SOC) was still able to support the customer through the Security Operations Support service. This allowed the customer to engage directly with Darktrace’s expert analysts, who provided essential guidance for triaging and investigating the incident. The support from Darktrace’s SOC team not only ensured the customer had the necessary information to remediate the attack but also expedited the entire process, allowing their security team to quickly address the issue without diverting significant resources to the investigation.

Conclusion

In this Matrix ransomware attack on a Darktrace customer in the public sector, malicious actors demonstrated an elevated level of sophistication by leveraging compromised VPN credentials to gain initial access to the target network. Once inside, they exploited trusted tools like Nmap for network scanning and lateral movement to infiltrate deeper into the customer’s environment. The culmination of their efforts was the encryption of files, followed by data exfiltration via SSH, suggesting that Matrix actors were employing double extortion tactics where the attackers not only demanded a ransom for decryption but also threatened to leak sensitive information.

Despite the absence of Darktrace’s Autonomous Response at the time, its anomaly-based approach played a crucial role in detecting the subtle anomalies in device behavior across the network that signalled the compromise, even when malicious activity was disguised as legitimate.  By analyzing these deviations, Darktrace’s Cyber AI Analyst was able to identify and correlate the various stages of the Matrix ransomware attack, constructing a detailed timeline. This enabled the customer to fully understand the extent of the compromise and equipped them with the insights needed to effectively remediate the attack.

Credit to Christina Kreza (Cyber Analyst) and Ryan Traill (Threat Content Lead)

Appendices

Darktrace Model Detections

·       Device / Network Scan

·       Device / Attack and Recon Tools

·       Device / Possible SMB/NTLM Brute Force

·       Device / Suspicious SMB Scanning Activity

·       Device / New or Uncommon SMB Named Pipe

·       Device / Initial Breach Chain Compromise

·       Device / Multiple Lateral Movement Model Breaches

·       Device / Large Number of Model Breaches from Critical Network Device

·       Device / Multiple C2 Model Breaches

·       Device / Lateral Movement and C2 Activity

·       Anomalous Connection / SMB Enumeration

·       Anomalous Connection / New or Uncommon Service Control

·       Anomalous Connection / Multiple Connections to New External TCP Port

·       Anomalous Connection / Data Sent to Rare Domain

·       Anomalous Connection / Uncommon 1 GiB Outbound

·       Unusual Activity / Enhanced Unusual External Data Transfer

·       Unusual Activity / SMB Access Failures

·       Compromise / Ransomware / Suspicious SMB Activity

·       Compromise / Suspicious SSL Activity

List of Indicators of Compromise (IoCs)

·       .KOK08 -  File extension - Extension to encrypted files

·       [KOK08@QQ[.]COM] – Filename pattern – Prefix of the encrypted files

·       38.91.107[.]81 – IP address – Possible exfiltration endpoint

MITRE ATT&CK Mapping

·       Command and control – Application Layer Protocol – T1071

·       Command and control – Web Protocols – T1071.001

·       Credential Access – Password Guessing – T1110.001

·       Discovery – Network Service Scanning – T1046

·       Discovery – File and Directory Discovery – T1083

·       Discovery – Network Share Discovery – T1135

·       Discovery – Remote System Discovery – T1018

·       Exfiltration – Exfiltration Over C2 Channer – T1041

·       Initial Access – Drive-by Compromise – T1189

·       Initial Access – Hardware Additions – T1200

·       Lateral Movement – SMB/Windows Admin Shares – T1021.002

·       Reconnaissance – Scanning IP Blocks – T1595.001

References

[1] https://unit42.paloaltonetworks.com/matrix-ransomware/

[2] https://www.sophos.com/en-us/medialibrary/PDFs/technical-papers/sophoslabs-matrix-report.pdf

[3] https://cyberenso.jp/en/types-of-ransomware/matrix-ransomware/

[4] https://www.pcrisk.com/removal-guides/10728-matrix-ransomware

Continue reading
About the author
Christina Kreza
Cyber Analyst
Your data. Our AI.
Elevate your network security with Darktrace AI