/
o365_user_consent_blocked_for_risky_application.yml
62 lines (62 loc) · 3.77 KB
/
o365_user_consent_blocked_for_risky_application.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
62
name: O365 User Consent Blocked for Risky Application
id: 242e4d30-cb59-4051-b0cf-58895e218f40
version: 1
date: '2023-10-11'
author: Mauricio Velazco, Splunk
status: production
type: TTP
data_source:
- O365 Consent to application.
description: The following analytic identifies instances where Office 365 has blocked a user's attempt to grant consent to an application deemed risky or potentially malicious. This suggests that the application has exhibited behaviors or characteristics that are commonly associated with malicious intent or poses a security risk. This detection leverages the O365 audit logs, specifically focusing on events related to user consent actions and system-driven blocks. By filtering for blocked consent actions associated with applications, the analytic highlights instances where O365's built-in security measures have intervened. Applications that are flagged and blocked by O365 typically exhibit suspicious characteristics or behaviors. Monitoring for these blocked consent attempts helps security teams identify potential threats early on and can provide insights into users who might be targeted or susceptible to such risky applications. It's an essential layer of defense in ensuring that malicious or risky applications don't gain access to organizational data. If the detection is a true positive, it indicates that the built-in security measures of O365 successfully prevented a potentially harmful application from gaining access. However, the attempt itself suggests that either a user might be targeted or that there's a presence of malicious applications trying to infiltrate the organization. Immediate investigation is required to understand the context of the block and to take further preventive measures.
search: >-
`o365_management_activity` Workload=AzureActiveDirectory Operation="Consent to application." ResultStatus=Failure
| eval permissions =mvindex('ModifiedProperties{}.NewValue', 4)
| eval reason =mvindex('ModifiedProperties{}.NewValue', 5)
| search reason = "Risky application detected"
| rex field=permissions "Scope: (?<Scope>[^,]+)"
| stats max(_time) as lastTime by Operation, user, reason, object, Scope
| `security_content_ctime(lastTime)`
| `o365_user_consent_blocked_for_risky_application_filter`
how_to_implement: You must install the Splunk Microsoft Office 365 Add-on and ingest Office 365 management activity events.
known_false_positives: Microsofts algorithm to identify risky applications is unknown and may flag legitimate applications.
references:
- https://attack.mitre.org/techniques/T1528/
- https://www.microsoft.com/en-us/security/blog/2022/09/22/malicious-oauth-applications-used-to-compromise-email-servers-and-spread-spam/
- https://learn.microsoft.com/en-us/azure/active-directory/manage-apps/protect-against-consent-phishing
- https://learn.microsoft.com/en-us/defender-cloud-apps/investigate-risky-oauth
- https://www.alteredsecurity.com/post/introduction-to-365-stealer
- https://github.com/AlteredSecurity/365-Stealer
tags:
analytic_story:
- Office 365 Account Takeover
asset_type: O365 Tenant
confidence: 100
impact: 30
message: O365 has blocked $user$ attempt to grant to consent to an application deemed risky.
mitre_attack_id:
- T1528
observable:
- name: user
type: User
role:
- Victim
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
risk_score: 30
required_fields:
- _time
- Workload
- Operation
- ResultStatus
- ModifiedProperties{}.NewValue
- object
- ObjectId
security_domain: identity
tests:
- name: True Positive Test
attack_data:
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1528/o365_user_consent_blocked/o365_user_consent_blocked.log
source: o365
sourcetype: o365:management:activity