event.dataset: "o365.audit" and
event.provider: "Exchange" and
event.outcome: "success" and
not o365.audit.UserType : (3 or 4) and
(
(event.action: "Add-MailboxPermission" and o365.audit.Parameters.AccessRights: "FullAccess") or
(event.action: "Add-RecipientPermission" and o365.audit.Parameters.AccessRights: "SendAs") or
(event.action: "Set-Mailbox" and o365.audit.Parameters.GrantSendOnBehalfTo: *)
) and
not user.id:(
"NT AUTHORITY\SYSTEM (Microsoft.Exchange.ServiceHost)" or
"NT AUTHORITY\SYSTEM (Microsoft.Exchange.AdminApi.NetCore)" or
"NT AUTHORITY\SYSTEM (w3wp)"
)
Install detection rules in Elastic Security
Detect Suspicious Mailbox Permission Delegation in Exchange Online in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(opens in a new tab or window).