Skip to content

Commit 1ac26e3

Browse files
authored
Update o365_exfiltration_via_file_sync_download.yml
update search yaml for better readability / remove single quote in SPL issues
1 parent 84c1a4c commit 1ac26e3

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

detections/cloud/o365_exfiltration_via_file_sync_download.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@ type: Anomaly
88
description: The following analytic detects when an excessive number of files are sync from o365 by the same user over a short period of time. A malicious actor abuse the user-agent string through GUI or API access to evade triggering the FileDownloaded event. This behavior may indicate an attacker staging data for exfiltration or an insider threat removing organizational data. Additional attention should be taken with any Azure Guest (#EXT#) accounts.
99
data_source:
1010
- Office 365 Universal Audit Log
11-
search: '`o365_management_activity` Operation IN ("filesyncdownload*") UserAgent="*SkyDriveSync*"
12-
| eval user = replace(mvindex(split(lower(UserId),"#ext#"),0),"_","@"), user_flat = replace(UserId, "[^A-Za-z0-9]","_")
13-
| where NOT match(SiteUrl,user_flat)
14-
| stats values(user) as user, latest(ClientIP) as src values(ZipFileName) as file_name, values(Operation) as signature, values(UserAgent) as http_user_agent, dc(SourceFileName) as count, min(_time) as firstTime, max(_time) as lastTime by Workload,UserId,SiteUrl
15-
| rename SiteUrl as file_path,Workload as app
16-
| where count > 50
17-
| `security_content_ctime(firstTime)`
18-
| `security_content_ctime(lastTime)`
19-
| `o365_exfiltration_via_file_sync_download_filter`'
11+
search: |-
12+
`o365_management_activity` Operation IN ("filesyncdownload*") UserAgent="*SkyDriveSync*"
13+
| eval user = replace(mvindex(split(lower(UserId),"#ext#"),0),"_","@"), user_flat = replace(UserId, "[^A-Za-z0-9]","_")
14+
| where NOT match(SiteUrl,user_flat)
15+
| stats values(user) as user, latest(ClientIP) as src values(ZipFileName) as file_name, values(Operation) as signature, values(UserAgent) as http_user_agent, dc(SourceFileName) as count, min(_time) as firstTime, max(_time) as lastTime by Workload,UserId,SiteUrl
16+
| rename SiteUrl as file_path,Workload as app
17+
| where count > 50
18+
| `security_content_ctime(firstTime)`
19+
| `security_content_ctime(lastTime)`
20+
| `o365_exfiltration_via_file_sync_download_filter`
2021
how_to_implement: You must install the Splunk Microsoft Office 365 Add-on and ingest Office 365 management activity events.
2122
known_false_positives: It is possible that certain file sync scenarios may trigger this alert, specifically OneNote. Adjust threshold and filtering as needed.
2223
references:

0 commit comments

Comments
 (0)