Try in Splunk Security Cloud

Description

The following analytic identifies instances where a user grants consent to an application requesting mail-related permissions within the Office 365 environment. It leverages O365 audit logs, specifically focusing on events related to application permissions and user consent actions. This activity is significant as it can indicate potential security risks, such as data exfiltration or spear phishing, if malicious applications gain access. If confirmed malicious, this could lead to unauthorized data access, email forwarding, or sending malicious emails from the compromised account. Validating the legitimacy of the application and consent context is crucial to prevent data breaches.

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

  • Last Updated: 2024-05-14
  • Author: Mauricio Velazco, Splunk
  • ID: fddad083-cdf5-419d-83c6-baa85e329595

Annotations

ATT&CK

ATT&CK

ID Technique Tactic
T1528 Steal Application Access Token Credential Access
Kill Chain Phase
  • Exploitation
NIST
  • DE.CM
CIS20
  • CIS 10
CVE
1
2
3
4
5
6
7
8
9
10
`o365_management_activity` Workload=AzureActiveDirectory Operation="Consent to application." ResultStatus=Success 
| eval admin_consent =mvindex('ModifiedProperties{}.NewValue', 0) 
| search admin_consent=False 
| eval permissions =mvindex('ModifiedProperties{}.NewValue', 4) 
| rex field=permissions "Scope: (?<Scope>[^,]+)" 
| makemv delim=" " Scope 
| search Scope IN ("Mail.Read", "Mail.ReadBasic", "Mail.ReadWrite", "Mail.Read.Shared", "Mail.ReadWrite.Shared", "Mail.Send", "Mail.Send.Shared") 
| stats max(_time) as lastTime values(Scope) by Operation, user, object, ObjectId 
| `security_content_ctime(lastTime)` 
| `o365_mail_permissioned_application_consent_granted_by_user_filter`

Macros

The SPL above uses the following Macros:

:information_source: o365_mail_permissioned_application_consent_granted_by_user_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.

  • _time
  • Workload
  • Operation
  • ResultStatus
  • ModifiedProperties{}.NewValue
  • object
  • ObjectId

How To Implement

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

Known False Positives

OAuth applications that require mail permissions may be legitimate, investigate and filter as needed.

Associated Analytic Story

RBA

Risk Score Impact Confidence Message
40.0 80 50 User $user$ consented an OAuth application that requests mail-related permissions.

: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: 2