Blog
/
No items found.
/
December 9, 2024
No items found.

Darktrace’s view on Operation Lunar Peek: Exploitation of Palo Alto firewall devices (CVE 2024-2012 and 2024-9474)

Default blog imageDefault blog imageDefault blog imageDefault blog imageDefault blog imageDefault blog image
09
Dec 2024
Darktrace’s Threat Research team investigated a major campaign exploiting vulnerabilities in Palo Alto firewall devices (CVE 2024-2012 and 2024-9474). Learn about the spike in post-exploitation activities and understand the need for anomaly-based detection to stay ahead of evolving threats.

Introduction: Spike in exploitation and post-exploitation activity affecting Palo Alto firewall devices

As the first line of defense for many organizations, perimeter devices such as firewalls are frequently targeted by threat actors. If compromised, these devices can serve as the initial point of entry to the network, providing access to vulnerable internal resources. This pattern of malicious behavior has become readily apparent within the Darktrace customer base. In 2024, Darktrace Threat Research analysts identified and investigated at least two major campaigns targeting internet-exposed perimeter devices. These included the exploitation of PAN-OS firewall exploitation via CVE 2024-3400 and FortiManager appliances via CVE 2024-47575.

More recently, at the end of November, Darktrace analysts observed a spike in exploitation and post-exploitation activity affecting, once again, Palo Alto firewall devices in the days following the disclosure of the CVE 2024-0012 and CVE-2024-9474 vulnerabilities.

Threat Research analysts had already been investigating potential exploitation of the firewalls’ management interface after Palo Alto published a security advisory (PAN-SA-2024-0015) on November 8. Subsequent analysis of data from Darktrace’s Security Operations Center (SOC) and external research uncovered multiple cases of Palo Alto firewalls being targeted via the likely exploitation of these vulnerabilities since November 13, through the end of the month. Although this spike in anomalous behavior may not be attributable to a single malicious actor, Darktrace Threat Research identified a clear increase in PAN-OS exploitation across the customer base by threat actors likely utilizing the recently disclosed vulnerabilities, resulting in broad patterns of post-exploitation activity.

How did exploitation occur?

CVE 2024-0012 is an authentication bypass vulnerability affecting unpatched versions of Palo Alto Networks Next-Generation Firewalls. The vulnerability resides in the management interface application on the firewalls specifically, which is written in PHP. When attempting to access highly privileged scripts, users are typically redirected to a login page. However, this can be bypassed by supplying an HTTP request where a Palo Alto related authentication header can be set to “off”.  Users can supply this header value to the Nginx reverse proxy server fronting the application which will then send it without any prior processing [1].

CVE-2024-9474 is a privilege escalation vulnerability that allows a PAN-OS administrator with access to the management web interface to execute root-level commands, granting full control over the affected device [2]. When combined, these vulnerabilities enable unauthenticated adversaries to execute arbitrary commands on the firewall with root privileges.

Post-Exploitation Patterns of Activity

Darktrace Threat Research analysts examined potential indicators of PAN-OS software exploitation via CVE 2024-0012 and CVE-2024-9474 during November 2024. The investigation identified three main groupings of post-exploitation activity:

  1. Exploit validation and initial payload retrieval
  2. Command and control (C2) connectivity, potentially featuring further binary downloads
  3. Potential reconnaissance and cryptomining activity

Exploit Validation

Across multiple investigated customers, Darktrace analysts identified likely vulnerable PAN-OS devices conducting external network connectivity to bin services. Specifically, several hosts performed DNS queries for, and HTTP requests to Out-of-Band Application Security Testing (OAST) domains, such as csv2im6eq58ujueonqs0iyq7dqpak311i.oast[.]pro. These endpoints are commonly used by network administrators to harden defenses, but they are increasingly used by threat actors to verify successful exploitation of targeted devices and assess their potential for further compromise. Although connectivity involving OAST domains were prevalent across investigated incidents, this activity was not necessarily the first indicator observed. In some cases, device behavior involving OAST domains also occurred shortly after an initial payload was downloaded.

Darktrace model alert logs detailing the HTTP request to an OAST domain immediately following PAN-OS device compromise.
Figure 1: Darktrace model alert logs detailing the HTTP request to an OAST domain immediately following PAN-OS device compromise.

Initial Payload Retrieval

Following successful exploitation, affected devices commonly performed behaviors indicative of initial payload download, likely in response to incoming remote command execution. Typically, the affected PAN-OS host would utilize the command line utilities curl and Wget, seen via use of user agents curl/7.61.1 and Wget/1.19.5 (linux-gnu), respectively.

In some cases, the use of these command line utilities by the infected devices was considered new behavior. Given the nature of the user agents, interaction with the host shell suggests remote command execution to achieve the outgoing payload requests.

While additional binaries and scripts were retrieved in later stages of the post-exploitation activity in some cases, this set of behaviors and payloads likely represent initial persistence and execution mechanisms that will enable additional functionality later in the kill chain. During the investigation, Darktrace analysts noted the prevalence of shell script payload requests. Devices analyzed would frequently make HTTP requests over the usual destination port 80 using the command line URL utility (curl), as seen in the user-agent field.

The observed URIs often featured requests for text files, such as “1.txt”, or shell scripts such as “y.sh”. Although packet capture (PCAP) samples were unavailable for review, external researchers have noted that the IP address hosting such “1.txt” files (46.8.226[.]75) serves malicious PHP payloads. When examining the contents of the “y.sh” shell script, Darktrace analysts noticed the execution of bash commands to upload a PHP-written web shell on the affected server.

PCAP showing the client request and server response associated with the download of the y.sh script from 45.76.141[.]166. The body content of the HTTP response highlights a shebang command to run subsequent code as bash script. The content is base64 encoded and details PHP script for what appears to be a webshell that will likely be written to the firewall device.
Figure 2: PCAP showing the client request and server response associated with the download of the y.sh script from 45.76.141[.]166. The body content of the HTTP response highlights a shebang command to run subsequent code as bash script. The content is base64 encoded and details PHP script for what appears to be a webshell that will likely be written to the firewall device.

While not all investigated cases saw initial shell script retrieval, affected systems would commonly make an external HTTP connection, almost always via Wget, for the Executable and Linkable Format (ELF) file “/palofd” from the rare external IP  38.180.147[.]18.

Such requests were frequently made without prior hostname lookups, suggesting that the process or script initiating the requests already contained the external IP address. Analysts noticed a consistent SHA1 hash present for all identified instances of “/palofd” downloads (90f6890fa94b25fbf4d5c49f1ea354a023e06510). Multiple open-source intelligence (OSINT) vendors have associated this hash sample with Spectre RAT, a remote access trojan with capabilities including remote command execution, payload delivery, process manipulation, file transfers, and data theft [3][4].

Advanced Search log metrics highlighting details of the “/palofd” file download over HTTP.
Figure 3: Advanced Search log metrics highlighting details of the “/palofd” file download over HTTP.

Several targeted customer devices were observed initiating TLS/SSL connections to rare external IPs with self-signed TLS certificates following exploitation. Model data from across the Darktrace fleet indicated some overlap in JA3 fingerprints utilized by affected PAN-OS devices engaging in the suspicious TLS activity. Although JA3 hashes alone cannot be used for process attribution, this evidence suggests some correlation of source process across instances of PAN-OS exploitation.

These TLS/SSL sessions were typically established without the specification of a Server Name Indication (SNI) within the TLS extensions. The SNI extension prevents servers from supplying an incorrect certificate to the requesting client when multiple sites are hosted on the same IP. SSL connectivity without SNI specification suggests a potentially malicious running process as most software establishing TLS sessions typically supply this information during the handshake. Although the encrypted nature of the connection prevented further analysis of the payload packets, external sources note that JavaScript content is transmitted during these sessions, serving as initial payloads for the Sliver C2 platform using Wget [5].

C2 Communication and Additional Payloads

Following validation and preliminary post-compromise actions, examined hosts would commonly initiate varying forms of C2 connectivity. During this time, devices were frequently detected making further payload downloads, likely in response to directives set within C2 communications.

Palo Alto firewalls likely exploited via the newly disclosed CVEs would commonly utilize the Sliver C2 platform for external communication. Sliver’s functionality allows for different styles and formatting for communication. An open-source alternative to Cobalt Strike, this framework has been increasingly popular among threat actors, enabling the generation of dynamic payloads (“slivers”) for multiple platforms, including Windows, MacOS, Linux.

These payloads allow operators to establish persistence, spawn new shells, and exfiltrate data. URI patterns and PCAPs analysis yielded evidence of both English word type encoding within Sliver and Gzip formatting.

For example, multiple devices contacted the Sliver-linked IP address 77.221.158[.]154 using HTTP to retrieve Gzip files. The URIs present for these requests follow known Sliver Gzip formatted communication patterns [6]. Investigations yielded evidence of both English word encoding within Sliver, identified through PCAP analysis, and Gzip formatting.

Sample of URIs observed in Advanced Searchhighlighting HTTP requests to 77.221.158[.]154 for Gzip content suggest of Sliver communication.
Figure 4: Sample of URIs observed in Advanced Searchhighlighting HTTP requests to 77.221.158[.]154 for Gzip content suggest of Sliver communication.
PCAP showing English word encoding for Sliver communication observed during post-exploitation C2 activity.
Figure 5: PCAP showing English word encoding for Sliver communication observed during post-exploitation C2 activity.

External connectivity during this phase also featured TCP connection attempts over uncommon ports for common application protocols. For both Sliver and non-Sliver related IP addresses, devices utilized destination ports such as 8089, 3939, 8880, 8084, and 9999 for the HTTP protocol. The use of uncommon destination ports may represent attempts to avoid detection of connectivity to rare external endpoints. Moreover, some external beaconing within included URIs referencing the likely IP of the affected device. Such behavior can suggest the registration of compromised devices with command servers.

Targeted devices also proceeded to download additional payloads from rare external endpoints as beaconing/C2 activity was ongoing. For example, the newly registered domain repositorylinux[.]org (IP: 103.217.145[.]112) received numerous HTTP GET requests from investigated devices throughout the investigation period for script files including “linux.sh” and “cron.sh”. Young domains, especially those that present as similar to known code repositories, tend to host harmful content. Packet captures of the cron.sh file reveal commands within the HTTP body content involving crontab operations, likely to schedule future downloads. Some hosts that engaged in connectivity to the fake repository domain were later seen conducting crypto-mining connections, potentially highlighting the download of miner applications from the domain.

Additional payloads observed during this time largely featured variations of shell scripts, PHP content, and/or executables. Typically, shell scripts direct the device to retrieve additional content from external servers or repositories or contain potential configuration details for subsequent binaries to run on the device. For example, the “service.sh” retrieves a tar-compressed archive, a configuration JSON file as well as a file with the name “solr” from GitHub, potentially associated with the Apache Solr tool used for enterprise search. These could be used for further enumeration of the host and/or the network environment. PHP scripts observed may involve similar web shell functionality and were retrieved from both rare external IPs identified as well by external researchers [7]. Darktrace also detected the download of octet-stream data occurring mid-compromise from an Amazon Web Services (AWS) S3 bucket. Although no outside research confirmed the functionality, additional executable downloads for files such as “/initd”(IP: 178.215.224[.]246) and “/x6” (IP: 223.165.4[.]175) may relate to tool ingress, further Trojan/backdoor functionality, or cryptocurrency mining.

Figure 7: PCAP specifying the HTTP response headers and body content for the service.sh file request. The body content shown includes variable declarations for URLs that will eventually be called by the device shell via bash command.

Reconnaissance and Cryptomining

Darktrace analysts also noticed additional elements of kill chain operations from affected devices after periods of initial exploit activity. Several devices initiated TCP connections to endpoints affiliated with cryptomining pools such as us[.]zephyr[.]herominers[.]com and  xmrig[.]com. Connectivity to these domains indicates likely successful installation of mining software during earlier stages of post-compromise activity. In a small number of instances, Darktrace observed reconnaissance and lateral movement within the time range of PAN-OS exploitation. Firewalls conducted large numbers of internal connectivity attempts across several critical ports related to privileged protocols, including SMB and SSH. Darktrace detected anonymous NTLM login attempts and new usage of potential PAN-related credentials. These behaviors likely constitute attempts at lateral movement to adjacent devices to further extend network compromise impact.

Model alert connection logs detailing the uncommon failed NTLM logins using an anonymous user account following PAN-OS exploitation.
Figure 8: Model alert connection logs detailing the uncommon failed NTLM logins using an anonymous user account following PAN-OS exploitation.

Conclusion

Darktrace Threat Research and SOC analysts increasingly detect spikes in malicious activity on internet-facing devices in the days following the publication of new vulnerabilities. The latest iteration of this trend highlighted how threat actors quickly exploited Palo Alto firewall using authentication bypass and remote command execution vulnerabilities to enable device compromise. A review of the post-exploitation activity during these events reveals consistent patterns of perimeter device exploitation, but also some distinct variations.

Prior campaigns targeting perimeter devices featured activity largely confined to the exfiltration of configuration data and some initial payload retrieval. Within the current campaign, analysts identified a broader scope post-compromise activity consisting not only of payloads downloads but also extensive C2 activity, reconnaissance, and coin mining operations. While the use of command line tools like curl featured prominently in prior investigations, devices were seen retrieving a generally wider array of payloads during the latest round of activity. The use of the Sliver C2 platform further differentiates the latest round of PAN-OS compromises, with evidence of Sliver activity in about half of the investigated cases.

Several of the endpoints contacted by the infected firewall devices did not have any OSINT associated with them at the time of the attack. However, these indicators were noted as unusual for the devices according to Darktrace based on normal network traffic patterns. This reality further highlights the need for anomaly-based detection that does not rely necessarily on known indicators of compromise (IoCs) associated with CVE exploitation for detection. Darktrace’s experience in 2024 of multiple rounds of perimeter device exploitation may foreshadow future increases in these types of comprise operations.  

Credit to Adam Potter (Senior Cyber Analyst), Alexandra Sentenac (Senior Cyber Analyst), Emma Foulger (Principal Cyber Analyst) and the Darktrace Threat Research team.

References

[1]: https://labs.watchtowr.com/pots-and-pans-aka-an-sslvpn-palo-alto-pan-os-cve-2024-0012-and-cve-2024-9474/

[2]: https://security.paloaltonetworks.com/CVE-2024-9474

[3]: https://threatfox.abuse[.]ch/ioc/1346254/

[4]:https://www.virustotal.com/gui/file/4911396d80baff80826b96d6ea7e54758847c93fdbcd3b86b00946cfd7d1145b/detection

[5]: https://arcticwolf.com/resources/blog/arctic-wolf-observes-threat-campaign-targeting-palo-alto-networks-firewall-devices/

[6] https://www.immersivelabs.com/blog/detecting-and-decrypting-sliver-c2-a-threat-hunters-guide

[7] https://arcticwolf.com/resources/blog/arctic-wolf-observes-threat-campaign-targeting-palo-alto-networks-firewall-devices/

Appendices

Darktrace Model Alerts

Anomalous Connection / Anomalous SSL without SNI to New External

Anomalous Connection / Application Protocol on Uncommon Port  

Anomalous Connection / Multiple Failed Connections to Rare Endpoint

Anomalous Connection / Multiple HTTP POSTs to Rare Hostname

Anomalous Connection / New User Agent to IP Without Hostname

Anomalous Connection / Posting HTTP to IP Without Hostname

Anomalous Connection / Rare External SSL Self-Signed

Anomalous File / EXE from Rare External Location

Anomalous File / Incoming ELF File

Anomalous File / Mismatched MIME Type From Rare Endpoint

Anomalous File / Multiple EXE from Rare External Locations

Anomalous File / New User Agent Followed By Numeric File Download

Anomalous File / Script from Rare External Location

Anomalous File / Zip or Gzip from Rare External Location

Anomalous Server Activity / Rare External from Server

Compromise / Agent Beacon (Long Period)

Compromise / Agent Beacon (Medium Period)

Compromise / Agent Beacon to New Endpoint

Compromise / Beacon for 4 Days

Compromise / Beacon to Young Endpoint

Compromise / Beaconing Activity To External Rare

Compromise / High Priority Tunnelling to Bin Services

Compromise / High Volume of Connections with Beacon Score

Compromise / HTTP Beaconing to New IP

Compromise / HTTP Beaconing to Rare Destination

Compromise / Large Number of Suspicious Failed Connections

Compromise / Large Number of Suspicious Successful Connections

Compromise / Slow Beaconing Activity To External Rare

Compromise / SSL Beaconing to Rare Destination

Compromise / Suspicious Beaconing Behavior

Compromise / Suspicious File and C2

Compromise / Suspicious HTTP and Anomalous Activity

Compromise / Suspicious TLS Beaconing To Rare External

Compromise / Sustained SSL or HTTP Increase

Compromise / Sustained TCP Beaconing Activity To Rare Endpoint

Device / Initial Attack Chain Activity

Device / New User Agent

MITRE ATT&CK Mapping

Tactic – Technique

INITIAL ACCESS – Exploit Public-Facing Application

RESOURCE DEVELOPMENT – Malware

EXECUTION – Scheduled Task/Job (Cron)

EXECUTION – Unix Shell

PERSISTENCE – Web Shell

DEFENSE EVASION – Masquerading (Masquerade File Type)

DEFENSE EVASION - Deobfuscate/Decode Files or Information

CREDENTIAL ACCESS – Brute Force

DISCOVERY – Remote System Discovery

COMMAND AND CONTROL – Ingress Tool Transfer

COMMAND AND CONTROL – Application Layer Protocol (Web Protocols)

COMMAND AND CONTROL – Encrypted Channel

COMMAND AND CONTROL – Non-Standard Port

COMMAND AND CONTROL – Data Obfuscation

IMPACT – Resource Hijacking (Compute)

List of IoCs

IoC         –          Type         –        Description

  • sys.traceroute[.]vip     – Hostname - C2 Endpoint
  • 77.221.158[.]154     – IP - C2 Endpoint
  • 185.174.137[.]26     – IP - C2 Endpoint
  • 93.113.25[.]46     – IP - C2 Endpoint
  • 104.131.69[.]106     – IP - C2 Endpoint
  • 95.164.5[.]41     – IP - C2 Endpoint
  • bristol-beacon-assets.s3.amazonaws[.]com     – Hostname - Payload Server
  • img.dxyjg[.]com     – Hostname - Payload Server
  • 38.180.147[.]18     – IP - Payload Server
  • 143.198.1[.]178     – IP - Payload Server
  • 185.208.156[.]46     – IP - Payload Server
  • 185.196.9[.]154     – IP - Payload Server
  • 46.8.226[.]75     – IP - Payload Server
  • 223.165.4[.]175     – IP - Payload Server
  • 188.166.244[.]81     – IP - Payload Server
  • bristol-beaconassets.s3[.]amazonaws[.]com/Y5bHaYxvd84sw     – URL - Payload
  • img[.]dxyjg[.]com/KjQfcPNzMrgV     – URL - Payload
  • 38.180.147[.]18/palofd     – URL - Payload
  • 90f6890fa94b25fbf4d5c49f1ea354a023e06510     – SHA1 - Associated to file /palofd
  • 143.198.1[.]178/7Z0THCJ     – URL - Payload
  • 8d82ccdb21425cf27b5feb47d9b7fb0c0454a9ca     – SHA1 - Associated to file /7Z0THCJ
  • fefd0f93dcd6215d9b8c80606327f5d3a8c89712     – SHA1 - Associated to file /7Z0THCJ
  • e5464f14556f6e1dd88b11d6b212999dd9aee1b1     – SHA1 - Associated to file /7Z0THCJ
  • 143.198.1[.]178/o4VWvQ5pxICPm     – URL - Payload
  • 185.208.156[.]46/lUuL095knXd62DdR6umDig     – URL - Payload
  • 185.196.9[.]154/ykKDzZ5o0AUSfkrzU5BY4w     – URL - Payload
  • 46.8.226[.]75/1.txt     – URL - Payload
  • 223.165.4[.]175/x6     – URL - Payload
  • 45.76.141[.]166/y.sh     – URL - Payload
  • repositorylinux[.]org/linux.sh     – URL - Payload
  • repositorylinux[.]org/cron.sh     – URL - Payload

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
Adam Potter
Senior Cyber Analyst
Book a 1-1 meeting with one of our experts
Share this article

More in this series

No items found.

Blog

/

December 10, 2024

/
No items found.

Darktrace is positioned as a Leader in the IDC MarketScape: Worldwide Network Detection and Response 2024 Vendor Assessment

Default blog imageDefault blog image

Darktrace is pleased to announce that we have been positioned as a Leader in the IDC MarketScape: Worldwide Network Detection and Response 2024 Vendor Assessment. We believe this further highlights Darktrace’s position as a pioneer in the NDR market and follows similar recognition from KuppingerCole, who recently named Darktrace as an Overall Leader, Product Leader, Market Leader and Innovation Leader in the KuppingerCole Leadership Compass: Network Detection and Response (2024).

Network Detection and Response (NDR) solutions are uniquely positioned to provide visibility over the core hub of a business and employee activity, analyzing North-South and East-West traffic to identify threats across the modern network. NDR provides a rich and true source of anomalies and goes beyond process level data that is relied on by Endpoint Detection and Response (EDR) agents that do not provide network level visibility and can be misconfigured at any time.1

Metadata from network traffic can be used to detect a variety of different threats based on events such as anomalous port usage, unusual upload/download activity, impossible travel and many other activities. This has been accelerated by the increased usage of user behavioral analytics (UBA) in network security, which establishes statistical baselines about network entities and highlights deviations from expected activity.1

Darktrace is recognized as a Leader in the IDC MarketScape due to our leadership in the market and our pioneering leadership in AI over the past decade, alongside a variety of other unique differentiators and innovations in the NDR industry.

Darktrace / NETWORK™ delivers full visibility, real time threat detection and Autonomous Response capabilities across an organization’s on-premises, cloud, hybrid and virtual environments, including remote worker endpoints.

Unique Approach to AI

Most NDR vendors and network security tools such as IDS/IPS rely on detecting known attacks with historical data and supervised machine learning, leaving organizations blind and vulnerable to novel threats such as zero-days, variants of known attacks, supply chain attacks and insider threats.

These vendors also tend to apply AI models that are trained globally, and are not unique to each organization’s environment, which creates a high number of false positives and alerts that ultimately lack business context.

The IDC MarketScape recognizes that Darktrace takes a differentiated approach in the market with regards to delivering network detection and response capabilities, noting; “Darktrace is unique in that it does not rely on rules and signatures but rather learns what constitutes as normal for an organization and generates alerts when there is a deviation.”1

Darktrace / NETWORK achieves this through the use of Self-Learning AI and unsupervised machine learning to understand what is normal network behavior, continuously analyzing, mapping and modeling every connection to create a full picture of devices, identities, connections and potential attack paths. Darktrace Self-Learning AI autonomously optimizes itself to cut through the noise and quickly surface genuine, prioritized network security incidents – significantly reducing false positives and removing the hassle of needing to continually tuning alerts manually.

Darktrace’s unique approach to AI also extends to the investigation and triage of network alerts with Cyber AI Analyst. Unlike a chat or prompt based LLM, Cyber AI Analyst investigates all relevant alerts in an environment, including third party alerts, autonomously forming hypotheses and reaching conclusions just like a human analyst would, accelerating SOC Level 2 analyses of incidents by 10x. Cyber AI Analyst also typically providing SOC teams with up to 50,000 additional hours annually of Level 2 analysis producing high level alerts and written reporting, transforming security operations.2

Darktrace also uses its deep understanding of what is normal for a network to identify suspicious behavior, leveraging Autonomous Response capabilities to shut down both known and novel threats in real time, taking targeted actions without disrupting business operations. Darktrace / NETWORK is the only NDR solution that can autonomously enforce a pattern of life based on what is normal for a standalone device or group of peers, rapidly containing and disarming threats based on the overall context of the environment and a granular understanding of what is normal for a device or user – instead of relying on historical attack data.

Continued NDR Market Leadership

Darktrace has been recognized as a Leader in the NDR market, and the IDC MarketScape listed a variety of strengths:

  • Darktrace achieves roughly one-fifth of all global NDR revenue. This is important because other IT and cybersecurity solutions providers necessarily want to have integration with Darktrace.
  • The AI algorithms that Darktrace uses for NDR have had 10 years of deployments, tuning, and learning to draw from.
  • Darktrace is available as a SaaS, as an enterprise license, and as physical, hybrid, or virtual appliances. Darktrace also offers an endpoint agent and visibility into VPN and ZTNA.
  • Darktrace integrates with 30+ different interfaces including SIEM, SOAR, XDR platforms, IT ticketing solutions, and their own dashboards. The Darktrace Threat Visualizer highlights events and incidents from the entire deployment including cloud, apps, email, endpoint, zero trust, network, and OT.
  • Darktrace / NETWORK charts the progress that the SOC is making over time with key metrics such as MTTD/MTTR, alerts generated and processed, and other criteria.
  • Darktrace reported coverage of 14 MITRE ATT&CK categories, 158 techniques, and 184 subtechniques

Proactive Network Resilience

The IDC MarketScape notes, “Ultimately, NDR shines as a standalone detection and response technology but is especially powerful when combined with other platforms. NDR in combination with other control points such as endpoint, data, identity, and application provides the proper context when winnowing alerts and trying to uncover a single source of truth.” . Darktrace comprehensively addresses this as part of the ActiveAI Security Platform, by combining network alerts with data from / EMAIL, / IDENTITY, / ENDPOINT, / CLOUD and / OT, providing deeper contextual analysis for each network alert and automatically enriching investigations.

Darktrace also goes beyond NDR solutions with capabilities that are closely linked to our NDR offering, helping clients to achieve and maintain a state of proactive network resilience:

  • Darktrace / Proactive Exposure Management – look beyond just CVE risks to discover, prioritize and validate risks by business impact and how to address them early, reducing the number of real threats that security teams need to handle.
  • Darktrace / Incident Readiness & Recovery – lets teams respond in the best way to each incident and proactively test their familiarity and effectiveness of IR workflows with sophisticated incident simulations based on their own analysts and assets.

Together, these solutions allow Darktrace / NETWORK to go beyond the traditional approach to NDR and shift teams to a more hardened and proactive stance.

Protecting Clients with Continued Innovation

Darktrace invests heavily in Research and Development to continue providing customers with market-leading NDR capabilities and innovations, which was reflected in our position in the Leader category of the MarketScape report for both capabilities and strategy. We are led by the needs and challenges of our customers, which serve as the driving force behind our continued innovation and leadership in the NDR market. The IDC MarketScape report underlines this approach with the following feedback presented by Darktrace customers:

“A customer intimated that 99% of their detections were OOTB with little need to tune or define parameters.”
“A customer reported that it had early warnings for adversarial tactics such as suspicious SMB scanning, suspicious remote execution, remote desktop protocol (RDP) scanning, data exfiltration, C2C, LDAP query, and suspicious Kerberos activity.”
“The client could use Regex to determine if suspicious behavior was found elsewhere on the network.”

Thousands of customers around the world across all industries and sectors rely on Darktrace / NETWORK to protect against known and novel threats. From the latest vulnerabilities in network hardware to sophisticated new strains of ransomware and everything in-between, Darktrace helps clients detect and respond to all types of threats affecting their networks and avoid business disruption, even from the latest attacks.

Find out more about the unique capabilities of Darktrace / NETWORK and our application of AI in network security in the IDC MarketScape excerpt.

References

  1. IDC MarketScape: Worldwide Network Detection and Response 2024 Vendor Assessment (Doc #US51752324, November 2024)
  2. Darktrace Cyber AI Analyst Customer Fleet Data
Continue reading
About the author
Mikey Anderson
Product Manager, Network Detection & Response

Blog

/

December 9, 2024

/

Inside the SOC

A snake in the net: Defending against AiTM phishing threats and Mamba 2FA

Default blog imageDefault blog image

What are Adversary-in-the-Middle (AiTM) phishing kits?

Phishing-as-a-Service (PhaaS) platforms have significantly lowered the barriers to entry for cybercriminals, enabling a new wave of sophisticated phishing attacks. Among the most concerning developments in this landscape is the emergence of Adversary-in-the-Middle (AiTM) phishing kits, which enhance traditional phishing tactics by allowing attackers to intercept and manipulate communications in real-time. The PhaaS marketplace offers a wide variety of innovative capabilities, with basic services starting around USD 120 and more advanced services costing around USD 250 monthly [1].

These AiTM kits are designed to create convincing decoy pages that mimic legitimate login interfaces, often pre-filling user information to increase credibility. By acting as a man-in-the-middle, attackers can harvest sensitive data such as usernames, passwords, and even multi-factor authentication (MFA) tokens without raising immediate suspicion. This capability not only makes AiTM attacks more effective but also poses a significant challenge for cybersecurity defenses [2].

Mamba 2FA is one such example of a PhaaS strain with AiTM capabilities that has emerged as a significant threat to users of Microsoft 365 and other enterprise systems. Discovered in May 2024, Mamba 2FA employs advanced AiTM tactics to bypass MFA, making it particularly dangerous for organizations relying on these security measures.

What is Mamba 2FA?

Phishing Mechanism

Mamba 2FA employs highly convincing phishing pages that closely mimic legitimate Microsoft services like OneDrive and SharePoint. These phishing URLs are crafted with a specific structure, incorporating Base64-encoded parameters. This technique allows attackers to tailor the phishing experience to the targeted organization, making the deception more effective. If an invalid parameter is detected, users are redirected to a benign error page, which helps evade automated detection systems [5].

Figure 1: Phishing page mimicking the Microsoft OneDrive service.

Real-Time Communication

A standout feature of Mamba 2FA is its use of the Socket.IO JavaScript library. This library facilitates real-time communication between the phishing page and the attackers' backend servers. As users input sensitive information, such as usernames, passwords, and MFA tokens on the phishing site, this data is immediately relayed to the attackers, enabling swift unauthorized access [5].

Multi-Factor Authentication Bypass

Mamba 2FA specifically targets MFA methods that are not resistant to phishing, such as one-time passwords (OTPs) and push notifications. When a user enters their MFA token, it is captured in real-time by the attackers, who can then use it to access the victim's account immediately. This capability significantly undermines traditional security measures that rely on MFA for account protection.

Infrastructure and Distribution

The platform's infrastructure consists of two main components: link domains and relay servers. Link domains handle initial phishing attempts, while relay servers are responsible for stealing credentials and completing login processes on behalf of the attacker. The relay servers are designed to mask their IP addresses by using proxy services, making it more difficult for security systems to block them [3].

Evasion Techniques

To evade detection by security tools, Mamba 2FA employs several strategies:

  • Sandbox Detection: The platform can detect if it is being analyzed in a sandbox environment and will redirect users to harmless pages like Google’s 404 error page.
  • Dynamic URL Generation: The URLs used in phishing attempts are frequently rotated and often short-lived to avoid being blacklisted by security solutions.
  • HTML Attachments: Phishing emails often include HTML attachments that appear benign but contain hidden JavaScript that redirects users to the phishing page [5].

Darktrace’s Coverage of Mamba 2FA

Starting in July 2024, the Darktrace Threat Research team detected a sudden rise in Microsoft 365 customer accounts logging in from unusual external sources. These accounts were accessed from an anomalous endpoint, 2607:5500:3000:fea[::]2, and exhibited unusual behaviors upon logging into Software-as-a-Service (SaaS) accounts. This activity strongly correlates with a phishing campaign using Mamba 2FA, first documented in late June 2024 and tracked as Mamba 2FA by Sekoia [2][3].

Darktrace / IDENTITY  was able to identify the initial stages of the Mamba 2FA campaign by correlating subtle anomalies, such as unusual SaaS login locations. Using AI based on peer group analysis, it detected unusual behavior associated with these attacks. By leveraging Autonomous Response actions, Darktrace was able to neutralize these threats in every instance of the campaign detected.

On July 23, a SaaS user was observed logging in from a rare ASN and IP address, 2607:5500:3000:fea::2, originating from the US and successfully passed through MFA authentication.

Figure 2: Model Alert Event Log showing Darktrace’s detection of a SaaS user mailbox logging in from an unusual source it correlates with Mamba 2FA relay server.

Almost an hour later, the SaaS user was observed logging in from another suspicious IP address, 45.133.172[.]86, linked to ASN AS174 COGENT-174. This IP, originating from the UK, successfully passed through MFA validation.

Following this unusual access, the SaaS user was notably observed reading emails and files that could contain sensitive payment and contract information. This behavior suggests that the attacker may have been leveraging contextual information about the target to craft further malicious phishing emails or fraudulent invoices. Subsequently, the user was detected creating a new mailbox rule titled 'fdsdf'. This rule was configured to redirect emails from a specific domain to the 'Deleted Items' folder and automatically mark them as read.

Implications of Unusual Email Rules

Such unusual email rule configurations are a common tactic employed by attackers. They often use these rules to automatically forward emails containing sensitive keywords—such as "invoice”, "payment", or "confidential"—to an external address. Additionally, these rules help conceal malicious activities, keeping them hidden from the target and allowing the attacker to operate undetected.

Figure 3: The model alert “SaaS / Compliance / Anomalous New Email Rule,” pertaining to the unusual email rule created by the SaaS user named ‘fdsdf’.

Blocking the action

A few minutes later, the SaaS user from the unusual IP address 45.133.172[.]86 was observed attempting to send an email with the subject “RE: Payments.” Subsequently, Darktrace detected the user engaging in activities that could potentially establish persistence in the compromised account, such as registering a new authenticator app. Recognizing this sequence of anomalous behaviors, Darktrace implemented an Autonomous Response inhibitor, disabling the SaaS user for two hours. This action effectively contained potential malicious activities, such as the distribution of phishing emails and fraudulent invoices, and gave the customer’s security team the necessary time to conduct a thorough investigation and implement appropriate security measures.

Figure 4: Device Event Log displaying Darktrace’s Autonomous Response taking action by blocking the SaaS account.
Figure 5: Darktrace / IDENTITY highlighting the 16 model alerts that triggered during the observed compromise.

In another example from mid-July, similar activities related to the campaign were observed on another customer network. A SaaS user was initially detected logging in from the unusual external endpoint 2607:5500:3000:fea[::]2.

Figure 6: The SaaS / Compromise / SaaS Anomaly Following Anomalous Login model alert was triggered by an unusual login from a suspicious IP address linked to Mamba 2FA.

A few minutes later, in the same manner as demonstrated in the previous case, the actor was observed logging in from another rare endpoint, 102.68.111[.]240. However, this time it was from a source IP located in Lagos, Nigeria, which no other user on the network had been observed connecting from. Once logged in, the SaaS user updated the settings to "User registered Authenticator App with Notification and Code," a possible attempt to maintain persistence in the SaaS account.

Figure 7: Darktrace / IDENTITY highlighted the regular locations for the SaaS user. The rarity scores associated with the Mamba 2FA IP location and another IP located in Nigeria were classified as having very low regularity scores for this user.

Based on unusual patterns of user behavior, a Cyber AI Analyst Incident was also generated, detailing all potential account hijacking activities. Darktrace also applied an Autonomous Response action, disabling the user for over five hours. This swift action was crucial in preventing further unauthorized access, potential data breaches and further implications.

Figure 8: Cyber AI Analyst Incident detailing the unusual activities related to the SaaS account hijacking.

Since the customer had subscribed to Darktrace Security Operations Centre (SOC) services, Darktrace analysts conducted an additional human investigation confirming the account compromise.

How Darktrace Combats Phishing Threats

The initial entry point for Mamba 2FA account compromises primarily involves phishing campaigns using HTML attachments and deceptive links. These phishing attempts are designed to mimic legitimate Microsoft services, such as OneDrive and SharePoint, making them appear authentic to unsuspecting users. Darktrace / EMAIL leverages multiple capabilities to analyze email content for known indicators of phishing. This includes looking for suspicious URLs, unusual attachments (like HTML files with embedded JavaScript), and signs of social engineering tactics commonly used in phishing campaigns like Mamba 2FA. With these capabilities, Darktrace successfully detected Mamba 2FA phishing emails in networks where this tool is integrated into the security layers, consequently preventing further implications and account hijacks of their users.

Mamba 2FA URL Structure and Domain Names

The URL structure used in Mamba 2FA phishing attempts is specifically designed to facilitate the capture of user credentials and MFA tokens while evading detection. These phishing URLs typically follow a pattern that incorporates Base64-encoded parameters, which play a crucial role in the operation of the phishing kit.

The URLs associated with Mamba 2FA phishing pages generally follow this structure [6]:

https://{domain}/{m,n,o}/?{Base64 string}

Below are some potential Mamba 2FA phishing emails, with the Base64 strings already decoded, that were classified as certain threats by Darktrace / EMAIL. This classification was based on identifying multiple suspicious characteristics, such as HTML attachments containing JavaScript code, emails from senders with no previous association with the recipients, analysis of redirect links, among others. These emails were autonomously blocked from being delivered to users' inboxes.

Figure 9: Darktrace / EMAIL highlighted a possible phishing email from Mamba 2FA, which was classified as a 100% anomaly.
Figure 10: Darktrace / EMAIL highlighted a URL that resembles the characteristics associated with Mamba 2FA.

Conclusion

The rise of PhaaS platforms and the advent of AiTM phishing kits represent a concerning evolution in cyber threats, pushing the boundaries of traditional phishing tactics and exposing significant vulnerabilities in current cybersecurity defenses. The ability of these attacks to effortlessly bypass traditional security measures like MFA underscores the need for more sophisticated, adaptive strategies to combat these evolving threats.

By identifying and responding to anomalous activities within Microsoft 365 accounts, Darktrace not only highlights the importance of comprehensive monitoring but also sets a new standard for proactive threat detection. Furthermore, the autonomous threat response capabilities and the exceptional proficiency of Darktrace / EMAIL in intercepting and neutralizing sophisticated phishing attacks illustrate a robust defense mechanism that can effectively safeguard users and maintain the integrity of digital ecosystems.

Credit to Patrick Anjos (Senior Cyber Analyst) and Nahisha Nobregas (Senior Cyber Analyst)

Appendices

Darktrace Model Detections

  • SaaS / Access / M365 High Risk Level Login
  • SaaS / Access / Unusual External Source for SaaS Credential Use
  • SaaS / Compromise / Login From Rare Endpoint While User Is Active
  • SaaS / Compliance / M365 Security Information Modified
  • SaaS / Compromise / Unusual Login and New Email Rule
  • SaaS / Email Nexus / Suspicious Internal Exchange Activity
  • SaaS / Compliance / Anomalous New Email Rule
  • SaaS / Email Nexus / Possible Outbound Email Spam
  • SaaS / Compromise / Unusual Login and Account Update
  • SaaS / Compromise / SaaS Anomaly Following Anomalous Login
  • SaaS / Compliance / M365 Security Information Modified
  • SaaS / Compromise / Login From Rare Endpoint While User Is Active
  • SaaS / Compromise / Unusual Login, Sent Mail, Deleted Sent
  • SaaS / Unusual Activity / Multiple Unusual SaaS Activities
  • SaaS / Email Nexus / Unusual Login Location Following Link to File Storage
  • SaaS / Unusual Activity / Multiple Unusual External Sources For SaaS Credential
  • IaaS / Compliance / Uncommon Azure External User Invite
  • SaaS / Compliance / M365 External User Added to Group
  • SaaS / Access / M365 High Risk Level Login
  • SaaS / Compliance / M365 Security Information Modified
  • SaaS/ Unusual Activity / Unusual MFA Auth and SaaS Activity
  • SaaS / Compromise / Unusual Login and Account Update

Cyber AI Analyst Incidents:

  • Possible Hijack of Office365 Account
  • Possible Hijack of AzureActiveDirectory Account
  • Possible Unsecured Office365 Resource

List of Indicators of Compromise (IoCs)

IoC       Type    Description + Confidence

2607:5500:3000:fea[::]2 - IPv6 - Possible Mamba 2FA relay server

2607:5500:3000:1cab:[:]2 - IPv6 - Possible Mamba 2FA relay server

References

1.     https://securityaffairs.com/136953/cyber-crime/caffeine-phishing-platform.html

2.     https://any.run/cybersecurity-blog/analysis-of-the-phishing-campaign/

3.     https://www.bleepingcomputer.com/news/security/new-mamba-2fa-bypass-service-targets-microsoft-365-accounts/

4.     https://cyberinsider.com/microsoft-365-accounts-targeted-by-new-mamba-2fa-aitm-phishing-threat/

5.     https://blog.sekoia.io/mamba-2fa-a-new-contender-in-the-aitm-phishing-ecosystem/

MITRE ATT&CK Mapping

Tactic – Technique

DEFENSE EVASION, PERSISTENCE, PRIVILEGE ESCALATION, INITIAL ACCESS - Cloud Accounts

DISCOVERY - Cloud Service Dashboard

RESOURCE DEVELOPMENT - Compromise Accounts

CREDENTIAL ACCESS - Steal Web Session Cookie

PERSISTENCE - Account Manipulation

PERSISTENCE - Outlook Rules

RESOURCE DEVELOPMENT - Email Accounts

INITIAL ACCESS - Phishing

Continue reading
About the author
Patrick Anjos
Senior Cyber Analyst
Your data. Our AI.
Elevate your network security with Darktrace AI