Detection: O365 Advanced Audit Disabled

Description

The following analytic detects instances where the O365 advanced audit is disabled for a specific user within the Office 365 tenant. It uses O365 audit logs, focusing on events related to audit license changes in AzureActiveDirectory workloads. This activity is significant because the O365 advanced audit provides critical logging and insights into user and administrator activities. Disabling it can blind security teams to potential malicious actions. If confirmed malicious, attackers could operate within the user's mailbox or account with reduced risk of detection, leading to unauthorized data access, data exfiltration, or account compromise.

 1`o365_management_activity` Operation="Change user license."  
 2| eval property_name = mvindex ('ExtendedProperties{}.Name', 1) 
 3| search property_name = "extendedAuditEventCategory" 
 4| eval additionalDetails = mvindex('ExtendedProperties{}.Value',0) 
 5| eval split_value=split(additionalDetails, "NewValue") 
 6| eval possible_plan=mvindex(split_value, 1)  
 7| rex field="possible_plan" "DisabledPlans=\[(?P<DisabledPlans>[^\]]+)\]" 
 8| search DisabledPlans IN ("*M365_ADVANCED_AUDITING*") 
 9| stats min(_time) as firstTime max(_time) as lastTime by Operation user object DisabledPlans 
10| `security_content_ctime(firstTime)`  
11| `security_content_ctime(lastTime)` 
12| `o365_advanced_audit_disabled_filter`

Data Source

Name Platform Sourcetype Source Supported App
O365 Change user license. N/A 'o365:management:activity' 'o365' N/A

Macros Used

Name Value
o365_management_activity sourcetype=o365:management:activity
o365_advanced_audit_disabled_filter search *
o365_advanced_audit_disabled_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Annotations

- MITRE ATT&CK
+ Kill Chain Phases
+ NIST
+ CIS
- Threat Actors
ID Technique Tactic
T1562 Impair Defenses Defense Evasion
T1562.008 Disable or Modify Cloud Logs Defense Evasion
KillChainPhase.EXPLOITAITON
NistCategory.DE_CM
Cis18Value.CIS_10
Magic Hound
APT29

Default Configuration

This detection is configured by default in Splunk Enterprise Security to run with the following settings:

Setting Value
Disabled true
Cron Schedule 0 * * * *
Earliest Time -70m@m
Latest Time -10m@m
Schedule Window auto
Creates Notable Yes
Rule Title %name%
Rule Description %description%
Notable Event Fields user, dest
Creates Risk Event True
This configuration file applies to all detections of type TTP. These detections will use Risk Based Alerting and generate Notable Events.

Implementation

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

Known False Positives

Administrators might temporarily disable the advanced audit for troubleshooting, performance reasons, or other administrative tasks. Filter as needed.

Associated Analytic Story

Risk Based Analytics (RBA)

Risk Message Risk Score Impact Confidence
Advanced auditing for user $object$ was disabled by $user$ 32 40 80
The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.

References

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation Passing N/A N/A N/A
Unit Passing Dataset o365 o365:management:activity
Integration ✅ Passing Dataset o365 o365:management:activity

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