ID | Technique | Tactic |
---|---|---|
T1114.003 | Email Forwarding Rule | Collection |
T1564.008 | Email Hiding Rules | Defense Evasion |
Detection: O365 Email Transport Rule Changed
Description
The following analytic identifies when a user with sufficient access to Exchange Online alters the mail flow/transport rule configuration of the organization. Transport rules are a set of rules that can be used by attackers to modify or delete emails based on specific conditions, this activity could indicate an attacker hiding or exfiltrated data.
Search
1`o365_management_activity` Workload=Exchange AND Operation IN ("Set-*","Disable-*","New-*","Remove-*") AND Operation="*TransportRule"
2
3| eval object_name = case('Parameters{}.Name'=="Name",mvindex('Parameters{}.Value',mvfind('Parameters{}.Name',"^Name$")),true(),ObjectId), object_id = case('Parameters{}.Name'=="Identity",mvindex('Parameters{}.Value',mvfind('Parameters{}.Name',"^Identity$")),true(),Id)
4
5| stats values(object_name) as object_name, min(_time) as firstTime, max(_time) as lastTime, count by object_id, UserId, Operation
6
7| rename UserId as user, Operation as signature
8
9| `security_content_ctime(firstTime)`
10
11| `security_content_ctime(lastTime)`
12
13| `o365_email_transport_rule_changed_filter`
Data Source
No data sources specified for this detection.
Macros Used
Name | Value |
---|---|
o365_management_activity | sourcetype=o365:management:activity |
o365_email_transport_rule_changed_filter | search * |
o365_email_transport_rule_changed_filter
is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
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 Risk Event | True |
Implementation
You must install the Splunk Microsoft Office 365 Add-on and ingest Office 365 management activity events.
Known False Positives
Legitimate administrative changes for business needs.
Associated Analytic Story
Risk Based Analytics (RBA)
Risk Message:
The user [$user$] altered the exchange transport rule id [$object_name$]
Risk Object | Risk Object Type | Risk Score | Threat Objects |
---|---|---|---|
user | user | 25 | object_name, object_id |
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: 1