SOP-42: Azure Resource Group Deletion Response

·

Azure Resource Group deletion (T1485 — Data Destruction, T1531 — Account Access Removal) is a high-impact action that deletes all resources within the group in a single API call. Attackers use this for ransomware-style destruction or to cover tracks after exfiltrating data. Resource Group delete requires Contributor or Owner role at the Resource Group or Subscription level — its presence indicates significant privilege access by the actor.

Response priority: assess whether the deletion was authorized (DevOps teardown, cost management), assess recovery viability from backups or soft-delete, and identify how the actor obtained delete permissions.

☰ Table of Contents

01 Background 02 Identification 03 Containment 04 Eradication 05 Escalation
🛠

01 — BACKGROUND

TECHNIQUE OVERVIEW
01
Azure Resource Group Deletion Architecture
T1485 / T1531

A Resource Group delete operation (Microsoft.Resources/resourceGroups/delete) cascades to all child resources — VMs, databases, storage accounts, App Services — within the group. Azure Activity Logs capture the initiator's identity, IP address, and timestamp. The operation is asynchronous: deletion typically completes in 15–60 minutes. Some resources (soft-delete enabled Key Vault, Recovery Services Vault backups) survive a Resource Group deletion if protected.

FieldValue
MITRE TechniqueT1485 — Data Destruction, T1531 — Account Access Removal
Log SourcesAzureActivity, AuditLogs (Entra ID), AzureMetrics
Operation NameMicrosoft.Resources/resourceGroups/delete
Required RBACContributor or Owner at Resource Group or Subscription scope
Detection PriorityCRITICAL if production resource group — potential destructive attack
🔍

02 — IDENTIFICATION

2 INDICATORS
▶ Investigation Workflow
I1
Activity Log — Deletion Caller Identity & Scope
T1485
WHY CHECK

Azure Activity Logs record the identity (UPN or Service Principal), client IP, and caller timestamp for every Resource Group delete operation. This determines whether the deletion was authorized (matching a change ticket) or unauthorized (compromised account, rogue administrator, or malicious Service Principal).

📍 Portal Navigation — Azure Activity Log / Sentinel
portal.azure.com Monitor Activity log
  • 1Navigate to Monitor → Activity log. Filter by Operation: Delete resource group and set time range to Last 24 hours.
  • 2Review Event initiated by: note whether this is a user UPN, a Service Principal (App Registration), or a Managed Identity.
  • 3Check the caller IP address against known corporate IPs and approved automation pipeline IPs — a foreign IP or cloud provider IP (Azure compute IP) is a high-risk indicator.
  • 4Cross-reference the deletion time against the change management system for an authorized change ticket covering this resource group.
  • 5Run the KQL below in Sentinel to correlate the Resource Group deletion with any RBAC role assignments added to the caller's account in the preceding 24 hours (privilege escalation path).
Caller IdentityMeaningAction
User UPN (no ticket)Unauthorized deletion by compromised or rogue admin accountREVOKE ACCESS NOW
Service PrincipalAutomated pipeline or compromised SP with delete rightsDisable SP, investigate pipeline
Managed IdentityAzure-managed identity with delete role — check VM/App it runs onReview MI role assignments
User UPN (with ticket)Authorized teardown — verify ticket scope matches deleted RGVerify & document
DETECTS: Azure Resource Group delete operations in the past 24 hours from AzureActivity logs — returns the caller identity, client IP, resource group name, and operation status.
KQL — Microsoft Sentinel (AzureActivity)
AzureActivity | where TimeGenerated > ago(24h) | where OperationNameValue == "Microsoft.Resources/resourceGroups/delete" | where ActivityStatusValue == "Success" | project TimeGenerated, Caller, CallerIpAddress, ResourceGroup, SubscriptionId, OperationNameValue, ActivityStatusValue, Properties | order by TimeGenerated desc
DETECTS: Resource Group deletions in Splunk from Azure Activity Logs — identifies unauthorized destruction events with caller identity and source IP.
SPL — Splunk
index=* sourcetype=azure:activity operationName="Microsoft.Resources/resourceGroups/delete" resultType=Success | table _time caller callerIpAddress resourceGroupName subscriptionId status | sort -_time

Azure Resource Group deletion is irreversible for most resource types once the deletion cascade completes. Time is critical — if the deletion is in progress (operation shows Accepted or Running), attempt to cancel via the Azure CLI: az group delete --name RG_NAME --no-wait cannot be cancelled once committed, but you can attempt to re-deploy from ARM templates immediately.

I2
RBAC Privilege Path Analysis
T1531
WHY CHECK

Legitimate Resource Group deletions require pre-existing Contributor or Owner rights. If the deletion was unauthorized, the attacker either compromised an account that already had delete rights, or escalated privileges by adding an RBAC role assignment shortly before the deletion. AuditLogs records every RBAC change with the actor who made the assignment.

📍 Portal Navigation — Entra ID Audit Logs
entra.microsoft.com Identity Monitoring → Audit logs
  • 1Navigate to Entra ID → Monitoring → Audit logs. Filter by Activity: Add member to role or Add app role assignment in the 48 hours before the deletion event.
  • 2Identify if the deletion caller was granted Contributor or Owner on the subscription or resource group within the preceding 24 hours by an account that should not have that capability.
  • 3Run the KQL below to find all RBAC role assignments (AzureActivity) in the subscription in the 48 hours before the deletion.
  • 4Check if the RBAC assignment was made by a different account than the deletion caller — this indicates a two-actor attack: one account escalates, another destroys.
  • 5Review the escalating account's sign-in history for anomalous IP or location that would indicate it was compromised.
DETECTS: RBAC role assignments (Owner or Contributor) made in the 48 hours before a resource group deletion — reveals the privilege escalation path used to gain delete rights.
KQL — Microsoft Sentinel (AzureActivity — RBAC Path)
AzureActivity | where TimeGenerated > ago(72h) | where OperationNameValue in ( "Microsoft.Authorization/roleAssignments/write", "Microsoft.Authorization/roleAssignments/delete") | where ActivityStatusValue == "Success" | project TimeGenerated, Caller, CallerIpAddress, ResourceGroup, SubscriptionId, OperationNameValue, Properties | order by TimeGenerated desc

Enable Azure Resource Locks (Management group / Subscription / RG → Locks → Add → Delete lock) on all production Resource Groups as a preventive control. A Delete lock requires an explicit lock removal step (which is itself logged) before deletion can proceed — this creates a detectable two-step operation even for authorized deletions.

🚫

03 — CONTAINMENT

IMMEDIATE ACTION
C1
Verdict & Escalation Decision
DECISION GATE
▶ Triage Verdict — Select One
CONFIRMED Deletion by unknown caller or anomalous IP, no change ticket → Disable caller account/SP immediately, revoke RBAC, escalate SEV1, assess recovery
PARTIAL Authorized caller but production RG, manager unaware → Verify intent directly, check for data exfil before deletion, assess recovery need
FALSE POSITIVE Authorized DevOps pipeline deletion of dev/test RG with valid change ticket → Document, close ticket, verify pipeline RBAC scope is minimal
C2
Disable Caller & Revoke RBAC
CONTAINMENT
  • 1If the caller is a user account: disable it in Entra ID immediately — Users → [User] → Block sign-in and revoke all sessions.
  • 2If the caller is a Service Principal: disable the App Registration — App registrations → [App] → Properties → Enable application = No.
  • 3Remove all RBAC role assignments that granted the caller Contributor/Owner: Subscriptions → [Sub] → Access control (IAM) → Role assignments → Remove.
  • 4Check for any remaining bulk delete operations in progress across other resource groups: re-run the AzureActivity KQL for Microsoft.Resources/resourceGroups/delete for all subscriptions.
  • 5Identify any data exfiltration that may have preceded the deletion: check Azure Storage diagnostic logs for bulk download operations in the 6 hours before the deletion.
🗑

04 — ERADICATION

CLEANUP
E1
Resource Recovery & RBAC Hardening
ERADICATION
  • 1Assess recovery options: check Azure Backup Vault for VM backups, check Azure SQL geo-redundant backups, check Key Vault soft-delete (90-day retention by default even after RG delete).
  • 2If ARM templates exist in DevOps or GitHub: initiate resource re-deployment from last known good state. Contact the application team for RTO/RPO assessment.
  • 3Apply Resource Locks to all remaining production Resource Groups: RG → Locks → Add → Lock type: Delete.
  • 4Audit all Contributor and Owner role assignments at subscription scope: remove any accounts or Service Principals that should not have subscription-level delete rights.
  • 5Enable Defender for Cloud for the subscription to alert on future destructive operations: Defender for Cloud → Environment settings → [Subscription] → Defender plans → Enable.
Eradication Complete When
  • Caller account/SP disabled and RBAC revoked
  • All other production Resource Groups confirmed with Delete Lock applied
  • Subscription-level Owner/Contributor assignments audited and trimmed
  • Recovery path assessed and recovery initiated if required
  • Defender for Cloud alerts enabled on subscription
📢

05 — ESCALATION

ESCALATION PATHS
ES1
Escalation Matrix
ESCALATION
ConditionSeverityActionNotify
Production RG deleted, no ticket, no recoverySEV1Full IR, disable caller, notify exec, recoverySOC Lead → CISO → CTO → CEO
Production RG deleted, recovery viableSEV1IR + parallel recovery track, 72h breach checkSOC Lead → CISO → App Team
Non-production RG, unauthorized callerSEV2Disable caller, RBAC audit, investigate pathSOC Lead → Cloud Security
Authorized DevOps deletion, dev/test RGINFOVerify ticket, apply lock to prod, closeNone

Stay Threat-Ready

Follow CyberHawk Threat Intel for daily SOC analyst playbooks, detection engineering guides, and threat intelligence.

📺 YouTube 🎤 TikTok 🐦 X / Twitter 📡 Telegram
All SOPs Blog Web App (Free)
They can't exploit you if you are the Exploit.