/
o365_multiple_service_principals_created_by_user.yml
61 lines (61 loc) · 3 KB
/
o365_multiple_service_principals_created_by_user.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: O365 Multiple Service Principals Created by User
id: a34e65d0-54de-4b02-9db8-5a04522067f6
version: 1
date: '2024-02-07'
author: Mauricio Velazco, Splunk
data_source:
- O365 Add service principal.
type: Anomaly
status: production
description: This detection is tailored to spot occurrences where a single user, rather than a service principal, creates more than three unique OAuth applications within a 10-minute window in the Office 365 environment. Utilizing O365 logs from the Unified Audit Log, it focuses on the 'Add service principal' operation in Azure Active Directory. The query segments events into 10-minute intervals, exclusively monitoring user activities. It calculates the number of distinct OAuth applications initiated by each user, providing SOC teams with essential data for identifying potential security threats. Such activity could suggest that a user account is either compromised or engaged in unauthorized activities, potentially setting the stage for broader network infiltration or privilege escalation. It's important for security teams to adjust the threshold of three applications to fit their operational context.
search: >-
`o365_management_activity` Workload=AzureActiveDirectory Operation="Add service principal."
| bucket span=10m _time
| eval len=mvcount('Actor{}.ID')
| eval userType = mvindex('Actor{}.ID',len-1)
| search userType = "User"
| eval displayName = object
| stats count earliest(_time) as firstTime latest(_time) as lastTime values(displayName) as displayName dc(displayName) as unique_apps by src_user
| where unique_apps > 3
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `o365_multiple_service_principals_created_by_user_filter`
how_to_implement: You must install the Splunk Microsoft Office 365 Add-on and ingest Office 365 management activity events.
known_false_positives: Certain users or applications may create multiple service principals in a short period of time for legitimate purposes. Filter as needed.
references:
- https://attack.mitre.org/techniques/T1136/003/
- https://www.microsoft.com/en-us/security/blog/2024/01/25/midnight-blizzard-guidance-for-responders-on-nation-state-attack/
tags:
analytic_story:
- Office 365 Persistence Mechanisms
- NOBELIUM Group
asset_type: O365 Tenant
confidence: 60
impact: 70
message: Multiple OAuth applications were created by $src_user$ in a short period of time
mitre_attack_id:
- T1136.003
observable:
- name: src_user
type: User
role:
- Victim
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
required_fields:
- _time
- Workload
- Operation
- Actor{}.ID
- src_user
- object
risk_score: 42
security_domain: identity
tests:
- name: True Positive Test
attack_data:
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1136.003/o365_multiple_service_principals_created/o365_multiple_service_principals_created.log
source: o365
sourcetype: o365:management:activity