LoFP LoFP / false positives may occur if users are granting consents as part of legitimate application integrations or setups. it is crucial to review the application and the permissions it requests to ensure they align with organizational policies and security best practices.

Techniques

Sample rules

Description

The following analytic detects when a user in an Azure AD environment grants consent to an OAuth application. It leverages Azure AD audit logs to identify events where users approve application consents. This activity is significant as it can expose organizational data to third-party applications, a common tactic used by malicious actors to gain unauthorized access. If confirmed malicious, this could lead to unauthorized access to sensitive information and resources. Immediate investigation is required to validate the application’s legitimacy, review permissions, and mitigate potential risks.

Detection logic

`azure_monitor_aad` operationName="Consent to application" properties.result=success 
| rename properties.* as *  
| eval permissions_index = if(mvfind('targetResources{}.modifiedProperties{}.displayName', "ConsentAction.Permissions") >= 0, mvfind('targetResources{}.modifiedProperties{}.displayName', "ConsentAction.Permissions"), -1) 
| eval permissions = mvindex('targetResources{}.modifiedProperties{}.newValue',permissions_index) 
| rex field=permissions "Scope: (?<Scope>[^,]+)" 
| stats count min(_time) as firstTime max(_time) as lastTime by operationName, user, Scope 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `azure_ad_oauth_application_consent_granted_by_user_filter`