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, signature
6
7| rename UserId as user
8
9| `security_content_ctime(firstTime)`
10
11| `security_content_ctime(lastTime)`
12
13| `o365_email_transport_rule_changed_filter`
Data Source
Macros Used
| Name |
Value |
| security_content_ctime |
convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$) |
| 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
| ID |
Technique |
Tactic |
| T1114.003 |
Email Forwarding Rule |
Collection |
| T1564.008 |
Email Hiding Rules |
Stealth |
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 Finding (Notable) |
No |
| Creates Intermediate Finding (Risk Event) |
Yes |
Anomaly detections generate Intermediate Findings (Risk Events). They do not generate a Finding (Notable) directly.
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
| Message |
Entity Field |
Entity Type |
Risk Score |
| The user [$user$] altered the exchange transport rule id [$object_name$] |
user |
user |
20 |
Threat Objects
| Field |
Type |
| object_name |
signature |
| object_id |
signature |
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: 7