PIVTR-D
RAzure playbook · Evasion and guardrails

Logging or guardrails disabled

An attacker deletes diagnostic settings, flow logs or the Log Analytics workspace, sets Defender plans to the free tier, and deletes policy assignments or adds exemptions. The next steps then go unrecorded and unblocked. Remove the caller's access and recover the workspace first, then read the Activity Log directly for what happened during the gap.

Look here

LogSearch for
AzureActivityDeleted logging, lowered Defender plans, removed automations, suppression rules, policy changes and lock removal: AzureActivity | where OperationNameValue in~ ("Microsoft.Insights/diagnosticSettings/delete", "Microsoft.Network/networkWatchers/flowLogs/delete", "Microsoft.OperationalInsights/workspaces/delete", "Microsoft.Security/pricings/write", "Microsoft.Security/automations/delete", "Microsoft.Security/alertsSuppressionRules/write", "Microsoft.Authorization/policyAssignments/delete", "Microsoft.Authorization/policyExemptions/write", "Microsoft.Authorization/locks/delete") | project TimeGenerated, Caller, CallerIpAddress, OperationNameValue, _ResourceId
Activity Log, read directlyThe same changes when export to the workspace stopped: az monitor activity-log list --start-time <yyyy-mm-dd> --offset 7d --max-events 10000 --query "[?contains(operationName.value, 'delete') || contains(operationName.value, 'pricings/write') || contains(operationName.value, 'policyExemptions/write') || contains(operationName.value, 'alertsSuppressionRules/write')].{time:eventTimestamp, caller:caller, op:operationName.value}"
AuditLogsConditional Access policies changed or removed: Update Conditional Access policy and Delete Conditional Access policy
SecurityAlertThe Defender for Resource Manager defense evasion alert, AlertType, ARM_AnomalousOperation.DefenseEvasion

Contain

#Item
1Remove the caller's access using service principal credential leak or account takeover
2List deleted workspaces, which stay recoverable for 14 days: az monitor log-analytics workspace list-deleted-workspaces
3Recover the deleted workspace: az monitor log-analytics workspace recover --workspace-name <workspace> --resource-group <rg>
4Recreate the Activity Log export: az monitor diagnostic-settings subscription create --name <name> --workspace <workspace-id> --logs "[{category:Administrative,enabled:true},{category:Security,enabled:true},{category:Policy,enabled:true}]"
5List the Defender plans and their tiers: az security pricing list
6Restore each lowered plan. --tier alone restores no subplan or extensions, so compare with az security pricing show -n <plan> from your baseline and add --subplan and --extensions as needed: az security pricing create -n <plan> --tier standard
7List policy assignments, including inherited ones, and recreate deleted ones: az policy assignment list --disable-scope-strict-match
8Delete exemptions the attacker added destructive: az policy exemption delete --name <exemption> --scope <scope>

Eradicate and recover

#Item
1Compare each resource's diagnostic settings with your baseline: az monitor diagnostic-settings list --resource <resource-id>
2Recreate deleted flow logs and Defender continuous export
3Restore Conditional Access policies from your exported baseline
4Lock the workspace and log storage accounts with CanNotDelete locks
5Mark the logging gap in the timeline in T3 as unobserved time
Watch out
  • Deleting a diagnostic setting stops export only. Azure still keeps the Activity Log for 90 days, so read it directly.
  • A new diagnostic setting can take up to 90 minutes to deliver data. Count that time in the gap.

Microsoft Learn: Azure Monitor activity log, diagnostic settings, delete and recover a Log Analytics workspace, Entra audit log activity reference, resource provider operations, Azure CLI reference for az monitor activity-log, az monitor log-analytics workspace, az monitor diagnostic-settings, az security pricing and az policy. Checked October 2026. Defender for Cloud alerts for Resource Manager: checked October 2026.

Adapts material from Dynamic Incident Response: A Framework for Security Teams by Joshua Wright, © 2026 The Escal Institute of Advanced Technologies, Inc. d/b/a SANS Institute, licensed under CC BY 4.0. Figures reproduced under that license. Changes were made. Not published by, endorsed by, or affiliated with the SANS Institute.