T1578.003 Google Chronicle · YARA-L

Detect Delete Cloud Instance in Google Chronicle

An adversary may delete a cloud instance after performing malicious activities in an attempt to evade detection and remove evidence of their presence. Deleting an instance or virtual machine can eliminate forensic artifacts including memory contents, running processes, local logs, and volatile state that would otherwise be available for incident response. Adversaries such as LAPSUS$ have deleted target cloud resources to trigger incident response processes and maximize disruption, while ransomware operators like Storm-0501 conduct mass deletion of Azure resources across subscriptions. The technique may be combined with T1578.002 (Create Cloud Instance) where adversaries spin up ephemeral instances for malicious work, then delete them upon completion.

MITRE ATT&CK

Tactic
Defense Evasion
Technique
T1578 Modify Cloud Compute Infrastructure
Sub-technique
T1578.003 Delete Cloud Instance
Canonical reference
https://attack.mitre.org/techniques/T1578/003/

YARA-L Detection Query

Google Chronicle (YARA-L)
yaral
rule T1578_003_cloud_infra_modification {
  meta:
    author = "Detection Engineering"
    description = "Detects suspicious cloud infrastructure modifications"
    severity = "high"
    confidence = "medium"
    mitre_attack = "T1578.003"
    reference = "https://attack.mitre.org/techniques/T1578/003/"

  events:
    $e.metadata.event_type = "USER_RESOURCE_ACCESS"
    re.regex($e.metadata.product_event_type, `(?i)(snapshot|virtualMachine|instance|compute|create|delete|modify)`)
    not re.regex($e.principal.user.email_addresses, `(?i)(backup|automation|serviceaccount)`)

  condition:
    $e
}
high severity medium confidence

Google Chronicle YARA-L 2.0 detection for Delete Cloud Instance. Detects cloud instance deletion events across Azure (via AzureActivity) and AWS (via AWSCloudTrail) in Microsoft Sentinel. Covers Azure VM, VMSS, and AKS cluster deletions alongside AWS EC2 TerminateI

Data Sources

Google Chronicle SIEMCloud audit logs (Azure/AWS)

Required Tables

USER_RESOURCE_ACCESS

False Positives & Tuning

  • Authorized cloud administrators performing scheduled backup snapshot creation
  • Automated disaster recovery solutions creating routine cloud instance snapshots
  • DevOps CI/CD pipelines creating and deleting compute instances during deployments
  • Authorized cloud migration projects moving instances between regions
Download portable Sigma rule (.yml)

Other platforms for T1578.003


Testing Methodology

Validate this detection against 4 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.

  1. Test 1AWS EC2 Instance Termination via CLI

    Expected signal: AWS CloudTrail: EventName=TerminateInstances with RequestParameters containing instancesSet.items[].instanceId. UserIdentity will contain the caller's ARN, userAgent will show 'aws-cli', and sourceIPAddress will show the test machine's IP. ResponseElements will confirm state transition from 'running' to 'shutting-down'. Event appears in CloudTrail within 5-15 minutes.

  2. Test 2AWS Bulk EC2 Termination — Mass Deletion Pattern

    Expected signal: AWS CloudTrail: Single TerminateInstances event with RequestParameters.instancesSet.items containing 5 instance IDs. The bulk nature triggers the high-count hunting query. UserIdentity, sourceIPAddress, and awsRegion fields present. The SPL query InstanceCount field will show 5, triggering BulkDelete classification and elevated SuspicionScore.

  3. Test 3Azure VM Deletion via Azure CLI

    Expected signal: Azure Activity Log: OperationNameValue=Microsoft.Compute/virtualMachines/delete, ActivityStatusValue=Accepted then Succeeded (two events). Caller field contains the authenticated user's UPN or service principal ID. ResourceId contains the full VM resource path. Events appear in Azure Monitor Activity Log within 1-5 minutes and flow to Log Analytics/Sentinel within 5-15 minutes.

  4. Test 4AWS Bypass Termination Protection Then Terminate

    Expected signal: AWS CloudTrail Event 1: EventName=ModifyInstanceAttribute with RequestParameters.attribute=disableApiTermination and RequestParameters.value=false. AWS CloudTrail Event 2: EventName=TerminateInstances with the same instance ID and caller identity. Both events share the same UserIdentityArn and sourceIPAddress. The sequence within minutes is the high-fidelity indicator. A correlation rule matching ModifyInstanceAttribute(disableApiTermination=false) followed by TerminateInstances from the same ARN within 10 minutes should fire at Critical severity.

Unlock Pro Content

Get the full detection package for T1578.003 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections