In the current threat landscape, much of the conversation around ransomware focusses on high-profile strains and notorious threat groups. While organizations and their security teams are justified in these concerns, it is important not to underestimate the danger posed by smaller scale, unattributed ransomware attacks.
Unlike attributed ransomware strains, there are often no playbooks or lists of previously observed indicators of compromise (IoCs) that security teams can consult to help them shore up their cyber defenses. As such, anomaly detection is critical to ensure that emerging threats can be detected based on their abnormality on the network, rather than relying heavily on threat intelligence.
In mid-March 2023, a Darktrace customer requested analytical support from the Darktrace Security Operations Center (SOC) after they had been hit by a ransomware attack a few hours earlier. Darktrace was able to uncover a myriad of malicious activity that preceded the eventual ransomware deployment, ultimately assisting the customer to identify compromised devices and contain the ransomware attack.
Attack Overview
While there were a small number of endpoints that had been flagged as malicious by open-source intelligence (OSINT), Darktrace DETECT™ focused on the unusualness of the activity surrounding this emerging ransomware attack. This provided unparalleled visibility over this ransomware attack at every stage of the cyber kill chain, whilst also revealing the potential origins of the compromise which came months area.
Initial Compromise
Initial investigation revealed that several devices that Darktrace were observed performing suspicious activity had previously engaged in anomalous behavior several months before the ransomware event, indicating this could be a part of a repeated compromise or the result of initial access brokers.
Most notably, in late January 2023 there was a spike in unusual activity when some of the affected devices were observed performing activity indicative of network and device scanning.
Darktrace DETECT identified some of the devices establishing unusually high volumes of internal failed connections via TCP and UDP, and the SMB protocol. Various key ports, such as 135, 139, and 445, were also scanned.
Due to the number of affected devices, the exact initial attack vector is unclear; however, one likely scenario is associated with an internet-facing DNS server. Towards the end of January 2023, the server began to receive unusual TCP DNS requests from the rare external endpoint, 103.203.59[.]3, which had been flagged as potentially malicious by OSINT [4]. Based on a portion of the hostname of the device, dc01, we can assume that this server served as a gateway to the domain controller. If a domain controller is compromised, a malicious actor would gain access to usernames and passwords within a network allowing attackers to obtain administrative-level access to an organization’s digital estate.
Around the same time as the unusual TCP DNS requests, Darktrace DETECT observed the domain controller engaging in further suspicious activity. As demonstrated in Figure 1, Darktrace recognized that this server was not responding to common requests from multiple internal devices, as it would be expected to. Following this, the device was observed carrying out new or uncommon Windows Management Instrumentation (WMI) activity. WMI is typically used by network administrators to manage remote and local Windows systems [3].
Had Darktrace RESPOND™ been enabled in autonomous response mode, it would have to blocked connections originating from the compromised internal devices as soon as they were detected, while also limiting affected devices to their pre-established patterns of file to prevent them from carrying out any further malicious activity.
Darktrace subsequently observed multiple devices establishing various chains of connections that are indicative of lateral movement activity, such as unusual internal RDP and WMI requests. While there may be devices within an organization that do regularly partake these types of connections, Darktrace recognized that this activity was extremely unusual for these devices.
Darktrace’s Self-Learning AI allows for a deep understanding of customer networks and the devices within them. It’s anomaly-based threat detection capability enables it to recognize subtle deviations in a device’s normal patterns of behavior, without depending on known IoCs or signatures and rules to guide it.
Persistence
Darktrace DETECT observed several affected devices communicating with rare external endpoints that had also been flagged as potentially malicious by OSINT tools. Multiple devices were observed performing activity indicative of NTLM brute-forcing activity, as seen in the Figure 3 which highlights the event log of the aforementioned domain controller. Said domain controller continuously engaged in anomalous behavior throughout the course of the attack. The same device was seen using a potentially compromise credential, ‘cvd’, which was observed via an SMB login event.
Affected devices, including the domain controller, continued to engage in consistent communication with the endpoints prior to the actual ransomware attack. Darktrace identified that some of these malicious endpoints had likely been generated by Domain Generation Algorithms (DGA), a classic tactic utilized by threat actors. Subsequent OSINT investigation revealed that one such domain had been associated with malware such as TrojanDownloader:Win32/Upatre!rfn [5].
All external engagements were observed by Darktrace DETECT and would have been actioned on by Darktrace RESPOND, had it been configured in autonomous response mode. It would have blocked any suspicious outgoing connections originating from the compromised devices, thus preventing additional external engagement from taking place. Darktrace RESPOND works in tandem with DETECT to autonomously take action against suspicious activity based on its unusualness, rather than relying on static lists of ‘known-bads’ or malicious IoCs.
Reconnaissance
On March 14, 2023, a few days before the ransomware attack, Darktrace observed multiple internal devices failing to establish connections in a manner that suggests SMB, RDP and network scanning. Among these devices once more was the domain controller, which was seen performing potential SMB brute-forcing, representing yet another example of malicious activity carried out by this device.
Lateral Movement
Immediately prior to the attack, many compromised devices were observed mobilizing to conduct an array of high-severity lateral movement activity. Darktrace detected one device using two administrative credentials, namely ‘Administrator’ and ‘administrator’, while it also observed a notable spike in the volume of successful SMB connections from the device around the same time.
At this point, Darktrace DETECT was observing the progression of this attack along the cyber kill chain. What had started as internal recognisance, had escalated to exploitation and ensuing command-and-control activity. Following an SMB brute-force attempt, Darktrace DETECT identified a successful DCSync attack.
A DCSync attack occurs when a malicious actor impersonates a domain controller in an effort to gather sensitive information, such as user credentials and passwords hashes, by replicating directory services [1]. In this case, a device sent various successful DRSGetNCChanges operation requests to the DRSUAPI endpoint.
Data Exfiltration
Around the same time, Darktrace detected the compromised server transferring a high volume of data to rare external endpoints associated with Bublup, a third-party project management application used to save and share files. Although the actors attempted to avoid the detection of security tools by using a legitimate file storage service, Darktrace understood that this activity represented a deviation in this device’s expected pattern of life.
In one instance, around 8 GB of data was transferred, and in another, over 4 GB, indicating threat actors were employing a tactic known as ‘low and slow’ exfiltration whereby data is exfiltrated in small quantities via multiple connections, in an effort to mask their suspicious activity. While this tactic may have evaded the detection of traditional security measures, Darktrace’s anomaly-based detection allowed it to recognize that these two incidents represented a wider exfiltration event, rather than viewing the transfers in isolation.
Impact
Finally, Darktrace began to observe a large amount of suspicious SMB activity on the affected devices, most of which was SMB file encryption. DETECT observed the file extension ‘uw9nmvw’ being appended to many files across various internal shares and devices. In addition to this, a potential ransom note, ‘RECOVER-uw9nmvw-FILES.txt’, was detected on the network shortly after the start of the attack.
Conclusion
Ultimately, this incident show cases how Darktrace was able to successfully identify an emerging ransomware attack using its unrivalled anomaly-based detection capabilities, without having to rely on any previously established threat intelligence. Not only was Darktrace DETECT able to identify the ransomware at multiple stages of the kill chain, but it was also able to uncover the anomalous activity that took place in the buildup to the attack itself.
As the attack progressed along the cyber kill chain, escalating in severity at every juncture, DETECT was able to provide full visibility over the events. Through the successful identification of compromised devices, anomalous administrative credentials usage and encrypted files, Darktrace was able to greatly assist the customer, ensuring they were well-equipped to contain the incident and begin their incident management process.
Darktrace would have been able to aid the customer even further had they enabled its autonomous response technology on their network. Darktrace RESPOND would have taken targeted, mitigative action as soon as suspicious activity was detected, preventing the malicious actors from achieving their goals.
Credit to: Natalia Sánchez Rocafort, Cyber Security Analyst, Patrick Anjos, Senior Cyber Analyst.
MITRE Tactics/Techniques Mapping
RECONNAISSANCE
Scanning IP Blocks (T1595.001)
RECONNAISSANCE
Vulnerability Scanning (T1595.002)
IMPACT
Service Stop (T1489)
LATERAL MOVEMENT
Taint Shared Content (T1080)
IMPACT
Data Encrypted for Impact (T1486)
INITIAL ACCESS
Replication Through Removable Media (T1200)
DEFENSE EVASION
Rogue Domain Controller (T1207)
COMMAND AND CONTROL
Domain Generation Algorithms (T1568.002)
EXECUTION
Windows Management Instrumentation (T1047)
INITIAL ACCESS
Phishing (T1190)
EXFILTRATION
Exfiltration Over C2 Channel (T1041)
IoC Table
IoC ----------- TYPE ------------- DESCRIPTION + PROBABILITY
CVD --------- credentials -------- Possible compromised credential
.UW9NMVW - File extension ----- Possible appended file extension
RECOVER-UW9NMVW-FILES.TXT - Ransom note - Possible ransom note observed
84.32.188[.]186 - IP address ------ C2 Endpoint
AS.EXECSVCT[.]COM - Hostname - C2 Endpoint
ZX.EXECSVCT[.]COM - Hostname - C2 Endpoint
QW.EXECSVCT[.]COM - Hostname - C2 Endpoint
EXECSVCT[.]COM - Hostname ------ C2 Endpoint
15.197.130[.]221 --- IP address ------ C2 Endpoint
AS59642 UAB CHERRY SERVERS - ASN - Possible ASN associated with C2 Endpoints
108.156.28[.]43
108.156.28[.]22
52.84.93[.]26
52.217.131[.]241
54.231.193[.]89 - IP addresses - Possible IP addresses associated with data exfiltration
103.203.59[.]3 -IP address ---- Possible IP address associated with initial attack vector
References:
[1] https://blog.netwrix.com/2021/11/30/what-is-dcsync-an-introduction/
[2] https://www.easeus.com/computer-instruction/delete-system32.html#:~:text=System32%20is%20a%20folder%20on,DLL%20files%2C%20and%20EXE%20files.
[3] https://www.techtarget.com/searchwindowsserver/definition/Windows-Management-Instrumentation#:~:text=WMI%20provides%20users%20with%20information,operational%20environments%2C%20including%20remote%20systems.
[4] https://www.virustotal.com/gui/ip-address/103.203.59[.]3
[5] https://otx.alienvault.com/indicator/ip/15.197.130[.]221