GCP GCS Bulk Object Deletion
Description
Detects bulk deletion of GCS objects. This pattern is indicative of a ransomware attack or data destruction where an adversary deletes storage objects at scale. The threshold of 10+ deletion operations suggests automated bulk deletion rather than normal application behavior. This can be part of a double extortion ransomware attack where data is both encrypted and deleted to increase pressure on victims.
Query · python
def rule(event):
method_name = event.deep_get("protoPayload", "methodName", default="UNKNOWN_METHOD_NAME")
service_name = event.deep_get("protoPayload", "serviceName")
severity = event.get("severity")
return all(
[
method_name == "storage.objects.delete",
service_name == "storage.googleapis.com",
severity != "ERROR", # Operation succeeded
]
)
def title(event):
principal = event.deep_get("protoPayload", "authenticationInfo", "principalEmail")
resource = event.deep_get("protoPayload", "resourceName")
return f"GCP: Bulk object deletion in resource [{resource}] by principal [{principal}]"
def alert_context(event):
return {
"principal": event.deep_get("protoPayload", "authenticationInfo", "principalEmail"),
"project": event.deep_get("resource", "labels", "project_id"),
"status": event.deep_get("protoPayload", "status"),
"location": event.deep_get("resource", "labels", "location"),
"resource": event.deep_get("protoPayload", "resourceName"),
}
Analyst notes
- Query GCP Audit logs for all storage.objects.delete operations by the principal email in the 1 hour window around this alert
- Identify the total number of deletion operations, affected buckets, and the rate of deletions per minute
- Check if the source IP matches the user's typical access patterns or is associated with known VPN/cloud providers
- Determine if the deleted objects can be recovered from versioning, soft delete, or backups
- Search for other ransomware indicators (KMS key changes, bucket configuration changes, bulk encryption) from this project in the past 24 hours
- Review IAM policy changes for the principal to determine if permissions were recently escalated