Azure AD Tenant Wide Admin Consent Granted
Description
The following analytic identifies instances where admin consent is granted to an application within an Azure AD tenant. It leverages Azure AD audit logs, specifically events related to the admin consent action within the ApplicationManagement category. This activity is significant because admin consent allows applications to access data across the entire tenant, potentially exposing vast amounts of organizational data. If confirmed malicious, an attacker could gain extensive and persistent access to sensitive data, leading to data exfiltration, espionage, further malicious activities, and potential compliance violations.
- Type: TTP
-
Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
- Last Updated: 2024-05-23
- Author: Mauricio Velazco, Splunk
- ID: dc02c0ee-6ac0-4c7f-87ba-8ce43a4e4418
Annotations
ATT&CK
Kill Chain Phase
- Installation
- Exploitation
NIST
- DE.CM
CIS20
- CIS 10
CVE
Search
1
2
3
4
5
6
7
8
9
10
`azure_monitor_aad` operationName="Consent to application"
| eval new_field=mvindex('properties.targetResources{}.modifiedProperties{}.newValue', 4)
| rename properties.* as *
| rex field=new_field "ConsentType: (?<ConsentType>[^\,]+)"
| rex field=new_field "Scope: (?<Scope>[^\,]+)"
| search ConsentType = "AllPrincipals"
| stats count min(_time) as firstTime max(_time) as lastTime by operationName, user, targetResources{}.displayName, targetResources{}.id, ConsentType, Scope
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `azure_ad_tenant_wide_admin_consent_granted_filter`
Macros
The SPL above uses the following Macros:
azure_ad_tenant_wide_admin_consent_granted_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Required fields
List of fields required to use this analytic.
- _time
- operationName
- user
- properties.targetResources{}.modifiedProperties{}.newValue
- properties.targetResources{}.displayName
- properties.targetResources{}.id
How To Implement
You must install the latest version of Splunk Add-on for Microsoft Cloud Services from Splunkbase (https://splunkbase.splunk.com/app/3110/#/details). You must be ingesting Azure Active Directory events into your Splunk environment through an EventHub. This analytic was written to be used with the azure:monitor:aad sourcetype leveraging the Auditlogs log category.
Known False Positives
Legitimate applications may be granted tenant wide consent, filter as needed.
Associated Analytic Story
RBA
Risk Score | Impact | Confidence | Message |
---|---|---|---|
45.0 | 90 | 50 | Administrator $user$ consented an OAuth application for the tenant. |
The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.
Reference
- https://attack.mitre.org/techniques/T1098/003/
- https://www.mandiant.com/resources/blog/remediation-and-hardening-strategies-for-microsoft-365-to-defend-against-unc2452
- https://learn.microsoft.com/en-us/security/operations/incident-response-playbook-app-consent
- https://learn.microsoft.com/en-us/azure/active-directory/manage-apps/grant-admin-consent?pivots=portal
- https://microsoft.github.io/Azure-Threat-Research-Matrix/Persistence/AZT501/AZT501-2/
Test Dataset
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 | version: 3