Techniques
Sample rules
Azure AD FullAccessAsApp Permission Assigned
- source: splunk
- technicques:
- T1098.002
- T1098.003
Description
The following analytic detects the assignment of the ‘full_access_as_app’ permission to an application within Office 365 Exchange Online. This is identified by the GUID ‘dc890d15-9560-4a4c-9b7f-a736ec74ec40’ and the ResourceAppId ‘00000002-0000-0ff1-ce00-000000000000’. The detection leverages the azure_monitor_aad data source, focusing on AuditLogs with the operation name ‘Update application’. This activity is significant as it grants broad control over Office 365 operations, including full access to all mailboxes and the ability to send emails as any user. If malicious, this could lead to unauthorized access and data exfiltration.
Detection logic
`azure_monitor_aad` category=AuditLogs operationName="Update application"
| eval newvalue = mvindex('properties.targetResources{}.modifiedProperties{}.newValue',0)
| spath input=newvalue
| search "{}.ResourceAppId"="00000002-0000-0ff1-ce00-000000000000" "{}.RequiredAppPermissions{}.EntitlementId"="dc890d15-9560-4a4c-9b7f-a736ec74ec40"
| eval Permissions = '{}.RequiredAppPermissions{}.EntitlementId'
| stats count earliest(_time) as firstTime latest(_time) as lastTime values(Permissions) by user, object, user_agent, operationName
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `azure_ad_fullaccessasapp_permission_assigned_filter`
O365 FullAccessAsApp Permission Assigned
- source: splunk
- technicques:
- T1098.002
- T1098.003
Description
The following analytic detects the assignment of the ‘full_access_as_app’ permission to an application registration in Office 365 Exchange Online. This detection leverages Office 365 management activity logs and filters Azure Active Directory workload events to identify when the specific permission, identified by GUID ‘dc890d15-9560-4a4c-9b7f-a736ec74ec40’, is granted. This activity is significant because it provides extensive control over Office 365 operations, including access to all mailboxes and the ability to send mail as any user. If confirmed malicious, this could lead to unauthorized data access, exfiltration, or account compromise. Immediate investigation is required.
Detection logic
`o365_management_activity` Workload=AzureActiveDirectory Operation="Update application."
| eval newvalue = mvindex('ModifiedProperties{}.NewValue',0)
| spath input=newvalue
| search "{}.ResourceAppId"="00000002-0000-0ff1-ce00-000000000000" "{}.RequiredAppPermissions{}.EntitlementId"="dc890d15-9560-4a4c-9b7f-a736ec74ec40"
| eval Permissions = '{}.RequiredAppPermissions{}.EntitlementId'
| stats count earliest(_time) as firstTime latest(_time) as lastTime values(Permissions) by user, object, user_agent, Operation
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `o365_fullaccessasapp_permission_assigned_filter`