Try in Splunk Security Cloud

Description

The following analytic identifies instances where the Mail.Read Graph API permissions are granted to an application registration within an Office 365 tenant. It leverages O365 audit logs, specifically events related to changes in application permissions within the AzureActiveDirectory workload. The Mail.Read permission allows applications to access and read all emails within a user's mailbox. Emails often contain sensitive or confidential information, and unauthorized access can lead to data breaches or leakage. Monitoring the assignment of this permission ensures that only legitimate applications have such access and that any inadvertent or malicious assignments are promptly identified. If an attacker successfully grants this permission to a malicious or compromised application, they can read all emails in the affected mailboxes. This can lead to data exfiltration, spear-phishing attacks, or further compromise based on the information gathered from the emails.

  • Type: TTP
  • Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud

  • Last Updated: 2023-09-01
  • Author: Mauricio Velazco, Splunk
  • ID: 27ab61c5-f08a-438a-b4d3-325e666490b3

Annotations

ATT&CK

ATT&CK

ID Technique Tactic
T1114.002 Remote Email Collection Collection
T1114 Email Collection Collection
T1098 Account Manipulation Persistence, Privilege Escalation
T1098.003 Additional Cloud Roles Persistence, Privilege Escalation
Kill Chain Phase
  • Exploitation
  • Installation
NIST
  • DE.CM
CIS20
  • CIS 10
CVE
1
2
3
4
5
6
7
8
9
10
`o365_management_activity` Operation="Update application." 
| eval json_data=mvindex('ModifiedProperties{}.NewValue', 0) 
| eval json_data=replace(json_data, "^\[\s*", "") 
| eval json_data=replace(json_data, "\s*\]$", "") 
| spath input=json_data path=RequiredAppPermissions{}.EntitlementId output=EntitlementIds 
| eval match_found=mvfind(EntitlementIds, "810c84a8-4a9e-49e6-bf7d-12d183f40d01") 
| where isnotnull(match_found) 
| stats max(_time) as lastTime values(EntitlementIds) as EntitlementIds by Operation, user, object 
| `security_content_ctime(lastTime)` 
| `o365_mailbox_read_access_granted_to_application_filter`

Macros

The SPL above uses the following Macros:

:information_source: o365_mailbox_read_access_granted_to_application_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Required fields

List of fields required to use this analytic.

  • Operation
  • _time
  • ModifiedProperties{}.NewValue

How To Implement

You must install the Splunk Microsoft Office 365 Add-on and ingest Office 365 management activity events.

Known False Positives

There are legitimate scenarios in wich an Application registrations requires Mailbox read access. Filter as needed.

Associated Analytic Story

RBA

Risk Score Impact Confidence Message
45.0 90 50 Application registration $object$ was grandes mailbox read access by $user$

:information_source: The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.

Reference

Test Dataset

Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range

source | version: 1