Detect Conditional Access Policies in Microsoft Sentinel
Adversaries may disable or modify Conditional Access Policies (CAP) to enable persistent access to compromised accounts. Conditional Access applies additional verification based on IP, device enrollment, MFA, and risk-based signals. Attackers modify CAPs by adding trusted IP ranges (Scattered Spider added attacker-controlled IPs), removing MFA requirements, adding user exclusions, or disabling policies. Storm-0501 circumvented CAPs using hybrid-joined servers. In AWS/GCP, IAM condition attributes can be weakened by removing IP or time-of-day restrictions.
MITRE ATT&CK
- Technique
- T1556 Modify Authentication Process
- Sub-technique
- T1556.009 Conditional Access Policies
- Canonical reference
- https://attack.mitre.org/techniques/T1556/009/
KQL Detection Query
AuditLogs
| where TimeGenerated > ago(24h)
| where LoggedByService =~ "Conditional Access" or Category =~ "Policy"
| where OperationName in~ (
"Add conditional access policy",
"Update conditional access policy",
"Delete conditional access policy",
"Add named location",
"Update named location",
"Delete named location"
)
| extend Actor = tostring(InitiatedBy.user.userPrincipalName)
| extend PolicyName = tostring(TargetResources[0].displayName)
| extend ModifiedProperties = TargetResources[0].modifiedProperties
| mv-expand PropChange = ModifiedProperties
| extend PropertyName = tostring(PropChange.displayName)
| extend OldValue = tostring(PropChange.oldValue)
| extend NewValue = tostring(PropChange.newValue)
| where PropertyName in~ ("State", "conditions", "grantControls", "IpRanges", "IsTrusted")
or isempty(PropertyName)
| project TimeGenerated, OperationName, PolicyName, Actor, PropertyName, OldValue, NewValue, Result
| sort by TimeGenerated desc Detects Conditional Access Policy modifications in Microsoft Entra ID Audit Logs. Focuses on policy state changes (enable/disable), condition modifications (IP ranges, user exclusions), and grant control changes (removing MFA requirements). Also monitors Named Location creation/modification which is used to add attacker-controlled IP ranges as trusted.
Data Sources
Required Tables
False Positives & Tuning
- Authorized CAP modifications by Identity Administrators during planned policy reviews documented in change management
- New trusted IP ranges added for legitimate office locations, datacenter IPs, or VPN egress points
- CAP updates during M365 or Entra ID feature rollouts that require policy adjustments
- User exclusion additions for break-glass accounts or service accounts with documented exemptions
Other platforms for T1556.009
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Disable a Non-Critical Conditional Access Policy
Expected signal: Azure AD Audit Log: OperationName 'Update conditional access policy', ModifiedProperties showing State changed from 'enabled' to 'disabled'. Actor logged as the authenticated Microsoft Graph session user.
- Test 2Add a Trusted Named Location (Simulating Scattered Spider TTP)
Expected signal: Azure AD Audit Log: OperationName 'Add named location', TargetResources showing the new location name and IP range. IsTrusted=true visible in audit details.
- Test 3Enumerate Existing Conditional Access Policies
Expected signal: Azure AD Audit Log: Read operation on conditional access policies. Microsoft Graph API call logged. PowerShell ScriptBlock Log Event ID 4104 with the Get-MgIdentityConditionalAccessPolicy command.
References (5)
- https://attack.mitre.org/techniques/T1556/009/
- https://learn.microsoft.com/en-us/entra/identity/conditional-access/overview
- https://docs.microsoft.com/en-us/azure/active-directory/governance/conditional-access-exclusion
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1556.009/T1556.009.md
- https://www.microsoft.com/en-us/security/blog/2023/10/25/octo-tempest-crosses-boundaries-to-facilitate-extortion-encryption-and-destruction/
Unlock Pro Content
Get the full detection package for T1556.009 including response playbook, investigation guide, and atomic red team tests.