Thanks to its accessibility from anywhere with an internet connection and a web browser, Software-as-a-Service (SaaS) platforms have become nearly universal across organizations worldwide. However, with this growing popularity comes greater responsibility. Increased attention attracts a larger audience, including those who may seek to exploit these widely used services. One crucial factor to be vigilant about in the SaaS landscape is safeguarding internal credentials. Minimal protection on accounts can lead to SaaS hijacking, which could allow further escalations within the network.
How does SaaS account takeover work?
SaaS hijacking occurs when a malicious actor takes control of a user’s active session with a SaaS application. Attackers can achieve this through various methods, including employees using company credentials on compromised or spoofed external websites, brute-force attacks, social engineering, and exploiting outdated software or applications.
After the hijack, attackers may escalate their actions by changing email rules and using internal addresses for additional social engineering attacks. The larger goal of these actions is often to steal internal data, damage reputations, and disrupt operations.
Account takeover protection
It has become essential to have security tools capable of outsmarting potential malicious actors. Traditional tools that rely on rules and signatures may not be able to identify new events, such as logins or activities from a rare endpoint, unless they come from a known malicious source.
Darktrace relies on analysis of user and network behavior, tailored to each customer, allowing it to identify anomalous events that the user typically does not engage in. In this way, unusual SaaS activities can be detected, and unwanted actions can be halted to allow time for remediation before further escalations.
The following cases, drawn from the global customer base, illustrate how Darktrace detects potential SaaS hijack attempts and further escalations, and applies appropriate actions when necessary.
Case 1: Unusual login after a phishing email
A customer in the US received a suspicious email that seemed to be from the legitimate file storage service, Dropbox. However, Darktrace identified that the reply-to email address, hremployeepyaroll@mail[.]com, was masquerading as one associated with the customer’s Human Resources (HR) department.
Further inspection of this sender address revealed that the attacker had intentionally misspelled ‘payroll’ to trick recipients into believing it was legitimate
Furthermore, the subject of the email indicated that the attackers were attempting a social engineering attack by sharing a file related to pay raises and benefits to capture the recipients' attention and increase the likelihood of their targets engaging with the email and its attachment.

Unknowingly, the recipient, who believed the email to be a legitimate HR communication, acted on it, allowing malicious attackers to gain access to the account. Following this, the recipient’s account was observed logging in from a rare location using multi-factor authentication (MFA) while also being active from another more commonly observed location, indicating that the SaaS account had been compromised.

Darktrace subsequently observed the SaaS actor creating new inbox rules on the account. These rules were intended to mark as read and move any emails mentioning the file storage company, whether in the subject or body, to the ‘Conversation History’ folder. This was likely an attempt by the threat actor to hide any outgoing phishing emails or related correspondence from the legitimate account user, as the ‘Conversation History’ folder typically goes unread by most users.
Typically, Darktrace / EMAIL would have instantly placed the phishing email in the junk folder before they reached user’s inbox, while also locking the links identified in the suspicious email, preventing them from being accessed. Due to specific configurations within the customer’s deployment, this did not happen, and the email remained accessible to the user.
Case 2: Login using unusual credentials followed by password change
In the latter half of 2024, Darktrace detected an unusual use of credentials when a SaaS actor attempted to sign into a customer’s Microsoft 365 application from an unfamiliar IP address in the US. Darktrace recognized that since the customer was located within the Europe, Middle East, and Africa (EMEA) region, a login from the US was unexpected and suspicious. Around the same time, the legitimate account owner logged into the customer’s SaaS environment from another location – this time from a South African IP, which was commonly seen within the environment and used by other internal SaaS accounts.
Darktrace understood that this activity was highly suspicious and unlikely to be legitimate, given one of the IPs was known and expected, while the other had never been seen before in the environment, and the simultaneous logins from two distant locations were geographically impossible.

Darktrace detected several unusual login attempts, including a successful login from an uncommon US source. Subsequently, Darktrace / NETWORK identified the device associated with this user making external connections to rare endpoints, some of which were only two weeks old. As this customer had integrated Darktrace with Microsoft Defender, the Darktrace detection was enriched by Defender, adding the additional context that the user had likely been compromised in an Adversary-in-the-Middle (AiTM) phishing attack. AiTM phishing attacks occur when a malicious attacker intercepts communications between a user and a legitimate authentication service, potentially leading to account hijacking. These attacks are harder to identify as they can bypass security measures like MFA.
Following this, Darktrace observed the attacker using the now compromised credentials to access password management and change the account's password. Such behavior is common in account takeover incidents, as attackers seek to maintain persistence within the SaaS environment.
While Darktrace’s Autonomous Response was not fully configured on the customer’s SaaS environment, they were subscribed to the Managed Threat Detection service offered by Darktrace’s Security Operations Center (SOC). This 24/7 service ensures that Darktrace’s analysts monitor and investigate emerging suspicious activity, informing customers in real-time. As such, the customer received notification of the compromise and were able to quickly take action to prevent further escalation.
Case 3: Unusual logins, new email rules and outbound spam
Recently, Darktrace has observed a trend in SaaS compromises involving unusual logins, followed by the creation of new email rules, and then outbound spam or phishing campaigns being launched from these accounts.
In October, Darktrace identified a SaaS user receiving an email with the subject line "Re: COMPANY NAME Request for Documents" from an unknown sender using a freemail account. As freemail addresses require very little personal information to create, threat actors can easily create multiple accounts for malicious purposes while retaining their anonymity.
Within the identified email, Darktrace found file storage links that were likely intended to divert recipients to fraudulent or malicious websites upon interaction. A few minutes after the email was received, the recipient was seen logging in from three different sources located in the US, UK, and the Philippines, all around a similar time. As the customer was based in the Philippines, a login from there was expected and not unusual. However, Darktrace understood that the logins from the UK and US were highly unusual, and no other SaaS accounts had connected from these locations within the same week.
After successfully logging in from the UK, the actor was observed updating a mailbox rule, renaming it to ‘.’ and changing its parameters to move any inbound emails to the deleted items folder and mark them as read.

Malicious actors often use ambiguous names like punctuation marks, repetitive letters, and unreadable words to name resources, disguising their rules to avoid detection by legitimate users or administrators. Similarly, attackers have been known to adjust existing rule parameters rather than creating new rules to keep their footprints untracked. In this case, the rule was updated to override an existing email rule and delete all incoming emails. This ensured that any inbound emails, including responses to potential phishing emails sent by the account, would be deleted, allowing the attacker to remain undetected.
Over the next two days, additional login attempts, both successful and failed, were observed from locations in the UK and the Philippines. Darktrace noted multiple logins from the Philippines where the legitimate user was attempting to access their account using a password that had recently expired or been changed, indicating that the attacker had altered the user’s original password as well.
Following this chain of events, over 500 emails titled “Reminder For Document Signed Agreement.10/28/2024” were sent from the SaaS actor’s account to external recipients, all belonging to a different organization within the Philippines.
These emails contained rare attachments with a ‘.htm’ extension, which included programming language that could initiate harmful processes on devices. While inherently not malicious, if used inappropriately, these files could perform unwanted actions such as code execution, malware downloads, redirects to malicious webpages, or phishing upon opening.

As this customer did not have Autonomous Response enabled for Darktrace / IDENTITY, the unusual activity went unattended, and the compromise was able to escalate to the point of a spam email campaign being launched from the account.
In a similar example on a customer network in EMEA, Darktrace detected unusual logins and the creation of new email rules from a foreign location through a SaaS account. However, in this instance, Autonomous Response was enabled and automatically disabled the compromised account, preventing further malicious activity and giving the customer valuable time to implement their own remediation measures.
Conclusion
Whether it is an unexpected login or an unusual sequence of events – such as a login followed by a phishing email being sent – unauthorized or unexpected activities can pose a significant risk to an organization’s SaaS environment. The threat becomes even greater when these activities escalate to account hijacking, with the compromised account potentially providing attackers access to sensitive corporate data. Organizations, therefore, must have robust SaaS security measures in place to prevent data theft, ensure compliance and maintain continuity and trust.
The Darktrace suite of products is well placed to detect and contain SaaS hijack attempts at multiple stages of an attack. Darktrace / EMAIL identifies initial phishing emails that attackers use to gain access to customer SaaS environments, while Darktrace / IDENTITY detects anomalous SaaS behavior on user accounts which could indicate they have been taken over by a malicious actor.
By identifying these threats in a timely manner and taking proactive mitigative measures, such as logging or disabling compromised accounts, Darktrace prevents escalation and ensures customers have sufficient time to response effectively.
Credit to Min Kim (Cyber Analyst) and Ryan Traill (Analyst Content Lead)
Appendices
Darktrace Model Detections Case 1
SaaS / Compromise / SaaS Anomaly Following Anomalous Login
SaaS / Compromise / Unusual Login and New Email Rule
SaaS / Compliance / Anomalous New Email Rule
SaaS / Unusual Activity / Multiple Unusual SaaS Activities
SaaS / Access / Unusual External Source for SaaS Credential Us
SaaS / Compromise / Login From Rare Endpoint While User is Active
SaaS / Email Nexus / Unusual Login Location Following Link to File Storage
Antigena / SaaS / Antigena Email Rule Block (Autonomous Response)
Antigena / SaaS / Antigena Suspicious SaaS Activity Block (Autonomous Response)
Antigena / SaaS / Antigena Enhanced Monitoring from SaaS User Block (Autonomous Response)
List of Indicators of Compromise (IoCs)
176.105.224[.]132 – IP address – Unusual SaaS Activity Source
hremployeepyaroll@mail[.]com – Email address – Reply-to email address
MITRE ATT&CK Mapping
Cloud Accounts – DEFENSE EVASION, PERSISTENCE, PRIVILEGE ESCALATION, INITIAL ACCESS – T1078
Outlook Rules – PERSISTENCE – T1137
Cloud Service Dashboard – DISCOVERY – T1538
Compromise Accounts – RESOURCE DEVELOPMENT – T1586
Steal Web Session Cookie – CREDENTIAL ACCESS – T1539
Darktrace Model Detections Case 2
SaaS / Compromise / SaaS Anomaly Following Anomalous Login
SaaS / Compromise / Unusual Login and Account Update
Security Integration / High Severity Integration Detection
SaaS / Access / Unusual External Source for SaaS Credential Use
SaaS / Compromise / Login From Rare Endpoint While User Is Active
SaaS / Compromise / Login from Rare High Risk Endpoint
SaaS / Access / M365 High Risk Level Login
Antigena / SaaS / Antigena Suspicious SaaS Activity Block (Autonomous Response)
Antigena / SaaS / Antigena Enhanced Monitoring from SaaS user Block (Autonomous Response)
List of IoCs
74.207.252[.]129 – IP Address – Suspicious SaaS Activity Source
MITRE ATT&CK Mapping
Cloud Accounts – DEFENSE EVASION, PERSISTENCE, PRIVILEGE ESCALATION, INITIAL ACCESS – T1078
Cloud Service Dashboard – DISCOVERY – T1538
Compromise Accounts – RESOURCE DEVELOPMENT – T1586
Steal Web Session Cookie – CREDENTIAL ACCESS – T1539
Darktrace Model Detections Case 3
SaaS / Compromise / Unusual Login and Outbound Email Spam
SaaS / Compromise / New Email Rule and Unusual Email Activity
SaaS / Compromise / Unusual Login and New Email Rule
SaaS / Email Nexus / Unusual Login Location Following Sender Spoof
SaaS / Email Nexus / Unusual Login Location Following Link to File Storage
SaaS / Email Nexus / Possible Outbound Email Spam
SaaS / Unusual Activity / Multiple Unusual SaaS Activities
SaaS / Email Nexus / Suspicious Internal Exchange Activity
SaaS / Compliance / Anomalous New Email Rule
List of IoCs
95.142.116[.]1 – IP Address – Suspicious SaaS Activity Source
154.12.242[.]58 – IP Address – Unusual Source
MITRE ATT&CK Mapping
Cloud Accounts – DEFENSE EVASION, PERSISTENCE, PRIVILEGE ESCALATION, INITIAL ACCESS – T1078
Compromise Accounts – RESOURCE DEVELOPMENT – T1586
Email Accounts – RESOURCE DEVELOPMENT – T1585
Phishing – INITIAL ACCESS – T1566
Outlook Rules – PERSISTENCE – T1137
Internal Spear phishing – LATERAL MOVEMENT - T1534