Blog

Inside the SOC

Understanding Qakbot Infections and Attack Paths | Darktrace

Default blog imageDefault blog imageDefault blog imageDefault blog imageDefault blog imageDefault blog image
05
Apr 2023
05
Apr 2023
Explore the network-based analysis of Qakbot infections with Darktrace. Learn about the various attack paths used by cybercriminals and Darktrace's response.

In an ever-changing threat landscape, security vendors around the world are forced to quickly adapt, react, and respond to known attack vectors and threats. In the face of this, malicious actors are constantly looking for novel ways to gain access to networks. Whether that’s through new exploitations of network vulnerabilities or new delivery methods, attackers and their methods are continually evolving. Although it is valuable for organizations to leverage threat intelligence to keep abreast of known threats to their networks, intelligence alone is not enough to defend against increasingly versatile attackers. Having an autonomous decision maker able to detect and respond to emerging threats, even those employing novel or unknown techniques, is paramount to defend against network compromise.

At the end of January 2023, threat actors began to abuse OneNote attachments to deliver the malware strain, Qakbot, onto users' devices. Widespread adoption of this novel delivery method resulted in a surge in Qakbot infections across Darktrace's customer base between the end of January 2023 and the end of February 2023. Using its Self-Learning AI, Darktrace was able to uncover and respond to these so-called ‘QakNote’ infections as the new trend emerged. Darktrace detected and responded to the threat at multiple stages of the kill chain, preventing damaging and widespread compromise to customer networks.

Qakbot and The Recent Weaponization of OneNote

Qakbot first appeared in 2007 as a banking trojan designed to steal sensitive data such as banking credentials. Since then, Qakbot has evolved into a highly modular, multi-purpose tool, with backdoor, payload delivery, reconnaissance, lateral movement, and data exfiltration capabilities. Although Qakbot's primary delivery method has always been email-based, threat actors have been known to modify their email-based delivery methods of Qakbot in the face of changing circumstances. In the first half of 2022, Microsoft started rolling out versions of Office which block XL4 and VBA macros by default [1]/[2]/[3]. Prior to this change, Qakbot email campaigns typically consisted in the spreading of deceitful emails with Office attachments containing malicious macros. In the face of Microsoft's default blocking of macros, threat actors appeared to cease delivering Qakbot via Office attachments, and shifted to primarily using HTML attachments, through a method known as 'HTML smuggling' [4]/[5]. After the public disclosure [6] of the Follina vulnerability (CVE-2022-30190) in Microsoft Support Diagnostic Tool (MSDT) in May 2022, Qakbot actors were seen capitalizing on the vulnerability to facilitate their email-based delivery of Qakbot payloads [7]/[8]/[9]. 

Given the inclination of Qakbot actors to adapt their email-based delivery methods, it is no surprise that they were quick to capitalize on the novel OneNote-based delivery method which emerged in December 2022. Since December 2022, threat actors have been seen using OneNote attachments to deliver a variety of malware strains, ranging from Formbook [10] to AsynRAT [11] to Emotet [12]. The abuse of OneNote documents to deliver malware is made possible by the fact that OneNote allows for the embedding of executable file types such as HTA files, CMD files, and BAT files. At the end of January 2023, actors started to leverage OneNote attachments to deliver Qakbot [13]/[14]. The adoption of this novel delivery method by Qakbot actors resulted in a surge in Qakbot infections in the wider threat landscape and across the Darktrace customer base.

Observed Activity Chains

Between January 31 and February 24, 2023, Darktrace observed variations of the following pattern of activity across its customer base:

1. User's device contacts OneNote-related endpoint 

2. User's device makes an external GET request with an empty Host header, a target URI whose final segment consists in 5 or 6 digits followed by '.dat', and a User-Agent header referencing either cURL or PowerShell. The GET request is responded to with a DLL file

3. User's device makes SSL connections over ports 443 and 2222 to unusual external endpoints, and makes TCP connections over port 65400 to 23.111.114[.]52

4. User's device makes SSL connections over port 443 to an external host named 'bonsars[.]com' (IP: 194.165.16[.]56) and TCP connections over port 443 to 78.31.67[.]7

5. User’s device makes call to Endpoint Mapper service on internal systems and then connects to the Service Control Manager (SCM) 

6. User's device uploads files with algorithmically generated names and ‘.dll’ or ‘.dll.cfg’ file extensions to SMB shares on internal systems

7. User's device makes Service Control requests to the systems to which it uploaded ‘.dll’ and ‘.dll.cfg’ files 

Further investigation of these chains of activity revealed that they were parts of Qakbot infections initiated via interactions with malicious OneNote attachments. 

Figure 1: Steps of observed QakNote infections.

Delivery Phase

Users' interactions with malicious OneNote attachments, which were evidenced by devices' HTTPS connections to OneNote-related endpoints, such as 'www.onenote[.]com', 'contentsync.onenote[.]com', and 'learningtools.onenote[.]com', resulted in the retrieval of Qakbot DLLs from unusual, external endpoints. In some cases, the user's interaction with the malicious OneNote attachment caused their device to fetch a Qakbot DLL using cURL, whereas, in other cases, it caused their device to download a Qakbot DLL using PowerShell. These different outcomes reflected variations in the contents of the executable files embedded within the weaponized OneNote attachments. In addition to having cURL and PowerShell User-Agent headers, the HTTP requests triggered by interaction with these OneNote attachments had other distinctive features, such as empty host headers and target URIs whose last segment consists in 5 or 6 digits followed by '.dat'. 

Figure 2: Model breach highlighting a user’s device making a HTTP GET request to 198.44.140[.]78 with a PowerShell User-Agent header and the target URI ‘/210/184/187737.dat’.
Figure 3: Model breach highlighting a user’s device making a HTTP GET request to 103.214.71[.]45 with a cURL User-Agent header and the target URI ‘/70802.dat’.
Figure 4: Event Log showing a user’s device making a GET request with a cURL User-Agent header to 185.231.205[.]246 after making an SSL connection to contentsync.onenote[.]com.
Figure 5: Event Log showing a user’s device making a GET request with a cURL User-Agent header to 185.231.205[.]246 after making an SSL connection to www.onenote[.]com.

Command and Control Phase

After fetching Qakbot DLLs, users’ devices were observed making numerous SSL connections over ports 443 and 2222 to highly unusual, external endpoints, as well as large volumes of TCP connections over port 65400 to 23.111.114[.]52. These connections represented Qakbot-infected devices communicating with command and control (C2) infrastructure. Qakbot-infected devices were also seen making intermittent connections to legitimate endpoints, such as 'xfinity[.]com', 'yahoo[.]com', 'verisign[.]com', 'oracle[.]com', and 'broadcom[.]com', likely due to Qakbot making connectivity checks. 

Figure 6: Event Log showing a user’s device contacting Qakbot C2 infrastructure and making connectivity checks to legitimate domains.
Figure 7: Event Log showing a user’s device contacting Qakbot C2 infrastructure and making connectivity checks to legitimate domains.

Cobalt Strike and VNC Phase

After Qakbot-infected devices established communication with C2 servers, they were observed making SSL connections to the external endpoint, bonsars[.]com, and TCP connections to the external endpoint, 78.31.67[.]7. The SSL connections to bonsars[.]com were C2 connections from Cobalt Strike Beacon, and the TCP connections to 78.31.67[.]7 were C2 connections from Qakbot’s Virtual Network Computing (VNC) module [15]/[16]. The occurrence of these connections indicate that actors leveraged Qakbot infections to drop Cobalt Strike Beacon along with a VNC payload onto infected systems. The deployment of Cobalt Strike and VNC likely provided actors with ‘hands-on-keyboard’ access to the Qakbot-infected systems. 

Figure 8: Advanced Search logs showing a user’s device contacting OneNote endpoints, fetching a Qakbot DLL over HTTP, making SSL connections to Qakbot infrastructure and connectivity checks to legitimate domains, and then making SSL connections to the Cobalt Strike endpoint, bonsars[.]com.
Figure 9: Event Log showing a user’s device contacting the Cobalt Strike C2 endpoint, bonsars[.]com, and the VNC C2 endpoint, 78.31.67[.]7, whilst simultaneously contacting the Qakbot C2 endpoint, 47.32.78[.]150.

Lateral Movement Phase

After dropping Cobalt Strike Beacon and a VNC module onto Qakbot-infected systems, actors leveraged their strengthened foothold to connect to the Service Control Manager (SCM) on internal systems in preparation for lateral movement. Before connecting to the SCM, infected systems were seen making calls to the Endpoint Mapper service, likely to identify exposed Microsoft Remote Procedure Call (MSRPC) services on internal systems. The MSRPC service, Service Control Manager (SCM), is known to be abused by Cobalt Strike to create and start services on remote systems. Connections to this service were evidenced by OpenSCManager2  (Opnum: 0x40) and OpenSCManagerW (Opnum: 0xf) calls to the svcctl RPC interface. 

Figure 10: Advanced Search logs showing a user’s device contacting the Endpoint Mapper and Service Control Manager (SCM) services on internal systems. 

After connecting to the SCM on internal systems, infected devices were seen using SMB to distribute files with ‘.dll’ and ‘.dll.cfg’ extensions to SMB shares. These uploads were followed by CreateWowService (Opnum: 0x3c) calls to the svcctl interface, likely intended to execute the uploaded payloads. The naming conventions of the uploaded files indicate that they were Qakbot payloads. 

Figure 11: Advanced Search logs showing a user’s device making Service Control DCE-RPC requests to internal systems after uploading ‘.dll’ and ‘.dll.cfg’ files to them over SMB.

Fortunately, none of the observed QakNote infections escalated further than this. If these infections had escalated, it is likely that they would have resulted in the widespread detonation of additional malicious payloads, such as ransomware.  

Darktrace Coverage of QakNote Activity

Figure 1 shows the steps involved in the QakNote infections observed across Darktrace’s customer base. How far attackers got along this chain was in part determined by the following three factors:

The presence of Darktrace/Email typically stopped QakNote infections from moving past the initial infection stage. The presence of RESPOND/Network significantly slowed down observed activity chains, however, infections left unattended and not mitigated by the security teams were able to progress further along the attack chain. 

Darktrace observed varying properties in the QakNote emails detected across the customer base. OneNote attachments were typically detected as either ‘application/octet-stream’ files or as ‘application/x-tar’ files. In some cases, the weaponized OneNote attachment embedded a malicious file, whereas in other cases, the OneNote file embedded a malicious link (typically a ‘.png’ or ‘.gif’ link) instead. In all cases Darktrace observed, QakNote emails used subject lines starting with ‘RE’ or ‘FW’ to manipulating their recipients into thinking that such emails were part of an existing email chain/thread. In some cases, emails impersonated users known to their recipients by including the names of such users in their header-from personal names. In many cases, QakNote emails appear to have originated from likely hijacked email accounts. These are highly successful methods of social engineering often employed by threat actors to exploit a user’s trust in known contacts or services, convincing them to open malicious emails and making it harder for security tools to detect.

The fact that observed QakNote emails used the fake-reply method, were sent from unknown email accounts, and contained attachments with unusual MIME types, caused such emails to breach the following Darktrace/Email models:

  • Association / Unknown Sender
  • Attachment / Unknown File
  • Attachment / Unsolicited Attachment
  • Attachment / Highly Unusual Mime
  • Attachment / Unsolicited Anomalous Mime
  • Attachment / Unusual Mime for Organisation
  • Unusual / Fake Reply
  • Unusual / Unusual Header TLD
  • Unusual / Fake Reply + Unknown Sender
  • Unusual / Unusual Connection from Unknown
  • Unusual / Off Topic

QakNote emails impersonating known users also breached the following DETECT & RESPOND/Email models:

  • Unusual / Unrelated Personal Name Address
  • Spoof / Basic Known Entity Similarities
  • Spoof / Internal User Similarities
  • Spoof / External User Similarities
  • Spoof / Internal User Similarities + Unrelated Personal Name Address
  • Spoof / External User Similarities + Unrelated Personal Name Address
  • Spoof / Internal User Similarities + Unknown File
  • Spoof / External User Similarities + Fake Reply
  • Spoof / Possible User Spoof from New Address - Enhanced Internal Similarities
  • Spoof / Whale

The actions taken by Darktrace on the observed emails is ultimately determined by Darktrace/Email models are breached. Those emails which did not breach Spoofing models (due to lack of impersonation indicators) received the ‘Convert Attachment’ action. This action converts suspicious attachments into neutralized PDFs, in this case successfully unweaponizing the malicious OneNote attachments. QakNote emails which did breach Spoofing models (due to the presence of impersonation indicators) received the strongest possible action, ‘Hold Message’. This action prevents suspicious emails from reaching the recipients’ mailbox. 

Figure 12: Email log showing a malicious OneNote email (without impersonation indicators) which received a 87% anomaly score, a ‘Move to junk’ action, and a ‘Convert attachment’ actions from Darktrace/Email.
Figure 13: Email log showing a malicious OneNote email (with impersonation indicators) which received an anomaly score of 100% and a ‘Hold message’ action from Darktrace/Email.
Figure 14: Email log showing a malicious OneNote email (with impersonation indicators) which received an anomaly score of 100% and a ‘Hold message’ action from Darktrace/Email.

If threat actors managed to get past the first stage of the QakNote kill chain, likely due to the absence of appropriate email security tools, the execution of the subsequent steps resulted in strong intervention from Darktrace/Network. 

Interactions with malicious OneNote attachments caused their devices to fetch a Qakbot DLL from a remote server via HTTP GET requests with an empty Host header and either a cURL or PowerShell User-Agent header. These unusual HTTP behaviors caused the following Darktrace/Network models to breach:

  • Device / New User Agent
  • Device / New PowerShell User Agent
  • Device / New User Agent and New IP
  • Anomalous Connection / New User Agent to IP Without Hostname
  • Anomalous Connection / Powershell to Rare External
  • Anomalous File / Numeric File Download
  • Anomalous File / EXE from Rare External Location
  • Anomalous File / New User Agent Followed By Numeric File Download

For customers with RESPOND/Network active, these breaches resulted in the following autonomous actions:

  • Enforce group pattern of life for 30 minutes
  • Enforce group pattern of life for 2 hours
  • Block connections to relevant external endpoints over relevant ports for 2 hours   
  • Block all outgoing traffic for 10 minutes
Figure 15: Event Log showing a user’s device receiving Darktrace RESPOND/Network actions after downloading a Qakbot DLL. 
Figure 16: Event Log showing a user’s device receiving Darktrace RESPOND/Network actions after downloading a Qakbot DLL.

Successful, uninterrupted downloads of Qakbot DLLs resulted in connections to Qakbot C2 servers, and subsequently to Cobalt Strike and VNC C2 connections. These C2 activities resulted in breaches of the following DETECT/Network models:

  • Compromise / Suspicious TLS Beaconing To Rare External
  • Compromise / Large Number of Suspicious Successful Connections
  • Compromise / Large Number of Suspicious Failed Connections
  • Compromise / Sustained SSL or HTTP Increase
  • Compromise / Sustained TCP Beaconing Activity To Rare Endpoint
  • Compromise / Beaconing Activity To External Rare
  • Compromise / Slow Beaconing Activity To External Rare
  • Anomalous Connection / Multiple Connections to New External TCP Port
  • Anomalous Connection / Multiple Failed Connections to Rare Endpoint
  • Device / Initial Breach Chain Compromise

For customers with RESPOND/Network active, these breaches caused RESPOND to autonomously perform the following actions:

  • Block connections to relevant external endpoints over relevant ports for 1 hour
Figure 17: Event Log showing a user’s device receiving RESPOND/Network actions after contacting the Qakbot C2 endpoint,  Cobalt Strike C2 endpoint, bonsars[.]com.

In cases where C2 connections were allowed to continue, actors attempted to move laterally through usage of SMB and Service Control Manager. This lateral movement activity caused the following DETECT/Network models to breach:

  • Device / Possible SMB/NTLM Reconnaissance
  • Anomalous Connection / New or Uncommon Service Control 

For customers with RESPOND/Network enabled, these breaches caused RESPOND to autonomously perform the following actions:

  • Block connections to relevant internal endpoints over port 445 for 1 hour
Figure 18: Event Log shows a user’s device receiving RESPOND/Network actions after contacting the Qakbot C2 endpoint, 5.75.205[.]43, and distributing ‘.dll’ and ‘.dll.cfg’ files internally.

The QakNote infections observed across Darktrace’s customer base involved several steps, each of which elicited alerts and autonomous preventative actions from Darktrace. By autonomously investigating the alerts from DETECT, Darktrace’s Cyber AI Analyst was able to connect the distinct steps of observed QakNote infections into single incidents. It then produced incident logs to present in-depth details of the activity it uncovered, provide full visibility for customer security teams.

Figure 19: AI Analyst incident entry showing the steps of a QakNote infection which AI Analyst connected following its autonomous investigations.

Conclusion

Faced with the emerging threat of QakNote infections, Darktrace demonstrated its ability to autonomously detect and respond to arising threats in a constantly evolving threat landscape. The attack chains which Darktrace observed across its customer base involved the delivery of Qakbot via malicious OneNote attachments, the usage of ports 65400 and 2222 for Qakbot C2 communication, the usage of Cobalt Strike Beacon and VNC for ‘hands-on-keyboard’ activity, and the usage of SMB and Service Control Manager for lateral movement. 

Despite the novelty of the OneNote-based delivery method, Darktrace was able to identify QakNote infections across its customer base at various stages of the kill chain, using its autonomous anomaly-based detection to identify unusual activity or deviations from expected behavior. When active, Darktrace/Email neutralized malicious QakNote attachments sent to employees. In cases where Darktrace/Email was not active, Darktrace/Network detected and slowed down the unusual network activities which inevitably ensued from Qakbot infections. Ultimately, this intervention from Darktrace’s products prevented infections from leading to further harmful activity, such as data exfiltration and the detonation of ransomware.

Darktrace is able to offer customers an unparalleled level of network security by combining both Darktrace/Network and Darktrace/Email, safeguarding both their email and network environments. With its suite of products, including DETECT and RESPOND, Darktrace can autonomously uncover threats to customer networks and instantaneously intervene to prevent suspicious activity leading to damaging compromises. 

Appendices

MITRE ATT&CK Mapping 

Initial Access:

T1566.001 – Phishing: Spearphishing Attachment

Execution:

T1204.001 – User Execution: Malicious Link

T1204.002 – User Execution: Malicious File

T1569.002 – System Services: Service Execution

Lateral Movement:

T1021.002 – Remote Services: SMB/Windows Admin Shares

Command and Control:

T1573.002 – Encrypted Channel : Asymmetric Cryptography

T1571 – Non-Standard Port 

T1105 – Ingress Tool Transfer

T1095 –  Non-Application Layer Protocol

T1219 – Remote Access Software

List of IOCs

IP Addresses and/or Domain Names:

- 103.214.71[.]45 - Qakbot download infrastructure 

- 141.164.35[.]94 - Qakbot download infrastructure 

- 95.179.215[.]225 - Qakbot download infrastructure 

- 128.254.207[.]55 - Qakbot download infrastructure

- 141.164.35[.]94 - Qakbot download infrastructure

- 172.96.137[.]149 - Qakbot download infrastructure

- 185.231.205[.]246 - Qakbot download infrastructure

- 216.128.146[.]67 - Qakbot download infrastructure 

- 45.155.37[.]170 - Qakbot download infrastructure

- 85.239.41[.]55 - Qakbot download infrastructure

- 45.67.35[.]108 - Qakbot download infrastructure

- 77.83.199[.]12 - Qakbot download infrastructure 

- 45.77.63[.]210 - Qakbot download infrastructure 

- 198.44.140[.]78 - Qakbot download infrastructure

- 47.32.78[.]150 - Qakbot C2 infrastructure

- 197.204.13[.]52 - Qakbot C2 infrastructure

- 68.108.122[.]180 - Qakbot C2 infrastructure

- 2.50.48[.]213 - Qakbot C2 infrastructure

- 66.180.227[.]60 - Qakbot C2 infrastructure

- 190.206.75[.]58 - Qakbot C2 infrastructure

- 109.150.179[.]236 - Qakbot C2 infrastructure

- 86.202.48[.]142 - Qakbot C2 infrastructure

- 143.159.167[.]159 - Qakbot C2 infrastructure

- 5.75.205[.]43 - Qakbot C2 infrastructure

- 184.176.35[.]223 - Qakbot C2 infrastructure 

- 208.187.122[.]74 - Qakbot C2 infrastructure

- 23.111.114[.]52 - Qakbot C2 infrastructure 

- 74.12.134[.]53 – Qakbot C2 infrastructure

- bonsars[.]com • 194.165.16[.]56 - Cobalt Strike C2 infrastructure 

- 78.31.67[.]7 - VNC C2 infrastructure

Target URIs of GET Requests for Qakbot DLLs:

- /70802.dat 

- /51881.dat

- /12427.dat

- /70136.dat

- /35768.dat

- /41981.dat

- /30622.dat

- /72286.dat

- /46557.dat

- /33006.dat

- /300332.dat

- /703558.dat

- /760433.dat

- /210/184/187737.dat

- /469/387/553748.dat

- /282/535806.dat

User-Agent Headers of GET Requests for Qakbot DLLs:

- curl/7.83.1

- curl/7.55.1

- Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.19041.2364

- Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.17763.3770

- Mozilla/5.0 (Windows NT; Windows NT 10.0; en-GB) WindowsPowerShell/5.1.19041.2364

SHA256 Hashes of Downloaded Qakbot DLLs:  

- 83e9bdce1276d2701ff23b1b3ac7d61afc97937d6392ed6b648b4929dd4b1452

- ca95a5dcd0194e9189b1451fa444f106cbabef3558424d9935262368dba5f2c6 

- fa067ff1116b4c8611eae9ed4d59a19d904a8d3c530b866c680a7efeca83eb3d

- e6853589e42e1ab74548b5445b90a5a21ff0d7f8f4a23730cffe285e2d074d9e

- d864d93b8fd4c5e7fb136224460c7b98f99369fc9418bae57de466d419abeaf6

- c103c24ccb1ff18cd5763a3bb757ea2779a175a045e96acbb8d4c19cc7d84bea

Names of Internally Distributed Qakbot DLLs: 

- rpwpmgycyzghm.dll

- rpwpmgycyzghm.dll.cfg

- guapnluunsub.dll

- guapnluunsub.dll.cfg

- rskgvwfaqxzz.dll

- rskgvwfaqxzz.dll.cfg

- hkfjhcwukhsy.dll

- hkfjhcwukhsy.dll.cfg

- uqailliqbplm.dll

- uqailliqbplm.dll.cfg

- ghmaorgvuzfos.dll

- ghmaorgvuzfos.dll.cfg

Links Found Within Neutralized QakNote Email Attachments:

- hxxps://khatriassociates[.]com/MBt/3.gif

- hxxps://spincotech[.]com/8CoBExd/3.gif

- hxxps://minaato[.]com/tWZVw/3.gif

- hxxps://famille2point0[.]com/oghHO/01.png

- hxxps://sahifatinews[.]com/jZbaw/01.png

- hxxp://87.236.146[.]112/62778.dat

- hxxp://87.236.146[.]112/59076.dat

- hxxp://185.231.205[.]246/73342.dat

References

[1] https://techcommunity.microsoft.com/t5/excel-blog/excel-4-0-xlm-macros-now-restricted-by-default-for-customer/ba-p/3057905

[2] https://techcommunity.microsoft.com/t5/microsoft-365-blog/helping-users-stay-safe-blocking-internet-macros-by-default-in/ba-p/3071805

[3] https://learn.microsoft.com/en-us/deployoffice/security/internet-macros-blocked

[4] https://www.cyfirma.com/outofband/html-smuggling-a-stealthier-approach-to-deliver-malware/

[5] https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/html-smuggling-the-hidden-threat-in-your-inbox/

[6] https://twitter.com/nao_sec/status/1530196847679401984

[7] https://www.fortiguard.com/threat-signal-report/4616/qakbot-delivered-through-cve-2022-30190-follina

[8] https://isc.sans.edu/diary/rss/28728

[9] https://darktrace.com/blog/qakbot-resurgence-evolving-along-with-the-emerging-threat-landscape

[10] https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/trojanized-onenote-document-leads-to-formbook-malware/

[11] https://www.proofpoint.com/uk/blog/threat-insight/onenote-documents-increasingly-used-to-deliver-malware

[12] https://www.malwarebytes.com/blog/threat-intelligence/2023/03/emotet-onenote

[13] https://blog.cyble.com/2023/02/01/qakbots-evolution-continues-with-new-strategies/

[14] https://news.sophos.com/en-us/2023/02/06/qakbot-onenote-attacks/

[15] https://isc.sans.edu/diary/rss/29210

[16] https://unit42.paloaltonetworks.com/feb-wireshark-quiz-answers/

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
ABOUT ThE AUTHOR
Sam Lister
SOC Analyst
Connor Mooney
SOC Analyst
Book a 1-1 meeting with one of our experts
share this article
USE CASES
No items found.
PRODUCT SPOTLIGHT
No items found.
COre coverage

More in this series

No items found.

Blog

Email

How to Protect your Organization Against Microsoft Teams Phishing Attacks

Default blog imageDefault blog image
21
May 2024

The problem: Microsoft Teams phishing attacks are on the rise

Around 83% of Fortune 500 companies rely on Microsoft Office products and services1, with Microsoft Teams and Microsoft SharePoint in particular emerging as critical platforms to the business operations of the everyday workplace. Researchers across the threat landscape have begun to observe these legitimate services being leveraged more and more by malicious actors as an initial access method.

As Teams becomes a more prominent feature of the workplace many employees rely on it for daily internal and external communication, even surpassing email usage in some organizations. As Microsoft2 states, "Teams changes your relationship with email. When your whole group is working in Teams, it means you'll all get fewer emails. And you'll spend less time in your inbox, because you'll use Teams for more of your conversations."

However, Teams can be exploited to send targeted phishing messages to individuals either internally or externally, while appearing legitimate and safe. Users might receive an external message request from a Teams account claiming to be an IT support service or otherwise affiliated with the organization. Once a user has accepted, the threat actor can launch a social engineering campaign or deliver a malicious payload. As a primarily internal tool there is naturally less training and security awareness around Teams – due to the nature of the channel it is assumed to be a trusted source, meaning that social engineering is already one step ahead.

Screenshot of a Microsoft Teams message request from a Midnight Blizzard-controlled account (courtesy of Microsoft)
Figure 1: Screenshot of a Microsoft Teams message request from a Midnight Blizzard-controlled account (courtesy of Microsoft)

Microsoft Teams Phishing Examples

Microsoft has identified several major phishing attacks using Teams within the past year.

In July 2023, Microsoft announced that the threat actor known as Midnight Blizzard – identified by the United States as a Russian state-sponsored group – had launched a series of phishing campaigns via Teams with the aim of stealing user credentials. These attacks used previously compromised Microsoft 365 accounts and set up new domain names that impersonated legitimate IT support organizations. The threat actors then used social engineering tactics to trick targeted users into sharing their credentials via Teams, enabling them to access sensitive data.  

At a similar time, threat actor Storm-0324 was observed sending phishing lures via Teams containing links to malicious SharePoint-hosted files. The group targeted organizations that allow Teams users to interact and share files externally. Storm-0324’s goal is to gain initial access to hand over to other threat actors to pursue more dangerous follow-on attacks like ransomware.

For a more in depth look at how Darktrace stops Microsoft Teams phishing read our blog: Don’t Take the Bait: How Darktrace Keeps Microsoft Teams Phishing Attacks at Bay

The market: Existing Microsoft Teams security solutions are insufficient

Microsoft’s native Teams security focuses on payloads, namely links and attachments, as the principal malicious component of any phishing. These payloads are relatively straightforward to detect with their experience in anti-virus, sandboxing, and IOCs. However, this approach is unable to intervene before the stage at which payloads are delivered, before the user even gets the chance to accept or deny an external message request. At the same time, it risks missing more subtle threats that don’t include attachments or links – like early stage phishing, which is pure social engineering – or completely new payloads.

Equally, the market offering for Teams security is limited. Security solutions available on the market are always payload-focused, rather than taking into account the content and context in which a link or attachment is sent. Answering questions like:

  • Does it make sense for these two accounts to speak to each other?
  • Are there any linguistic indicators of inducement?

Furthermore, they do not correlate with email to track threats across multiple communication environments which could signal a wider campaign. Effectively, other market solutions aren’t adding extra value – they are protecting against the same types of threats that Microsoft is already covering by default.

The other aspect of Teams security that native and market solutions fail to address is the account itself. As well as focusing on Teams threats, it’s important to analyze messages to understand the normal mode of communication for a user, and spot when a user’s Teams activity might signal account takeover.

The solution: How Darktrace protects Microsoft Teams against sophisticated threats

With its biggest update to Darktrace/Email ever, Darktrace now offers support for Microsoft Teams. With that, we are bringing the same AI philosophy that protects your email and accounts to your messaging environment.  

Our Self-Learning AI looks at content and context for every communication, whether that’s sent in an email or Teams message. It looks at actual user behavior, including language patterns, relationship history of sender and recipient, tone and payloads, to understand if a message poses a threat. This approach allows Darktrace to detect threats such as social engineering and payloadless attacks using visibility and forensic capabilities that Microsoft security doesn’t currently offer, as well as early symptoms of account compromise.  

Unlike market solutions, Darktrace doesn’t offer a siloed approach to Teams security. Data and signals from Teams are shared across email to inform detection, and also with the wider Darktrace ActiveAI security platform. By correlating information from email and Teams with network and apps security, Darktrace is able to better identify suspicious Teams activity and vice versa.  

Interested in the other ways Darktrace/Email augments threat detection? Read our latest blog on how improving the quality of end-user reporting can decrease the burden on the SOC. To find our more about Darktrace's enduring partnership with Microsoft, click here.

References

[1] Essential Microsoft Office Statistics in 2024

[2] Microsoft blog, Microsoft Teams and email, living in harmony, 2024

Continue reading
About the author
Carlos Gray
Product Manager

Blog

Inside the SOC

Don’t Take the Bait: How Darktrace Keeps Microsoft Teams Phishing Attacks at Bay

Default blog imageDefault blog image
20
May 2024

Social Engineering in Phishing Attacks

Faced with increasingly cyber-aware endpoint users and vigilant security teams, more and more threat actors are forced to think psychologically about the individuals they are targeting with their phishing attacks. Social engineering methods like taking advantage of the human emotions of their would-be victims, pressuring them to open emails or follow links or face financial or legal repercussions, and impersonating known and trusted brands or services, have become common place in phishing campaigns in recent years.

Phishing with Microsoft Teams

The malicious use of the popular communications platform Microsoft Teams has become widely observed and discussed across the threat landscape, with many organizations adopting it as their primary means of business communication, and many threat actors using it as an attack vector. As Teams allows users to communicate with people outside of their organization by default [1], it becomes an easy entry point for potential attackers to use as a social engineering vector.

In early 2024, Darktrace/Apps™ identified two separate instances of malicious actors using Microsoft Teams to launch a phishing attack against Darktrace customers in the Europe, the Middle East and Africa (EMEA) region. Interestingly, in this case the attackers not only used a well-known legitimate service to carry out their phishing campaign, but they were also attempting to impersonate an international hotel chain.

Despite these attempts to evade endpoint users and traditional security measures, Darktrace’s anomaly detection enabled it to identify the suspicious phishing messages and bring them to the customer’s attention. Additionally, Darktrace’s autonomous response capability, was able to follow-up these detections with targeted actions to contain the suspicious activity in the first instance.

Darktrace Coverage of Microsoft Teams Phishing

Chats Sent by External User and Following Actions by Darktrace

On February 29, 2024, Darktrace detected the presence of a new external user on the Software-as-a-Service (SaaS) environment of an EMEA customer for the first time. The user, “REDACTED@InternationalHotelChain[.]onmicrosoft[.]com” was only observed on this date and no further activities were detected from this user after February 29.

Later the same day, the unusual external user created its first chat on Microsoft Teams named “New Employee Loyalty Program”. Over the course of around 5 minutes, the user sent 63 messages across 21 different chats to unique internal users on the customer’s SaaS platform. All these chats included the ‘foreign tenant user’ and one of the customer’s internal users, likely in an attempt to remain undetected. Foreign tenant user, in this case, refers to users without access to typical internal software and privileges, indicating the presence of an external user.

Darktrace’s detection of unusual messages being sent by a suspicious external user via Microsoft Teams.
Figure 1: Darktrace’s detection of unusual messages being sent by a suspicious external user via Microsoft Teams.
Advanced Search results showing the presence of a foreign tenant user on the customer’s SaaS environment.
Figure 2: Advanced Search results showing the presence of a foreign tenant user on the customer’s SaaS environment.

Darktrace identified that the external user had connected from an unusual IP address located in Poland, 195.242.125[.]186. Darktrace understood that this was unexpected behavior for this user who had only previously been observed connecting from the United Kingdom; it further recognized that no other users within the customer’s environment had connected from this external source, thereby deeming it suspicious. Further investigation by Darktrace’s analyst team revealed that the endpoint had been flagged as malicious by several open-source intelligence (OSINT) vendors.

External Summary highlighting the rarity of the rare external source from which the Teams messages were sent.
Figure 3: External Summary highlighting the rarity of the rare external source from which the Teams messages were sent.

Following Darktrace’s initial detection of these suspicious Microsoft Teams messages, Darktrace's autonomous response was able to further support the customer by providing suggested mitigative actions that could be applied to stop the external user from sending any additional phishing messages.

Unfortunately, at the time of this attack Darktrace's autonomous response capability was configured in human confirmation mode, meaning any autonomous response actions had to be manually actioned by the customer. Had it been enabled in autonomous response mode, it would have been able promptly disrupt the attack, disabling the external user to prevent them from continuing their phishing attempts and securing precious time for the customer’s security team to begin their own remediation procedures.

Darktrace autonomous response actions that were suggested following the ’Large Volume of Messages Sent from New External User’ detection model alert.
Figure 4: Darktrace autonomous response actions that were suggested following the ’Large Volume of Messages Sent from New External User’ detection model alert.

External URL Sent within Teams Chats

Within the 21 Teams chats created by the threat actor, Darktrace identified 21 different external URLs being sent, all of which included the domain "cloud-sharcpoint[.]com”. Many of these URLs had been recently established and had been flagged as malicious by OSINT providers [3]. This was likely an attempt to impersonate “cloud-sharepoint[.]com”, the legitimate domain of Microsoft SharePoint, with the threat actor attempting to ‘typo-squat’ the URL to convince endpoint users to trust the legitimacy of the link. Typo-squatted domains are commonly misspelled URLs registered by opportunistic attackers in the hope of gaining the trust of unsuspecting targets. They are often used for nefarious purposes like dropping malicious files on devices or harvesting credentials.

Upon clicking this malicious link, users were directed to a similarly typo-squatted domain, “InternatlonalHotelChain[.]sharcpoInte-docs[.]com”. This domain was likely made to appear like the SharePoint URL used by the international hotel chain being impersonated.

Redirected link to a fake SharePoint page attempting to impersonate an international hotel chain.
Figure 5: Redirected link to a fake SharePoint page attempting to impersonate an international hotel chain.

This fake SharePoint page used the branding of the international hotel chain and contained a document named “New Employee Loyalty Program”; the same name given to the phishing messages sent by the attacker on Microsoft Teams. Upon accessing this file, users would be directed to a credential harvester, masquerading as a Microsoft login page, and prompted to enter their credentials. If successful, this would allow the attacker to gain unauthorized access to a user’s SaaS account, thereby compromising the account and enabling further escalation in the customer’s environment.

Figure 6: A fake Microsoft login page that popped-up when attempting to open the ’New Employee Loyalty Program’ document.

This is a clear example of an attacker attempting to leverage social engineering tactics to gain the trust of their targets and convince them to inadvertently compromise their account. Many corporate organizations partner with other companies and well-known brands to offer their employees loyalty programs as part of their employment benefits and perks. As such, it would not necessarily be unexpected for employees to receive such an offer from an international hotel chain. By impersonating an international hotel chain, threat actors would increase the probability of convincing their targets to trust and click their malicious messages and links, and unintentionally compromising their accounts.

In spite of the attacker’s attempts to impersonate reputable brands, platforms, Darktrace/Apps was able to successfully recognize the malicious intent behind this phishing campaign and suggest steps to contain the attack. Darktrace recognized that the user in question had deviated from its ‘learned’ pattern of behavior by connecting to the customer’s SaaS environment from an unusual external location, before proceeding to send an unusually large volume of messages via Teams, indicating that the SaaS account had been compromised.

A Wider Campaign?

Around a month later, in March 2024, Darktrace observed a similar incident of a malicious actor impersonating the same international hotel chain in a phishing attacking using Microsoft Teams, suggesting that this was part of a wider phishing campaign. Like the previous example, this customer was also based in the EMEA region.  

The attack tactics identified in this instance were very similar to the previously example, with a new external user identified within the network proceeding to create a series of Teams messages named “New Employee Loyalty Program” containing a typo-squatted external links.

There were a few differences with this second incident, however, with the attacker using the domain “@InternationalHotelChainExpeditions[.]onmicrosoft[.]com” to send their malicious Teams messages and using differently typo-squatted URLs to imitate Microsoft SharePoint.

As both customers targeted by this phishing campaign were subscribed to Darktrace’s Proactive Threat Notification (PTN) service, this suspicious SaaS activity was promptly escalated to the Darktrace Security Operations Center (SOC) for immediate triage and investigation. Following their investigation, the SOC team sent an alert to the customers informing them of the compromise and advising urgent follow-up.

Conclusion

While there are clear similarities between these Microsoft Teams-based phishing attacks, the attackers here have seemingly sought ways to refine their tactics, techniques, and procedures (TTPs), leveraging new connection locations and creating new malicious URLs in an effort to outmaneuver human security teams and conventional security tools.

As cyber threats grow increasingly sophisticated and evasive, it is crucial for organizations to employ intelligent security solutions that can see through social engineering techniques and pinpoint suspicious activity early.

Darktrace’s Self-Learning AI understands customer environments and is able to recognize the subtle deviations in a device’s behavioral pattern, enabling it to effectively identify suspicious activity even when attackers adapt their strategies. In this instance, this allowed Darktrace to detect the phishing messages, and the malicious links contained within them, despite the seemingly trustworthy source and use of a reputable platform like Microsoft Teams.

Credit to Min Kim, Cyber Security Analyst, Raymond Norbert, Cyber Security Analyst and Ryan Traill, Threat Content Lead

Appendix

Darktrace Model Detections

SaaS Model

Large Volume of Messages Sent from New External User

SaaS / Unusual Activity / Large Volume of Messages Sent from New External User

Indicators of Compromise (IoCs)

IoC – Type - Description

https://cloud-sharcpoint[.]com/[a-zA-Z0-9]{15} - Example hostname - Malicious phishing redirection link

InternatlonalHotelChain[.]sharcpolnte-docs[.]com – Hostname – Redirected Link

195.242.125[.]186 - External Source IP Address – Malicious Endpoint

MITRE Tactics

Tactic – Technique

Phishing – Initial Access (T1566)

References

[1] https://learn.microsoft.com/en-us/microsoftteams/trusted-organizations-external-meetings-chat?tabs=organization-settings

[2] https://www.virustotal.com/gui/ip-address/195.242.125.186/detection

[3] https://www.virustotal.com/gui/domain/cloud-sharcpoint.com

Continue reading
About the author
Min Kim
Cyber Security Analyst
Our ai. Your data.

Elevate your cyber defenses with Darktrace AI

Start your free trial
Darktrace AI protecting a business from cyber threats.