Inside the SOC
Business email compromise to mass phishing campaign: Attack analysis
It is common for attackers to send large volumes of malicious emails from the email accounts which they compromise. Before carrying out this mass-mailing activity, there are predictable, preparatory steps which attackers take, such as registering mass-mailing applications and creating new inbox rules. In this blog, we will provide details of an attack observed in February 2022 in which a threat actor conducted a successful mass-mailing attack at a financial company based in Africa.
In February 2022, an attacker attempted to infiltrate the email environment of a financial services company based in Africa. At the beginning of February, the attacker likely gained a foothold in the company’s email environment by tricking an internal user into entering the credentials of their corporate email account into a phishing page. Over the following week, the attacker used the compromised account credentials to conduct a variety of activities, such as registering a mass-mailing application and creating a new inbox rule.
After taking these preparatory steps, the attacker went on to send out large volumes of phishing emails from the internal user’s email account. The attacker consequently obtained the credentials of several further internal corporate accounts. They used the credentials of one of these accounts to carry out similar preparatory steps (registering a mass-mailing application and creating a new inbox rule). After taking these steps, the attacker again sent large volumes of phishing emails from the account. At this point, the customer requested assistance from Darktrace’s SOC to aid investigation, and the intrusion was consequently contained by the company.
Since the attacker carried out their activities using a VPN and an Amazon cloud service, the endpoints from which the activities took place did not serve as particularly helpful indicators of an attack. However, prior to sending out phishing emails from internal users’ accounts, the attacker did carry out other predictable, preparatory activities. One of the main goals of this blog is to highlight that these behaviors serve as valuable signs of preparation for mass-mailing activity.
Figure 1: Timeline of the intrusion
On February 3, the attacker sent a phishing email to the corporate account of an employee. The email was sent from the corporate account of an employee at a company with business ties to the victim enterprise. It is likely that the attacker had compromised this account prior to sending the phishing email from it. The phishing email in question claimed to be an overdue payment reminder. Within the email, there was a link hidden behind the display text “view invoice”. The hostname of the phishing link’s URL was a subdomain of questionpro[.]eu — an online survey platform. The page referred to by the URL was a fake Microsoft Outlook login page.
Figure 2: Destination of phishing link within the email sent by the attacker
Antigena Email, Darktrace’s email security solution, identified the highly unusual linguistic structure of the email, given its understanding of ‘normal’ for that sender. This was reflected in an inducement shift score of 100. However, in this case, the original URL of the phishing link was rewritten by Mimecast’s URL protection service in a way which made the full URL impossible to extract. Consequently, Antigena Email did not know what the original URL of the link was. Since the link was rewritten by Mimecast’s URL protection service, the email’s recipient will have received a warning notification in their browser upon clicking the link. It seems that the recipient ignored the warning, and consequently divulged their email account credentials to the attacker.
For Antigena Email to hold an email from a user’s mailbox, it must judge with high confidence that the email is malicious. In cases where the email contains no suspicious attachments or links, it is difficult for Antigena Email to obtain such high degrees of confidence, unless the email displays clear payload-independent malicious indicators, such as indicators of spoofing or indicators of extortion. In this case, the email, as seen by Antigena Email, didn’t contain any suspicious links or attachments (since Mimecast had rewritten the suspicious link) and the email didn’t contain any indicators of spoofing or extortion.
Figure 3: The email’s high inducement shift score highlights that the email’s linguistic content and structure were unusual for the email’s sender
Shortly after receiving the email, the internal user’s corporate device was observed making SSL connections to the questionpro[.]eu phishing endpoint. It is likely that the user divulged their email account credentials during these connections.
Figure 4: The above screenshot — obtained from Advanced Search — depicts the connections made by the account owner’s device on February 3
Between February 3 and February 7, the attacker logged into the user’s email account several times. Since these logins were carried out using a common VPN service, they were not identified as particularly unusual by Darktrace. However, during their login sessions, the attacker exhibited behavior which was highly unusual for the email account’s owner. The attacker was observed creating an inbox rule called “ _ ” on the user’s email account, as well as registering and granting permissions to a mass-mailing application called Newsletter Software SuperMailer. These steps were taken by the attacker in preparation for their subsequent mass-mailing activity.
On February 7, the attacker sent out phishing emails from the user’s account. The emails were sent to hundreds of internal and external mailboxes. The email claimed to be an overdue payment reminder and it contained a questionpro[.]eu link hidden behind the display text “view invoice”. It is likely that the inbox rule created by the attacker caused all responses to this phishing email to be deleted. Attackers regularly create inbox rules on the email accounts which they compromise to ensure that responses to the malicious emails which they distribute are hidden from the accounts’ owners.
Since Antigena Email does not have visibility of internal-to-internal emails, the phishing email was delivered fully weaponized to hundreds of internal mailboxes. On February 7, after the phishing email was sent from the compromised internal account, more than twenty internal devices were observed making SSL connections to the relevant questionpro[.]eu endpoint, indicating that many internal users had clicked the phishing link and possibly revealed their account credentials to the attacker.
Figure 5: The above screenshot — obtained from Advanced Search — depicts the large volume of connections made by internal devices to the phishing endpoint
Over the next five days, the attacker was observed logging into the corporate email accounts of at least six internal users. These logins were carried out from the same VPN endpoints as the attacker’s original logins. On February 11, the attacker was observed creating an inbox rule named “ , ” on one of these accounts. Shortly after, the attacker went on to register and grant permissions to the same mass-mailing application, Newsletter Software SuperMailer. As with the other account, these steps were taken by the attacker in preparation for subsequent mass-mailing activity.
Figure 6: The above screenshot — obtained from Advanced Search — outlines all of the actions involving the mass-mailing application that were taken by the attacker (accounts have been redacted)
On February 11, shortly after 08:30 (UTC), the attacker widely distributed a phishing email from this second user’s account. The phishing email was distributed to hundreds of internal and external mailboxes. Unlike the other phishing emails used by the attacker, this one claimed to be a purchase order notification, and it contained an HTML file named PurchaseOrder.html. Within this file, there was a link to a suspicious page on the public relations (PR) news site, everything-pr[.]com. After the phishing email was sent from the compromised internal account, more than twenty internal devices were observed making SSL connections to the relevant everything-pr[.]com endpoint, indicating that many internal users had opened the malicious attachment.
Figure 7: The above screenshot — obtained from Advanced Search — depicts the connections made by internal devices to the endpoint referenced in the malicious attachment
On February 11, the customer submitted an Ask the Expert (ATE) request to Darktrace’s SOC team. The guidance provided by the SOC helped the security team to contain the intrusion. The attacker managed to maintain a presence within the organization’s email environment for eight days. During these eight days, the attacker sent out large volumes of phishing emails from two corporate accounts. Before sending out these phishing emails, the attacker carried out predictable, preparatory actions. These actions included registering a mass-mailing application with Azure AD and creating an inbox rule.
There are many learning points for this particular intrusion. First, it is important to be mindful of signs of preparation for malicious mass-mailing activity. After an attacker compromises an email account, there are several actions which they will likely perform before they send out large volumes of malicious emails. For example, they may create an inbox rule on the account, and they may register a mass-mailing application with Azure AD. The Darktrace models SaaS / Compliance / New Email Rule and SaaS / Admin / OAuth Permission Grant are designed to pick up on these behaviors.
Second, in cases where an attacker succeeds in sending out phishing emails from an internal, corporate account, it is advised that customers make use of Darktrace’s Advanced Search to identify users that may have divulged account credentials to the attacker. The phishing email sent from the compromised account will likely contain a suspicious link. Once the hostname of the link has been identified, it is possible to ask Advanced Search to display all HTTP or SSL connections to the host in question. If the hostname is www.example.com, you can get Advanced Search to display all SSL connections to the host by using the Advanced Search query, @fields.server_name:"www.example.com", and you can get Advanced Search to display all HTTP connections to the host by using the query, @fields.host:"www.example.com".
Third, it is advised that customers make use of Darktrace’s ‘watched domains’ feature in cases where an attacker succeeds in sending out malicious emails from the accounts they compromise. If a hostname is added to the watched domains list, then a model named Compromise / Watched Domain will breach whenever an internal device is observed connecting to it. If Antigena Network is configured, then observed attempts to connect to the relevant host will be blocked if the hostname is added to the watched domains list with the ‘flag for Antigena’ toggle switched on. If an attacker succeeds in sending out a malicious email from an internal, corporate account, it is advised that customers add hostnames of phishing links within the email to the watched domains list and enable the Antigena flag. Doing so will cause Darktrace to identify and thwart any attempts to connect to the relevant phishing endpoints.
Figure 8: The above screenshot — obtained from the Model Editor — shows that Antigena Network prevented ten internal devices from connecting to phishing endpoints after the relevant phishing hostnames were added to the watched domains list on February 11
For Darktrace customers who want to find out more about phishing detection, refer here for an exclusive supplement to this blog.
MITRE ATT&CK techniques observed
Thanks to Paul Jennings for his contributions.
Like this and want more?
Inside the SOC
How Abuse of ‘PerfectData Software’ May Create a Perfect Storm: An Emerging Trend in Account Takeovers
Amidst the ever-changing threat landscape, new tactics, techniques, and procedures (TTPs) seem to emerge daily, creating extreme challenges for security teams. The broad range of attack methods utilized by attackers seems to present an insurmountable problem: how do you defend against a playbook that does not yet exist?
Faced with the growing number of novel and uncommon attack methods, it is essential for organizations to adopt a security solution able to detect threats based on their anomalies, rather than relying on threat intelligence alone.
In March 2023, Darktrace observed an emerging trend in the use of an application known as ‘PerfectData Software’ for probable malicious purposes in several Microsoft 365 account takeovers.
Using its anomaly-based detection, Darktrace DETECT™ was able to identify the activity chain surrounding the use of this application, potentially uncovering a novel piece of threat actor tradecraft in the process.
Microsoft 365 Intrusions
In recent years, Microsoft’s Software-as-a-Service (SaaS) suite, Microsoft 365, along with its built-in identity and access management (IAM) service, Azure Active Directory (Azure AD), have been heavily targeted by threat actors due to their near-ubiquitous usage across industries. Four out of every five Fortune 500 companies, for example, use Microsoft 365 services .
Malicious actors typically gain entry to organizations’ Microsoft 365 environments by abusing either stolen account credentials or stolen session cookies . Once inside, actors can access sensitive data within mailboxes or SharePoint repositories, and send out emails or Teams messages. This activity can often result in serious financial harm, especially in cases where the malicious actor’s end-goal is to elicit fraudulent transactions.
Darktrace regularly observes malicious actors behaving in predictable ways once they gain access to customer Microsoft 365 environment. One typical example is the creation of new inbox rules and sending deceitful emails intended to convince recipients to carry out subsequent actions, such as following a malicious link or providing sensitive information. It is also common for actors to register new applications in Azure AD so that they can be used to conduct follow-up activities, like mass-mailing or data theft. The registration of applications in Azure AD therefore seems to be a relatively predictable threat actor behavior . Darktrace DETECT understands that unusual application registrations in Azure AD may constitute a deviation in expected behavior, and therefore a possible indicator of account compromise.
These registrations of applications in Azure AD are evidenced by creations of, as well as assignments of permissions to, Service Principals in Azure AD. Darktrace has detected a growing trend in actors creating and assigning permissions to a Service Principal named ‘PerfectData Software’. Further investigation of this Azure AD activity revealed it to be part of an ongoing account takeover.
‘PerfectData Software’ Activity
Darktrace observed variations of the following pattern of activity relating to an application named ‘PerfectData Software’ within its customer base:
- Actor signs in to a Microsoft 365 account from an endpoint associated with a Virtual Private Server (VPS) or Virtual Private Network (VPN) service
- Actor registers an application called 'PerfectData Software' with Azure AD, and then grants permissions to the application
- Actor accesses mailbox data and creates inbox rule
In two separate incidents, malicious actors were observed conducting their activities from endpoints associated with VPN services (HideMyAss (HMA) VPN and Surfshark VPN, respectively) and from endpoints within the Autonomous System AS396073 MAJESTIC-HOSTING-01.
In March 2023, Darktrace observed a malicious actor signing in to a Microsoft 365 account from a Kuwait-based IP address within the Autonomous System, AS198605 AVAST Software s.r.o. This IP address is associated with the VPN service, HMA VPN. Over the next couple of days, an actor (likely the same malicious actor) signed in to the account several more times from two different Nigeria-based endpoints, as well as a VPS-related endpoint and a HMA VPN endpoint.
During their login sessions, the actor performed a variety of actions. First, they created and assigned permissions to a Service Principal named ‘PerfectData Software’. This Service Principal creation represents the registration of an application called ‘PerfectData Software’ in Azure AD. Although the reason for registering this application is unclear, within a few days the actor registered and granted permission to another application, ‘Newsletter Software Supermailer’, and created a new inbox rule names ‘s’ on the mailbox of the hijacked account. This inbox rule moved emails meeting certain conditions to a folder named ‘RSS Subscription. The ‘Newsletter Software Supermailer’ application was likely registered by the actor to facilitate mass-mailing activity.
Immediately after these actions, Darktrace detected the actor sending out thousands of malicious emails from the account. The emails included an attachment named ‘Credit Transfer Copy.html’, which contained a suspicious link. Further investigation revealed that the customer’s network had received several fake invoice emails prior to this initial intrusion activity. Additionally, there was an unusually high volume of failed logins to the compromised account around the time of the initial access.
In a separate case also observed by Darktrace in March 2023, a malicious actor was observed signing in to a Microsoft 365 account from an endpoint within the Autonomous System, AS397086 LAYER-HOST-HOUSTON. The endpoint appears to be related to the VPN service, Surfshark VPN. This login was followed by several failed and successful logins from a VPS-related within the Autonomous System, AS396073 MAJESTIC-HOSTING-01. The actor was then seen registering and assigning permissions to an application called ‘PerfectData Software’. As with the previous example, the motives for this registration are unclear. The actor proceeded to log in several more times from a Surfshark VPN endpoint, however, they were not observed carrying out any further suspicious activity.
It was not clear in either of these examples, nor in fact any of cases observed by Darktrace, why actors had registered and assigned permissions to an application called ‘PerfectData Software’, and there do not appear to be any open-source intelligence (OSINT) resources or online literature related to the malicious usage of an application by that name. That said, there are several websites which appear to provide email migration and data recovery/backup tools under the moniker ‘PerfectData Software’.
It is unclear whether the use of ‘PerfectData Software’ by malicious actors observed on the networks of Darktrace customers was one of these tools. However, given the nature of the tools, it is possible that the actors intended to use them to facilitate the exfiltration of email data from compromises mailboxes.
If the legitimate software ‘PerfectData’ is the application in question in these incidents, it is likely being purchased and misused by attackers for malicious purposes. It is also possible the application referenced in the incidents is a spoof of the legitimate ‘PerfectData’ software designed to masquerade a malicious application as legitimate.
Cases of ‘PerfectData Software’ activity chains detected by Darktrace typically began with an actor signing into an internal user’s Microsoft 365 account from a VPN or VPS-related endpoint. These login events, along with the suspicious email and/or brute-force activity which preceded them, caused the following DETECT models to breach:
- SaaS / Access / Unusual External Source for SaaS Credential Use
- SaaS / Access / Suspicious Login Attempt
- SaaS / Compromise / Login From Rare Following Suspicious Login Attempt(s)
- SaaS / Email Nexus / Unusual Location for SaaS and Email Activity
Subsequent activities, including inbox rule creations, registration of applications in Azure AD, and mass-mailing activity, resulted in breaches of the following DETECT models.
- SaaS / Admin / OAuth Permission Grant
- SaaS / Compromise / Unusual Logic Following OAuth Grant
- SaaS / Admin / New Application Service Principal
- IaaS / Admin / Azure Application Administration Activities
- SaaS / Compliance / New Email Rule
- SaaS / Compromise / Unusual Login and New Email Rule
- SaaS / Email Nexus / Suspicious Internal Exchange Activity
- SaaS / Email Nexus / Possible Outbound Email Spam
- SaaS / Compromise / Unusual Login and Outbound Email Spam
- SaaS / Compromise / Suspicious Login and Suspicious Outbound Email(s)
In cases where Darktrace RESPOND™ was enabled in autonomous response mode, ‘PerfectData Software’ activity chains resulted in breaches of the following RESPOND models:
• Antigena / SaaS / Antigena Suspicious SaaS Activity Block
• Antigena / SaaS / Antigena Significant Compliance Activity Block
In response to these model breaches, Darktrace RESPOND took immediate action, performing aggressive, inhibitive actions, such as forcing the actor to log out of the SaaS platform, and disabling the user entirely. When applied autonomously, these RESPOND actions would seriously impede an attacker’s progress and minimize network disruption.
In addition, Darktrace Cyber AI Analyst was able to autonomously investigate registrations of the ‘PerfectData Software’ application and summarized its findings into digestible reports.
Due to the widespread adoption of Microsoft 365 services in the workplace and continued emphasis on a remote workforce, account hijackings now pose a more serious threat to organizations around the world than ever before. The cases discussed here illustrate the tendency of malicious actors to conduct their activities from endpoints associated with VPN services, while also registering new applications, like PerfectData Software, with malicious intent.
While it was unclear exactly why the malicious actors were using ‘PerfectData Software’ as part of their account hijacking, it is clear that either the legitimate or spoofed version of the application is becoming an very likely emergent piece of threat actor tradecraft.
Darktrace DETECT’s anomaly-based approach to threat detection allowed it to recognize that the use of ‘PerfectData Software’ represented a deviation in the SaaS user’s expected behavior. While Darktrace RESPOND, when enabled in autonomous response mode, was able to quickly take preventative action against threat actors, blocking the potential use of the application for data exfiltration or other nefarious purposes.
MITRE ATT&CK Mapping
• T1598 – Phishing for Information
• T1110 – Brute Force
• T1078.004 – Valid Accounts: Cloud Accounts
Command and Control:
• T1105 – Ingress Tool Transfer
• T1098.003 – Account Manipulation: Additional Cloud Roles
• T1114 – Email Collection
• T1564.008 – Hide Artifacts: Email Hiding Rules
• T1534 – Internal Spearphishing
Unusual Source IPs
• 5.62.60[.]202 (AS198605 AVAST Software s.r.o.)
• 160.152.10[.]215 (AS37637 Smile-Nigeria-AS)
• 197.244.250[.]155 (AS37705 TOPNET)
• 169.159.92[.]36 (AS37122 SMILE)
• 45.62.170[.]237 (AS396073 MAJESTIC-HOSTING-01)
• 92.38.180[.]49 (AS202422 G-Core Labs S.A)
• 129.56.36[.]26 (AS327952 AS-NATCOM)
• 92.38.180[.]47 (AS202422 G-Core Labs S.A.)
• 107.179.20[.]214 (AS397086 LAYER-HOST-HOUSTON)
• 45.62.170[.]31 (AS396073 MAJESTIC-HOSTING-01)
Darktrace Integrates Self-Learning AI with Amazon Security Lake to Support Security Investigations
Darktrace has deepened its relationship with AWS by integrating its detection and response capabilities with Amazon Security Lake.
This development will allow mutual customers to seamlessly combine Darktrace AI’s bespoke understanding of their organization with the Threat Intelligence offered by other security tools, and investigate all of their alerts in one central location.
This integration will improve the value security teams get from both products, streamlining analyst workflows and improving their ability to detect and respond to the full spectrum of known and unknown cyber-threats.
How Darktrace and Amazon Security Lake augment security teams
Amazon Security Lake is a newly-released service that automatically centralizes an organization’s security data from cloud, on-premises, and custom sources into a customer owned purpose-built data lake. Both Darktrace and Amazon Security Lake support the Open Cybersecurity Schema Framework (OCSF), an open standard to simplify, combine, and analyze security logs.
Customers can store security logs, events, alerts, and other relevant data generated by various AWS services and security tools. By consolidating security data in a central lake, organizations can gain a holistic view of their security posture, perform advanced analytics, detect anomalies and open investigations to improve their security practices.
With Darktrace DETECT and RESPOND AI engines covering all assets across IT, OT, network, endpoint, IoT, email and cloud, organizations can augment the value of their security data lakes by feeding Darktrace’s rich and context-aware datapoints to Amazon Security Lake.
Amazon Security Lake empowers security teams to improve the protection of your digital estate:
- Quick and painless data normalization
- Fast-tracks ability to investigate, triage and respond to security events
- Broader visibility aids more effective decision-making
- Surfaces and prioritizes anomalies for further investigation
- Single interface for seamless data management
How will Darktrace customers benefit?
Across the Cyber AI Loop, all Darktrace solutions have been architected with AWS best practices in mind. With this integration, Darktrace is bringing together its understanding of ‘self’ for every organization with the centralized data visibility of the Amazon Security Lake. Darktrace’s unique approach to cyber security, powered by groundbreaking AI research, delivers a superior dataset based on a deep and interconnected understanding of the enterprise.
Where other cyber security solutions are trained to identify threats based on historical attack data and techniques, Darktrace DETECT gains a bespoke understanding of every digital environment, continuously analyzing users, assets, devices and the complex relationships between them. Our AI analyzes thousands of metrics to reveal subtle deviations that may signal an evolving issue – even unknown techniques and novel malware. It distinguishes between malicious and benign behavior, identifying harmful activity that typically goes unnoticed. This rich dataset is fed into RESPOND, which takes precise action to neutralize threats against any and every asset, no matter where data resides.
Both DETECT and RESPOND are supported by Darktrace Self-Learning AI, which provides full, real-time visibility into an organization’s systems and data. This always-on threat analysis already makes humans better at cyber security, improving decisions and outcomes based on total visibility of the digital ecosystem, supporting human performance with AI coverage and empowering security teams to proactively protect critical assets.
Converting Darktrace alerts to the Amazon Security Lake Open Cybersecurity Schema Framework (OCSF) supplies the Security Operations Center (SOC) and incident response team with contextualized data, empowering them to accelerate their investigation, triage and response to potential cyber threats.
Darktrace is available for purchase on the AWS Marketplace.
Learn more about how Darktrace provides full-coverage, AI-powered cloud security for AWS, or see how our customers use Darktrace in their AWS cloud environments.