PIVTR-D
RGoogle Cloud playbook · Data and storage

Storage exposed or data exfiltrated

An attacker grants allUsers or allAuthenticatedUsers access to a bucket, or downloads objects in bulk with a stolen identity. Signed URLs grant access to anyone with the link until they expire. Block public access first, then establish who read what.

Look here

LogSearch for
Admin Activity audit logPublic grants: gcloud logging read 'protoPayload.methodName="storage.setIamPermissions" AND ("allUsers" OR "allAuthenticatedUsers")' --project=<project> --freshness=30d
Admin Activity audit logBucket changes and new buckets in the window: storage.buckets.update, storage.buckets.create
Data Access audit log for Cloud Storage (only if enabled)Bulk reads, grouped by principalEmail and callerIp: gcloud logging read 'protoPayload.methodName="storage.objects.get" AND protoPayload.resourceName:"buckets/<bucket>"' --project=<project> --freshness=30d
Cloud Storage usage logsEvery request to objects while they were public, anonymous or authenticated. Audit logs record none of them
Hash-based message authentication code (HMAC) keysKeys created in the window: gcloud storage hmac list

Contain

#Item
1Enforce public access prevention, which overrides existing public grants: gcloud storage buckets update gs://<bucket> --public-access-prevention
2Remove each public binding. Repeat for allAuthenticatedUsers: gcloud storage buckets remove-iam-policy-binding gs://<bucket> --member=allUsers --role=<role>
3Deactivate suspect HMAC keys: gcloud storage hmac update <access-id> --deactivate
4Invalidate signed URLs by deleting the signing service account key or HMAC key destructive, or by removing the signer's storage permissions. For URLs signed with signBlob, remove the signing service account's storage permissions
5Contain the identity that downloaded the data, following credential leak or workload credentials
6Test from an unauthenticated client. A 401 or 403 answer means the object is closed: curl -I https://storage.googleapis.com/<bucket>/<object>

Eradicate and recover

#Item
1Enforce storage.publicAccessPrevention at the organization. The policy file sets enforce: true: gcloud org-policies set-policy <file>
2Delete deactivated HMAC keys after evidence is recorded destructive: gcloud storage hmac delete <access-id>
3Enable Data Access audit logs for storage.googleapis.com on sensitive projects
4Enable usage logs on any bucket that must stay public
5List exposed objects and exposure times for the Legal advisor and the notification decision
Watch out
  • Public access prevention does not block signed URLs, which can last up to 7 days.
  • With no usage logs, nothing records who read a public object. Assume every exposed object was read.
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.