Detection rules › Panther

Azure MFA Disabled

Severity
high
Log types
Azure.Audit
Reference
https://learn.microsoft.com/en-us/entra/identity/authentication/overview-authentication
Source
github.com/panther-labs/panther-analysis

This detection looks for MFA being disabled in conditional access policy

MITRE ATT&CK coverage

Rule body yaml

AnalysisType: rule
Filename: azure_mfa_disabled.py
RuleID: "Azure.Audit.MFADisabled"
DisplayName: "Azure MFA Disabled"
Enabled: true
LogTypes:
  - Azure.Audit
Severity: High
Description: >
  This detection looks for MFA being disabled in conditional access policy
Reports:
  MITRE ATT&CK:
    - TA0005:T1556
    - TA0001:T1078
Runbook: >
  Verify if the change was authorized and investigate the user activity. If unauthorized, re-enable MFA, revoke access.
  
Reference: https://learn.microsoft.com/en-us/entra/identity/authentication/overview-authentication
SummaryAttributes:
  - properties:ServicePrincipalName
  - properties:UserPrincipalName
  - properties:ipAddress
Tests:
  - Name: MFA Disabled Successful
    ExpectedResult: true
    Log:
      {
          "time": "2024-11-27T03:31:26.7088498Z",
          "resourceId": "/tenants/123456789/providers/Microsoft.aadiam",
          "operationName": "Update conditional access policy",
          "operationVersion": "1.0",
          "category": "AuditLogs",
          "tenantId": "123456789",
          "resultSignature": "None",
          "durationMs": 0,
          "callerIpAddress": "1.2.3.4",
          "correlationId": "123456789",
          "Level": "4",
          "properties": {
              "tenantId": "123456789",
              "resultType": "",
              "resultDescription": "",
              "operationName": "Update conditional access policy",
              "identity": "",
              "tenantGeo": "NA",
              "id": "IPCGraph_123456789",
              "category": "Policy",
              "correlationId": "123456789",
              "result": "success",
              "resultReason": null,
              "activityDisplayName": "Update conditional access policy",
              "activityDateTime": "2024-11-27T03:31:26.7088498+00:00",
              "loggedByService": "Conditional Access",
              "operationType": "Update",
              "userAgent": null,
              "initiatedBy": {
                  "user": {
                      "id": "123456789b",
                      "displayName": null,
                      "userPrincipalName": "denethor@lotr.com",
              "ipAddress": "1.2.3.4",
                      "roles": []
                  }
              },
              "targetResources": [
                  {
                      "id": "123456789",
                      "displayName": "MFA",
                      "type": "Policy",
                      "modifiedProperties": [
                          {
                              "displayName": "ConditionalAccessPolicy",
                              "oldValue": "{\"id\":\"123456789\",\"displayName\":\"MFA\",\"createdDateTime\":\"2024-11-21T16:48:48.1196443+00:00\",\"modifiedDateTime\":\"2024-11-21T16:56:13.9120766+00:00\",\"state\":\"enabled\",\"conditions\":{\"applications\":{\"includeApplications\":[\"None\"],\"excludeApplications\":[],\"includeUserActions\":[],\"includeAuthenticationContextClassReferences\":[],\"applicationFilter\":null},\"users\":{\"includeUsers\":[\"All\"],\"excludeUsers\":[],\"includeGroups\":[],\"excludeGroups\":[],\"includeRoles\":[],\"excludeRoles\":[]},\"userRiskLevels\":[],\"signInRiskLevels\":[],\"clientAppTypes\":[\"all\"],\"servicePrincipalRiskLevels\":[]},\"grantControls\":{\"operator\":\"OR\",\"builtInControls\":[\"MFA\"],\"customAuthenticationFactors\":[],\"termsOfUse\":[]},\"sessionControls\":{\"signInFrequency\":{\"value\":90,\"type\":\"days\",\"authenticationType\":\"primaryAndSecondaryAuthentication\",\"frequencyInterval\":\"timeBased\",\"isEnabled\":true}}}",
                              "newValue": "{\"id\":\"123456789\",\"displayName\":\"MFA\",\"createdDateTime\":\"2024-11-21T16:48:48.1196443+00:00\",\"modifiedDateTime\":\"2024-11-27T03:31:25.4989035+00:00\",\"state\":\"enabled\",\"conditions\":{\"applications\":{\"includeApplications\":[\"None\"],\"excludeApplications\":[],\"includeUserActions\":[],\"includeAuthenticationContextClassReferences\":[],\"applicationFilter\":null},\"users\":{\"includeUsers\":[\"All\"],\"excludeUsers\":[],\"includeGroups\":[],\"excludeGroups\":[],\"includeRoles\":[],\"excludeRoles\":[]},\"userRiskLevels\":[],\"signInRiskLevels\":[],\"clientAppTypes\":[\"all\"],\"servicePrincipalRiskLevels\":[]},\"sessionControls\":{\"signInFrequency\":{\"value\":90,\"type\":\"days\",\"authenticationType\":\"primaryAndSecondaryAuthentication\",\"frequencyInterval\":\"timeBased\",\"isEnabled\":true}}}"
                          }
                      ],
                      "administrativeUnits": []
                  }
              ],
              "additionalDetails": [
                  {
                      "key": "Category",
                      "value": "Conditional Access"
                  }
              ]
          }
      }
  - Name: MFA Enabled
    ExpectedResult: false
    Log:
        {
          "time": "2024-11-27T03:31:26.7088498Z",
          "resourceId": "/tenants/123456789/providers/Microsoft.aadiam",
          "operationName": "Update conditional access policy",
          "operationVersion": "1.0",
          "category": "AuditLogs",
          "tenantId": "123456789",
          "resultSignature": "None",
          "durationMs": 0,
          "callerIpAddress": "1.2.3.4",
          "correlationId": "123456789",
          "Level": "4",
          "properties": {
              "tenantId": "123456789",
              "resultType": "",
              "resultDescription": "",
              "operationName": "Update conditional access policy",
              "identity": "",
              "tenantGeo": "NA",
              "id": "IPCGraph_123456789",
              "category": "Policy",
              "correlationId": "123456789",
              "result": "success",
              "resultReason": null,
              "activityDisplayName": "Update conditional access policy",
              "activityDateTime": "2024-11-27T03:31:26.7088498+00:00",
              "loggedByService": "Conditional Access",
              "operationType": "Update",
              "userAgent": null,
              "initiatedBy": {
                  "user": {
                      "id": "123456789b",
                      "displayName": null,
                      "userPrincipalName": "denethor@lotr.com",
              "ipAddress": "1.2.3.4",
                      "roles": []
                  }
              },
              "targetResources": [
                  {
                      "id": "123456789",
                      "displayName": "MFA",
                      "type": "Policy",
                      "modifiedProperties": [
                          {
                              "displayName": "ConditionalAccessPolicy",
                              "oldValue": "{\"id\":\"123456789\",\"displayName\":\"MFA\",\"createdDateTime\":\"2024-11-21T16:48:48.1196443+00:00\",\"modifiedDateTime\":\"2024-11-27T03:31:25.4989035+00:00\",\"state\":\"enabled\",\"conditions\":{\"applications\":{\"includeApplications\":[\"None\"],\"excludeApplications\":[],\"includeUserActions\":[],\"includeAuthenticationContextClassReferences\":[],\"applicationFilter\":null},\"users\":{\"includeUsers\":[\"All\"],\"excludeUsers\":[],\"includeGroups\":[],\"excludeGroups\":[],\"includeRoles\":[],\"excludeRoles\":[]},\"userRiskLevels\":[],\"signInRiskLevels\":[],\"clientAppTypes\":[\"all\"],\"servicePrincipalRiskLevels\":[]},\"sessionControls\":{\"signInFrequency\":{\"value\":90,\"type\":\"days\",\"authenticationType\":\"primaryAndSecondaryAuthentication\",\"frequencyInterval\":\"timeBased\",\"isEnabled\":true}}}",
                              "newValue": "{\"id\":\"123456789\",\"displayName\":\"MFA\",\"createdDateTime\":\"2024-11-21T16:48:48.1196443+00:00\",\"modifiedDateTime\":\"2024-11-21T16:56:13.9120766+00:00\",\"state\":\"enabled\",\"conditions\":{\"applications\":{\"includeApplications\":[\"None\"],\"excludeApplications\":[],\"includeUserActions\":[],\"includeAuthenticationContextClassReferences\":[],\"applicationFilter\":null},\"users\":{\"includeUsers\":[\"All\"],\"excludeUsers\":[],\"includeGroups\":[],\"excludeGroups\":[],\"includeRoles\":[],\"excludeRoles\":[]},\"userRiskLevels\":[],\"signInRiskLevels\":[],\"clientAppTypes\":[\"all\"],\"servicePrincipalRiskLevels\":[]},\"grantControls\":{\"operator\":\"OR\",\"builtInControls\":[\"MFA\"],\"customAuthenticationFactors\":[],\"termsOfUse\":[]},\"sessionControls\":{\"signInFrequency\":{\"value\":90,\"type\":\"days\",\"authenticationType\":\"primaryAndSecondaryAuthentication\",\"frequencyInterval\":\"timeBased\",\"isEnabled\":true}}}",
                          }
                      ],
                      "administrativeUnits": []
                  }
              ],
              "additionalDetails": [
                  {
                      "key": "Category",
                      "value": "Conditional Access"
                  }
              ]
          }
      }
  - Name: MFA Disabled from another log
    ExpectedResult: false
    Log:
      {
        "time": "2024-11-27T03:31:26.2934305Z",
        "resourceId": "/tenants/123456/providers/Microsoft.aadiam",
        "operationName": "Update policy",
        "operationVersion": "1.0",
        "category": "AuditLogs",
        "tenantId": "123456",
        "resultSignature": "None",
        "durationMs": 0,
        "callerIpAddress": "1.2.3.4",
        "correlationId": "123456",
        "Level": "4",
        "properties": {
            "tenantId": "123456",
            "resultType": "",
            "resultDescription": "",
            "operationName": "Update policy",
            "identity": "",
            "tenantGeo": "NA",
            "id": "Directory_123145",
            "category": "Policy",
            "correlationId": "1235134516",
            "result": "success",
            "resultReason": "",
            "activityDisplayName": "Update policy",
            "activityDateTime": "2024-11-27T03:31:26.2934305+00:00",
            "loggedByService": "Core Directory",
            "operationType": "Update",
            "userAgent": null,
            "initiatedBy": {
                "user": {
                    "id": "1324512355",
                    "displayName": null,
                    "userPrincipalName": "Kratos@onmicrosoft.com",
              "ipAddress": "1.2.3.4",
                    "roles": []
                }
            },
            "targetResources": [
                {
                    "id": "12351254",
                    "displayName": "MFA",
                    "type": "Policy",
                    "modifiedProperties": [
                        {
                            "displayName": "PolicyDetail",
                            "oldValue": "[\"{\\\"Version\\\":1,\\\"CreatedDateTime\\\":\\\"2024-11-21T16:48:48.1196443Z\\\",\\\"ModifiedDateTime\\\":\\\"2024-11-21T16:56:13.9120766Z\\\",\\\"State\\\":\\\"Enabled\\\",\\\"Conditions\\\":{\\\"Applications\\\":{\\\"Include\\\":[{\\\"Applications\\\":[\\\"None\\\"]}]},\\\"Users\\\":{\\\"Include\\\":[{\\\"Users\\\":[\\\"All\\\"]}]}},\\\"Controls\\\":[{\\\"Control\\\":[\\\"Mfa\\\"]}],\\\"SessionControls\\\":[\\\"SignInFrequency\\\"],\\\"SignInFrequencyTimeSpan\\\":\\\"90.00:00:00\\\",\\\"SignInFrequencyType\\\":10,\\\"EnforceAllPoliciesForEas\\\":true,\\\"IncludeOtherLegacyClientTypeForEvaluation\\\":true}\"]",
                            "newValue": "[\"{\\\"Version\\\":1,\\\"CreatedDateTime\\\":\\\"2024-11-21T16:48:48.1196443Z\\\",\\\"ModifiedDateTime\\\":\\\"2024-11-27T03:31:25.4989035Z\\\",\\\"State\\\":\\\"Enabled\\\",\\\"Conditions\\\":{\\\"Applications\\\":{\\\"Include\\\":[{\\\"Applications\\\":[\\\"None\\\"]}]},\\\"Users\\\":{\\\"Include\\\":[{\\\"Users\\\":[\\\"All\\\"]}]}},\\\"SessionControls\\\":[\\\"SignInFrequency\\\"],\\\"SignInFrequencyTimeSpan\\\":\\\"90.00:00:00\\\",\\\"SignInFrequencyType\\\":10,\\\"EnforceAllPoliciesForEas\\\":true,\\\"IncludeOtherLegacyClientTypeForEvaluation\\\":true}\"]"
                        },
                        {
                            "displayName": "Included Updated Properties",
                            "oldValue": null,
                            "newValue": "\"PolicyDetail\""
                        }
                    ],
                    "administrativeUnits": []
                }
            ],
            "additionalDetails": [
                {
                    "key": "User-Agent",
                    "value": "Microsoft Azure Graph Client Library 1.0"
                }
            ]
        }
    }

Detection logic

Condition

operationName eq "Update conditional access policy"

This rule also runs imperative logic the parser cannot express as a filter; the conditions above are the structured part it could extract.

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
operationNameeq
  • Update conditional access policy

Output fields

Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.

FieldSource
operationName
categoryproperties.category
actor_idproperties.initiatedBy.user.id
actor_upnproperties.initiatedBy.user.userPrincipalName
source_ip_addressproperties.initiatedBy.user.ipAddress
target_idproperties.targetResources.id
target_nameproperties.targetResources.displayName