PIVTR-D
RGoogle Cloud playbook · Data and storage

Data deletion, ransomware and key destruction

An attacker with admin rights turns off recovery features, then deletes buckets, objects, Cloud SQL instances, disks and snapshots, destroys Cloud KMS key versions or shuts down projects. Soft delete, KMS destroy scheduling and the project recovery window give you days to reverse most of it, and the clock starts at the deletion. Remove the attacker's admin access, then restore what is pending deletion.

Look here

LogSearch for
Admin Activity audit logRecovery settings weakened first: storage.buckets.update that sets soft delete to 0, suspends versioning or clears a retention policy, and cloudsql.instances.update that lowers retained backups. Then the deletions: storage.buckets.delete, cloudsql.instances.delete, cloudsql.backupRuns.delete, cloudsql.backups.delete
Admin Activity audit logDisk, snapshot and instance deletions: gcloud logging read 'protoPayload.methodName:("compute.disks.delete" OR "compute.snapshots.delete" OR "compute.instances.delete")' --project=<project> --freshness=30d
Data Access audit log for Cloud Storage (only if enabled)Object deletions, storage.objects.delete, and object writes that replace content. Deletions by Object Lifecycle Management are not in audit logs, so check storage.buckets.update for lifecycle rules added in the window. Lifecycle deletions are soft-deleted and can be restored
Admin Activity audit log (cloudkms.googleapis.com)Key versions destroyed, disabled or replaced as primary: DestroyCryptoKeyVersion, UpdateCryptoKeyVersion (disable), UpdateCryptoKeyPrimaryVersion
Cloud KMSKey versions pending destruction: gcloud kms keys versions list --key=<key> --keyring=<keyring> --location=<location> --filter='state=DESTROY_SCHEDULED'
Admin Activity audit log (cloudresourcemanager.googleapis.com)Project shutdowns. Search at the organization with --organization=<org-id>. The filter matches the v1 and v3 method names: protoPayload.methodName:"projects.delete"
Cloud Storage soft deleteSoft-deleted buckets that can come back: gcloud storage ls --buckets --soft-deleted --full
Cloud Storage soft deleteSoft-deleted objects in a bucket: gcloud storage ls gs://<bucket>/** --soft-deleted
Admin Activity audit log (backupdr.googleapis.com) and backup serversAttacks on the backup platform. Management console actions, such as expiring or deleting backup images, are also Admin Activity entries for backupdr.googleapis.com. For third-party backup servers on Compute Engine, check their own audit logs and sign-ins. Methods: google.cloud.backupdr.v1.BackupDR.DeleteBackupVault, google.cloud.backupdr.v1.BackupDR.DeleteBackup, google.cloud.backupdr.v1.BackupDR.UpdateBackup, google.cloud.backupdr.v1.BackupDR.DeleteBackupPlan, google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociation
Backup and DR appliance logBackup/recovery appliance events and errors: backupdr.googleapis.com%2Fbackup_recovery_appliance_events
Security Command CenterBackup and DR findings, and the Compute Engine finding for mass deletion: Impact: Deleted Google Cloud Backup and DR Backup Impact: Deleted Google Cloud Backup and DR Vault Impact: Google Cloud Backup and DR expire all images Impact: Google Cloud Backup and DR reduced backup expiration Impact: Many Instances Deleted

Contain

#Item
1Remove the attacker's admin access at the organization, following the org admin or service account key playbook. Every other step fails while the attacker can still delete
2Restore every KMS key version in DESTROY_SCHEDULED: gcloud kms keys versions restore <version> --key=<key> --keyring=<keyring> --location=<location>
3Enable each restored version, which comes back disabled: gcloud kms keys versions enable <version> --key=<key> --keyring=<keyring> --location=<location>
4Restore shut-down projects: gcloud projects undelete <project-id>
5Add a lien to each restored project so it cannot be shut down again: gcloud alpha resource-manager liens create --project=<project-id> --restrictions=resourcemanager.projects.delete --reason=<case-id>
6Restore soft-deleted buckets. The gcloud CLI restores the bucket empty: gcloud storage restore gs://<bucket>#<generation>
7Restore each restored bucket's objects: gcloud storage restore gs://<bucket>/** --async --deleted-after-time=<utc>
8Raise soft delete on surviving buckets so new deletions stay recoverable: gcloud storage buckets update gs://<bucket> --soft-delete-duration=90d
9Set deletion protection on Cloud SQL instances and keep backups past deletion: gcloud sql instances patch <instance> --deletion-protection --retain-backups-on-delete
10Snapshot surviving disks under a case label before anyone cleans up: gcloud compute disks snapshot <disk> --zone=<zone> --labels=case=<case-id>

Eradicate and recover

#Item
1Restore Cloud SQL from retained backups or Backup and DR vaults, then verify data with the owners
2Restore noncurrent object versions over objects the attacker overwrote or encrypted
3Store backups in a Backup and DR backup vault with enforced minimum retention, and lock it after testing
4Rotate backup server, appliance and console credentials. Treat them as compromised
5Give backup administration to a separate group with its own accounts, and run backup management servers in their own project
6Set a retention policy on log and backup buckets: gcloud storage buckets update gs://<bucket> --retention-period=<seconds>
7Lock the retention policy only after testing irreversible: gcloud storage buckets update gs://<bucket> --lock-retention-period
8Enforce a minimum destroy-scheduled duration for key versions at the organization: constraints/cloudkms.minimumDestroyScheduledDuration
9Require key versions to be disabled before they can be destroyed: constraints/cloudkms.disableBeforeDestroy
10Place liens on production projects and remove resourcemanager.projects.updateLiens from everyone outside a small admin group
Watch out
  • Soft delete keeps a deleted object for the duration in force when it was deleted: 7 days by default, up to 90. An attacker who sets the duration to 0 first leaves nothing to restore.
  • A shut-down project stays in DELETE_REQUESTED for 30 days, but buckets with soft delete disabled can be deleted at once. Restored projects can take up to 36 hours to work again.
  • A KMS key version is destroyed 30 days after scheduling unless the key was created with another duration. Data encrypted only with a destroyed version cannot be decrypted by anyone.
  • Restoring a bucket with the gcloud CLI restores an empty bucket. Restore its objects in a second step.

Google Cloud documentation: Cloud Storage soft delete, use soft delete, restore soft-deleted objects and buckets, bucket lock, Cloud Storage audit logging; Cloud KMS destroy and restore key versions, control key version destruction, Cloud KMS audit logging; Resource Manager delete and restore projects, project liens, Resource Manager audit logging; Backup and DR backup vaults, Backup and DR Service audit logging and audited API operations, backup/recovery appliance event logs; Cloud SQL for MySQL audit logging; gcloud sql instances patch reference; Security Command Center threat findings index. Checked September 2026. Re-checked October 2026: Cloud Storage soft delete (7-day default, 7 to 90 days or 0 to disable, lifecycle deletions soft-deleted, gcloud restores an empty bucket); gcloud reference for alpha resource-manager liens create (still alpha only); Destroy and restore key versions (30-day default); Delete and restore projects (30-day recovery period, up to 36 hours for services to work).

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.