PIVTR-D
RGoogle Cloud playbook · Compute and containers

Resource hijacking

An attacker with compute permissions creates VMs, often with GPUs, in regions the organization does not use, and may request quota increases to run more. Your project pays for every hour they run. Stop the instances and contain the identity that created them, keeping one boot disk per build as evidence.

Look here

LogSearch for
Admin Activity audit logInstance creation, logged as v1.compute.instances.insert and beta.compute.instances.insert, by principal: gcloud logging read 'protoPayload.methodName:"compute.instances.insert"' --project=<project> --freshness=30d --format='table(timestamp,protoPayload.authenticationInfo.principalEmail,protoPayload.resourceName)'
Admin Activity audit log (cloudquotas.googleapis.com)Quota increase requests: google.api.cloudquotas.v1.CloudQuotas.CreateQuotaPreference, google.api.cloudquotas.v1.CloudQuotas.UpdateQuotaPreference
Admin Activity audit log, instance groupsManaged instance groups and templates created in the window. A managed instance group recreates instances you stop or delete: gcloud logging read 'protoPayload.methodName:"instanceGroupManagers.insert" OR protoPayload.methodName:"instanceTemplates.insert"' --project=<project> --freshness=30d
InventoryInstances in each project, with zone, machine type and creation time: gcloud compute instances list --project=<project> --format='table(name,zone,machineType,status,creationTimestamp)'
InventoryManaged instance groups in each project: gcloud compute instance-groups managed list --project=<project>
BillingCost by SKU and region for the window, from the billing reports or the billing export to BigQuery
Security Command CenterMining and mass creation findings: Execution: Cryptocurrency Mining Hash Match Execution: Cryptocurrency Mining YARA Rule Impact: GPU Instance Created, Impact: Many Instances Created

Contain

#Item
1Snapshot the boot disk of one instance per build as evidence: gcloud compute disks snapshot <disk> --zone=<zone> --snapshot-names=<case-id>-<disk>
2Resize attacker managed instance groups to zero. Use --region=<region> for a regional group: gcloud compute instance-groups managed resize <mig> --size=0 --zone=<zone>
3Stop the remaining instances: gcloud compute instances stop <vm> --zone=<zone>
4Contain the identity that created them, following credential leak, account takeover or workload credentials
5Restrict new resources to approved regions. The policy file sets constraints/gcp.resourceLocations: gcloud org-policies set-policy <file>

Eradicate and recover

#Item
1Delete the instances once evidence is kept destructive. Boot disks auto-delete by default: gcloud compute instances delete <vm> --zone=<zone>
2Sweep every zone for instances, instance templates and managed instance groups created in the window
3Review quota preferences created in the window and lower them
4Set billing budgets with alerts on each project
5Send the cost record to Finance/Admin
Watch out
  • gcp.resourceLocations applies only to new resources. Instances already running in a denied region keep running.
  • A managed instance group recreates instances that you stop or delete. Resize the group to zero first.
  • Stopped instances still bill for persistent disks and reserved static addresses.
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.