Detection rules › Splunk

O365 Mailbox Inbox Folder Shared with All Users

Status
production
Severity
medium
Group by
"Item.ParentFolder.MemberRights", "Item.ParentFolder.MemberUpn", MailboxOwnerUPN, aws::recipientAccountId, dest, group.name, signature, src, user, vendor_product
Author
Mauricio Velazco, Splunk
Source
github.com/splunk/security_content

The following analytic detects instances where the inbox folder of an Office 365 mailbox is shared with all users within the tenant. It leverages Office 365 management activity events to identify when the 'Inbox' folder permissions are modified to include 'Everyone' with read rights. This activity is significant as it represents a potential security risk, allowing unauthorized access to sensitive emails. If confirmed malicious, this could lead to data breaches, exfiltration of confidential information, and further compromise through spear-phishing or other malicious activities based on the accessed email content.

Known false positives

  • Administrators might temporarily share a mailbox with all users for legitimate reasons, such as troubleshooting, migrations, or other administrative tasks. Some organizations use shared mailboxes for teams or departments where multiple users need access to the same mailbox. Filter as needed.

MITRE ATT&CK coverage

Telemetry coverage

PlatformRecord / event type
Microsoft 365ModifyFolderPermissions

Rules detecting the same action

These rules filter on the same operation.

Rule body

name: O365 Mailbox Inbox Folder Shared with All Users
id: 21421896-a692-4594-9888-5faeb8a53106
version: 10
creation_date: '2023-12-06'
modification_date: '2026-05-13'
author: Mauricio Velazco, Splunk
status: production
type: TTP
description: The following analytic detects instances where the inbox folder of an Office 365 mailbox is shared with all users within the tenant. It leverages Office 365 management activity events to identify when the 'Inbox' folder permissions are modified to include 'Everyone' with read rights. This activity is significant as it represents a potential security risk, allowing unauthorized access to sensitive emails. If confirmed malicious, this could lead to data breaches, exfiltration of confidential information, and further compromise through spear-phishing or other malicious activities based on the accessed email content.
data_source:
    - O365 ModifyFolderPermissions
search: "`o365_management_activity` Operation=ModifyFolderPermissions Workload=Exchange object=Inbox Item.ParentFolder.MemberUpn=Everyone | eval isReadRole=if(match('Item.ParentFolder.MemberRights',\"(ReadAny)\"), \"true\", \"false\") | search isReadRole = \"true\" | rename UserId as user | fillnull | stats count earliest(_time) as firstTime latest(_time) as lastTime by signature, user, dest, vendor_account, vendor_product, object, MailboxOwnerUPN, Item.ParentFolder.MemberUpn, Item.ParentFolder.MemberRights, src | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `o365_mailbox_inbox_folder_shared_with_all_users_filter`"
how_to_implement: You must install the Splunk Microsoft Office 365 Add-on and ingest Office 365 management activity events.
known_false_positives: Administrators might temporarily share a mailbox with all users for legitimate reasons, such as troubleshooting, migrations, or other administrative tasks. Some organizations use shared mailboxes for teams or departments where multiple users need access to the same mailbox. Filter as needed.
references:
    - https://attack.mitre.org/techniques/T1114/002/
    - https://www.mandiant.com/sites/default/files/2022-08/remediation-hardening-strategies-for-m365-defend-against-apt29-white-paper.pdf
    - https://www.blackhillsinfosec.com/abusing-exchange-mailbox-permissions-mailsniper/
    - https://learn.microsoft.com/en-us/purview/audit-mailboxes
    - https://learn.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxodlgt/5610c6e6-3268-44e3-adff-8804f5315946
finding:
    title: Inbox folder for the $MailboxOwnerUPN$ mailbox was shared with all users.
    entity:
        field: MailboxOwnerUPN
        type: user
        score: 50
analytic_story:
    - Office 365 Persistence Mechanisms
asset_type: O365 Tenant
mitre_attack_id:
    - T1114.002
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: cloud
security_domain: access

Stages and Predicates

Stage 1: search

`o365_management_activity` Operation=ModifyFolderPermissions Workload=Exchange object=Inbox Item.ParentFolder.MemberUpn=Everyone

Stage 2: eval

| eval isReadRole=if(match('Item.ParentFolder.MemberRights',"(ReadAny)"), "true", "false")
isReadRole =
ifmatch('Item.ParentFolder.MemberRights', "(ReadAny)")"true"
else"false"

Stage 3: search

| search isReadRole = "true"

Stage 4: rename

| rename UserId as user

Stage 5: fillnull

| fillnull

Stage 6: stats

| stats count earliest(_time) as firstTime latest(_time) as lastTime by signature, user, dest, vendor_account, vendor_product, object, MailboxOwnerUPN, Item.ParentFolder.MemberUpn, Item.ParentFolder.MemberRights, src

Stage 7: search

| `security_content_ctime(firstTime)`

Stage 8: search

| `security_content_ctime(lastTime)`

Stage 9: search

| `o365_mailbox_inbox_folder_shared_with_all_users_filter`

Indicators

These rows show field, operator, and value matches.