LoFP LoFP / the full_access_as_app api permission may be assigned to legitimate applications. filter as needed.

Techniques

Sample rules

O365 FullAccessAsApp Permission Assigned

Description

The following analytic triggers on the assignment of the ‘full_access_as_app’ permission to an application registration in Office 365, specifically within Exchange Online. The ‘full_access_as_app’ permission, identified by its GUID ‘dc890d15-9560-4a4c-9b7f-a736ec74ec40’, allows an application extensive control over Office 365 operations, including access to all mailboxes and the ability to send mail as any user. The analytic focuses on the ResourceAppId ‘00000002-0000-0ff1-ce00-000000000000’, pinpointing permissions granted to the Office 365 Exchange Online resource. By analyzing Office 365 management activity logs and filtering Azure Active Directory workload events, the query detects when this specific permission is assigned. Monitoring this assignment is vital due to the broad access it provides, which can lead to unauthorized data access or exfiltration if misused. A true positive detection requires immediate attention to prevent potential security risks like account compromise or data loss.

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`

Azure AD FullAccessAsApp Permission Assigned

Description

The following analytic identifies when the ‘full_access_as_app’ permission, marked by the GUID ‘dc890d15-9560-4a4c-9b7f-a736ec74ec40’, is assigned to an application within Office 365 Exchange Online, identified by ResourceAppId ‘00000002-0000-0ff1-ce00-000000000000’. This permission grants broad control over Office 365 operations, including full access to all mailboxes and the capability to send emails as any user. The query utilizes the azure_monitor_aad data source, focusing on AuditLogs with the operation name ‘Update application’. This monitoring is crucial for early detection of potential unauthorized access or data exfiltration, as the ‘full_access_as_app’ permission could lead to significant security incidents if exploited.

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`