Back to blog
Threat Intel
Phishing Forensics

Hunting M365 Mailbox Exfiltration Without Endpoint Surveillance

Catch rogue employees and compromised insiders using M365 Unified Audit Logs before the data leaves your tenant.

MailSleuth Research
Email Security Team
October 17, 20267 min read
Editorial illustration of a shadowy figure unlocking a glowing digital vault from the inside.

The hardest breach to triage isn't the advanced persistent threat burning zero-days to bypass your perimeter. It is the angry vice president downloading forty gigabytes of customer data to a local drive on their last day of work. Authorized access weaponized against the organization bypasses nearly every traditional perimeter control you own. We spend our budgets building fortresses to keep the bad guys out, entirely forgetting that the people inside the fortress already hold the keys to the kingdom.

Effective insider threat detection m365 implementations do not rely on installing invasive spyware on employee laptops. Instead, they require a deep understanding of application-layer telemetry. When an identity performs an action, you need to be able to measure the intent behind that action. You have to differentiate between an employee doing their job and an employee building an unauthorized golden parachute.

Hunting for insider data theft requires shifting your focus from the endpoint to the cloud control plane. By monitoring the Microsoft 365 Unified Audit Log, security operations centers can identify mass downloads, hidden forwarding rules, and anomalous synchronization events without turning the corporate network into a surveillance state.

The Cash App Lesson on Legitimate Access

In April 2022, Block filed a disclosure with the Securities and Exchange Commission regarding a data breach at Cash App. A former employee downloaded reports containing customer information, including full names and brokerage account details. The most critical detail of this incident was the attack vector. The former employee had regular access to these reports as part of their past job responsibilities. There was no malware, no phishing payload, and no exploited vulnerability. The user logged in, requested the data, and the application happily complied.

This scenario represents a nightmare for detection engineering. The authentication checks passed. Multi-factor authentication was satisfied. Endpoint detection and response agents saw a legitimate user running a legitimate web browser. The access was fully authenticated, making standard credential theft playbooks useless.

Defining the Blast Radius of Authorized Abuse

When a threat actor compromises an account, they usually have to spend time performing discovery. They search SharePoint for passwords, query the Global Address List, and stumble around the environment. A malicious insider skips the discovery phase entirely. They already know exactly where the sensitive data lives, what it is named, and how to export it. The dwell time is functionally zero. By the time a traditional behavioral alert fires for abnormal location or impossible travel, the insider has already exfiltrated the data and cleared their tracks.

The Theater of Endpoint Surveillance

Faced with the threat of internal data theft, many security teams deploy heavy-handed endpoint agents. They rely on screen recorders, keystroke loggers, and aggressive data loss prevention agents that intercept every web request. This approach creates the illusion of security while generating an unbearable volume of useless alerts.

Signal to Noise Ratios in Endpoint Monitoring

Endpoint surveillance generates massive noise because it inspects the mechanism of access rather than the data itself. A user copying text from a confidential document into a personal webmail client might trigger an alert, but so will a user copying a recipe into a text file. Analysts spend their days wading through false positives, watching employees type passwords into personal bank accounts, while actual exfiltration occurs via allowed corporate channels.

Furthermore, endpoint monitoring falls apart when employees use unmanaged devices or access cloud resources from mobile phones. If your security architecture relies on an agent installed on a corporate laptop, any data accessed via a personal iPad is invisible. To achieve true visibility, you must monitor the application holding the data, not the device requesting it.

Anatomy of M365 Exfiltration Telemetry

The Microsoft 365 Unified Audit Log is the central nervous system for cloud telemetry. For Exchange Online, we specifically care about mailbox audit logging. To catch exfiltration, you need to understand how Exchange records read and download actions. Historically, Microsoft used an operation called MessageBind, which was notoriously noisy and difficult to parse. This was replaced in Microsoft Purview Audit Premium with the MailItemsAccessed operation.

Deconstructing MailItemsAccessed

The MailItemsAccessed operation provides critical context about how a user interacted with their mailbox. It logs two distinct types of access. The first is a Bind operation, which occurs when a user clicks on and opens a specific, individual email. The second is a Sync operation, which occurs when a desktop client or mobile application connects to the Exchange server and pulls down an entire folder or mailbox at once.

Operation: MailItemsAccessed, ResultStatus: Succeeded, OperationProperties: [{Name: MailAccessType, Value: Sync}, {Name: IsThrottled, Value: False}]

A massive spike in Sync operations from a user who typically relies on Outlook on the Web is a massive red flag. Attackers and rogue employees will often connect a third-party mail client via IMAP or Exchange Web Services to quietly download years of communication. By monitoring the SessionId and the volume of items accessed within a specific time window, defenders can quantify exactly how many megabytes of email were pulled off the server.

Inbox Rules and Unapproved Forwarding

Downloading bulk archives is loud. A quieter, more insidious exfiltration technique is auto-forwarding. An insider preparing to leave a company might set a hidden rule to forward all emails containing project code names to their personal Gmail account. This creates a continuous, slow-drip data leak that can run for months undetected.

When a user configures a new rule in Outlook, Exchange generates a New-InboxRule event in the Unified Audit Log. If they modify an existing rule, it generates a Set-InboxRule event. Analysts must parse the parameters of these events, specifically looking for the ForwardTo, ForwardAsAttachmentTo, and RedirectTo fields.

Insiders attempt to hide these rules by naming them innocuous things like Junk Filter, Sort, or even just a single period. They often bury the forwarding action inside a larger rule that moves legitimate newsletters to a specific folder, hoping the security team will stop reading the alert payload after seeing the first action. The danger of external forwarding is compounded by authentication protocols. While corporate forwarders often break Sender Policy Framework alignment due to changing the return path, an insider exfiltrating data to their own account does not care if the email lands in their spam folder, so long as it leaves the tenant.

Baselining Normalcy and Deploying KQL

You cannot write an effective detection for abnormal behavior until you know what normal looks like in your specific environment. Legal teams regularly perform eDiscovery searches that trigger thousands of Bind events. Human Resources and IT administrators perform bulk exports as part of offboarding routines. If you set a static threshold for MailItemsAccessed events, your operations center will drown in false positives by noon.

The solution is behavioral baselining using Kusto Query Language in Microsoft Sentinel. Instead of alerting when a user accesses five thousand emails, you alert when a user exceeds their own historical average by three standard deviations. You start by querying the OfficeActivity table, filtering for the MailItemsAccessed operation, and aggregating the count of accessed items by UserId over a fourteen day lookback period.

Using time series analysis functions in KQL allows you to map out a user's typical daily rhythm. You isolate Sync events and compare the current hour's volume to the established baseline. When a user who normally reads fifty emails a day suddenly triggers a sync event for sixty thousand items originating from a residential IP address, you have a high-fidelity indicator of exfiltration.

Context is everything. You must enrich these KQL alerts with identity telemetry. If the Okta system log or Azure Active Directory shows that this user recently accessed a severance document in SharePoint, or if they are currently on a human resources watch list, the alert severity upgrades immediately. You bypass tier one triage and move straight to incident containment.

The takeaway

Finding an insider threat before the damage is permanent requires precise, application-layer visibility. You have to stop treating authenticated users as inherently safe and start treating them as highly privileged identities capable of catastrophic damage. The telemetry exists in the Microsoft 365 control plane to catch mass downloads and hidden forwarding rules, provided you have the engineering discipline to parse the logs and establish accurate behavioral baselines.

When you do catch an anomaly, the investigation phase begins. When you need to drill down into the headers of those forwarded emails, verify DKIM body hash mismatches, or analyze the exact routing hops of an exfiltration attempt, plugging those raw logs into MailSleuth.AI accelerates your timeline from hours to minutes. Keep your KQL queries tight, watch your standard deviations, and trust the telemetry over the endpoint agent.

#m365-security#kql#insider-threat#unified-audit-log#sentinel#data-exfiltration
MailSleuth Research
Email Security Team

We dissect phishing campaigns and email infrastructure so you don't have to.