What is credential theft and how does it work?
What began as a method to achieve unauthorized access to an account, often driven by the curiosity of individual attackers, credentials theft become a key tactic for malicious actors and groups, as stolen login credentials can be abused to gain unauthorized access to accounts and systems. This access can be leveraged to carry out malicious activities such as data exfiltration, fraud, espionage and malware deployment.
It is therefore no surprise that the number of dark web marketplaces selling privileged credentials has increased in recent years, making it easier for malicious actors to monetize stolen credentials [1]. This, in turn, has created new opportunities for threat actors to use increasingly sophisticated tactics such as phishing, social engineering and credential stuffing in their attacks, targeting individuals, organizations and government entities alike [1].
Credential theft example
TA577 Threat Actor
TA577 is a threat actor known to leverage stolen credentials, also known as Hive0118 [2], an initial access broker (IAB) group that was previously known for delivering malicious payloads [2]. On March 4, 2024, Proofpoint reported evidence of TA577 using a new attack chain with a different aim in mind: stealing NT LAN Manager (NTLM) hashes that can be used to authenticate to systems without needing to know plaintext passwords [3].
How does TA577 steal credentials?
Proofpoint reported that this new attack chain, which was first observed on February 26 and 27, was made up of two distinct campaigns. The first campaign consisted of a phishing attack featuring tens of thousands of emails targeting hundreds of organizations globally [3]. These phishing emails often appeared as replies to previous messages (thread hijacking) and contained zipped HTML attachments that each contained a unique file hash, customized for each recipient [3]. These attached files also contained a HTTP Meta refresh function, which triggered an automatic connection to a text file hosted on external IP addresses running as SMB servers [3].
When attempting to access the text file, the server requires an SMB session authentication via NTLM. This session is initiated when a client sends an ‘SMB_COM_NEGOTIATE’ request to the server, which answers with a ‘SMB_COM_NEGOTIATE’ response.
The client then proceeds to send a ‘SMB_COM_SESSION_SETUP_ANDX’ request to start the SMB session setup process, which includes initiating the NTLM authentication process. The server responds with an ‘SMB_COM_SESSION_SETUP_ANDX’ response, which includes an NTLM challenge message [6].
The client can then use the challenge message and its own credentials to generate a response by hashing its password using an NTLM hash algorithm. The response is sent to the server in an ‘SMB_COM_SESSION_SETUP_ANDX’ request. The server validates the response and, if the authentication is successful, the server answers with a final ‘SMB_COM_SESSION_SETUP_ANDX’ response, which completes the session setup process and allows the client to access the file listed on the server [6].
What is the goal of threat actor TA577?
As no malware delivery was detected during these sessions, researchers have suggested that the aim of TA577 was not to deliver malware, but rather to take advantage of the NTLMV2 challenge/response to steal NTLM authentication hashes [3] [4]. Hashes stolen by attackers can be exploited in pass-the-hash attacks to authenticate to a remote server or service [4]. They can also be used for offline password cracking which, if successful, could be utilized to escalate privileges or perform lateral movement through a target network [4]. Under certain circumstances, these hashes could also permit malicious actors to hijack accounts, access sensitive information and evade security products [4].
The open-source toolkit Impacket, which includes modules for password cracking [5] and which can be identified by the default NTLM server challenge “aaaaaaaaaaaaaaaa”[3], was observed during the SMB sessions. This indicates that TA577 actor aim to use stolen credentials for password cracking and pass-the-hash attacks.
TA577 has previously been associated with Black Basta ransomware infections and Qbot, and has been observed delivering various payloads including IcedID, SystemBC, SmokeLoader, Ursnif, and Cobalt Strike [2].This change in tactic to follow the current trend of credential theft may indicate that not only are TA577 actors aware of which methods are most effective in the current threat landscape, but they also have monetary and time resources needed to create new methods to bypass existing detection tools [3].
Darktrace’s Coverage of TA577 Activity
On February 26 and 27, coinciding with the campaign activity reported by Proofpoint, Darktrace/Email™ observed a surge of inbound emails from numerous suspicious domains targeting multiple customer environments. These emails consistently included zip files with seemingly randomly generated names, containing HTLM content and links to an unusual external IP address [3].
The URL of these links contained an unusually named .txt file, which corresponds with Proofpoint reports of the automatic connection to a text file hosted on an external SMB server made when the attachment is opened [3].
Darktrace identified devices on multiple customer networks connecting to external SMB servers via the SMB protocol. It understood this activity was suspicious as the SMB protocol is typically reserved for internal connections and the endpoint in question had never previously been observed on the network.
During these connections, Darktrace observed multiple devices establishing an SMB session to this server via a NTLM challenge/response, representing the potential theft of the credentials used in this session. During this session, some devices also attempted to access an unusually named .txt file, further indicating that the affected devices were trying to access the .txt file hosted on external SMB servers [3].
Packet captures (PCAPs) of these sessions show the default NTLM server challenge, indicating the use of Impacket, suggesting that the captured NTLM hashes were to be used for password cracking or pass-the-hash-attacks [3]
Conclusions
Ultimately, Darktrace’s suite of products effectively detected and alerted for multiple aspects of the TA577 attack chain and NTLM hash data theft activity across its customer base. Darktrace/Email was able to uncover the inbound phishing emails that served as the initial access vector for TA577 actors, while Darktrace DETECT identified the subsequent external connections to unusual external locations and suspicious SMB sessions.
Furthermore, Darktrace’s anomaly-based approach enabled it to detect suspicious TA577 activity across the customer base on February 26 and 27, prior to Proofpoint’s report on their new attack chain. This showcases Darktrace’s ability to identify emerging threats based on the subtle deviations in a compromised device’s behavior, rather than relying on a static list of indicators of compromise (IoCs) or ‘known bads’.
This approach allows Darktrace to remain one step ahead of increasingly adaptive threat actors, providing organizations and their security teams with a robust AI-driven solution able to safeguard their networks in an ever-evolving threat landscape.
Credit to Charlotte Thompson, Cyber Analyst, Anna Gilbertson, Cyber Analyst.
References
1) https://www.sentinelone.com/cybersecurity-101/what-is-credential-theft/
2) https://malpedia.caad.fkie.fraunhofer.de/actor/ta577
3) https://www.proofpoint.com/us/blog/threat-insight/ta577s-unusual-attack-chain-leads-ntlm-data-theft
5) https://pawanjswal.medium.com/the-power-of-impacket-a-comprehensive-guide-with-examples-1288f3a4c674
7) https://www.hivepro.com/threat-advisory/ta577-targeting-windows-ntlm-hashes-in-global-campaigns/
Darktrace Model Detections
Darktrace/Email
· Attachment / Unsolicited Archive File
· Attachment / Unsolicited Attachment
· Link / New Correspondent Classified Link
· Link / New Correspondent Rare Link
· Spoof / Internal User Similarities
Darktrace DETECT
· Compliance / External Windows Communications
Darktrace RESPOND
· Antigena / Network / Significant Anomaly / Antigena Breaches Over Time Block
IoCs
IoC - Type - Description
176.123.2[.]146 - IP address -Likely malicious SMB Server
89.117.2[.]33 - IP address - Likely malicious SMB Server
89.117.1[.]161 - IP address - Likely malicious SMB Server
104.129.20[.]167 - IP address - Likely malicious SMB Server
89.117.1[.]160 - IP address - Likely malicious SMB Server
85.239.33[.]149 - IP address - Likely malicious SMB Server
89.117.2[.]34 - IP address - Likely malicious SMB Server
146.19.213[.]36 - IP address - Likely malicious SMB Server
66.63.188[.]19 - IP address - Likely malicious SMB Server
103.124.104[.]76 - IP address - Likely malicious SMB Server
103.124.106[.]224 - IP address - Likely malicious SMB Server
\5aohv\9mn.txt - SMB Path and File - SMB Path and File
\hvwsuw\udrh.txt - SMB Path and File - SMB Path and File
\zkf2rj4\VmD.txt = SMB Path and File - SMB Path and File
\naams\p3aV.txt - SMB Path and File - SMB Path and File
\epxq\A.txt - SMB Path and File - SMB Path and File
\dbna\H.txt - SMB Path and File - SMB Path and File
MAGNAMSB.zip – Filename - Phishing Attachment
e751f9dddd24f7656459e1e3a13307bd03ae4e67 - SHA1 Hash - Phishing Attachment
OMNIS2C.zip - Filename - Phishing Attachment
db982783b97555232e28d5a333525118f10942e1 - SHA1 Hash - Phishing Attachment
aaaaaaaaaaaaaaaa - NTLM Server Challenge -Impacket Default NTLM Challenge
MITRE ATT&CK Tactics, Techniques and Procedures (TTPs)
Tactic - Technique
TA0001 Initial Access
TA0002 Execution
TA0008 Lateral Movement
TA0003 Persistence
TA0005 Defense Evasion
TA0006 Credential Access
T1021.002 SMB/Windows Admin Shares
T1021 Remote Services
T1566.001 Spearfishing Attachment
T1566 Phishing
T1204.002 Malicious File
T1204 User Execution
T1021.002 SMB/Windows Admin Shares
T1574 Hijack Execution Flow
T1021 Remote Services
T1555.004 Windows Credential Manager
T1555 Credentials from Password Stores