Detection rules › Panther
GCP Snapshot Creation Detection
This rule detects when someone with an unexpected email domain creates a snapshot of a Compute Disk.
Rule body yaml
AnalysisType: rule
DedupPeriodMinutes: 60
DisplayName: GCP Snapshot Creation Detection
Enabled: false
Filename: gcp_snapshot_insert.py
RuleID: "GCP.Compute.Snapshot.UnexpectedDomain"
Severity: Medium
LogTypes:
- GCP.AuditLog
Tags:
- Configuration Required
Description: >
This rule detects when someone with an unexpected email domain creates a snapshot of a Compute Disk.
Runbook: >
Investigate the snapshot creation to ensure it was authorized. Unauthorized snapshot creation can lead to data exfiltration.
Reference: https://cloud.google.com/compute/docs/disks/snapshots
Tests:
- Name: Snapshot creation by user with unexpected domain
LogType: GCP.AuditLog
ExpectedResult: true
Log:
{
"insertId": "1abcd23efg456",
"logName": "projects/test-project/logs/cloudaudit.googleapis.com%2Factivity",
"protoPayload": {
"@type": "type.googleapis.com/google.cloud.audit.AuditLog",
"authenticationInfo": {
"principalEmail": "user@unexpected-domain.com"
},
"methodName": "v1.compute.snapshots.insert",
"resourceName": "projects/test-project/global/snapshots/snapshot-1",
"serviceName": "compute.googleapis.com"
},
"resource": {
"labels": {
"project_id": "test-project"
},
"type": "gce_snapshot"
},
"severity": "NOTICE",
"timestamp": "2023-10-01T12:34:56.789Z"
}
- Name: Snapshot creation by user with expected domain
LogType: GCP.AuditLog
ExpectedResult: false
Log:
{
"insertId": "2hijk34lmn789",
"logName": "projects/test-project/logs/cloudaudit.googleapis.com%2Factivity",
"protoPayload": {
"@type": "type.googleapis.com/google.cloud.audit.AuditLog",
"authenticationInfo": {
"principalEmail": "user@your-domain.tld"
},
"methodName": "v1.compute.snapshots.insert",
"resourceName": "projects/test-project/global/snapshots/snapshot-2",
"serviceName": "compute.googleapis.com"
},
"resource": {
"labels": {
"project_id": "test-project"
},
"type": "gce_snapshot"
},
"severity": "NOTICE",
"timestamp": "2023-10-01T12:45:56.789Z"
}
Detection logic
Condition
protoPayload.response.error is_null
protoPayload.methodName eq "v1.compute.snapshots.insert"
protoPayload.authenticationInfo.principalEmail not ends_with "@your-domain.tld"
Exclusions
Top-level NOT(...) conjuncts: predicates this rule actively suppresses.
| Field | Kind | Excluded values |
|---|---|---|
protoPayload.authenticationInfo.principalEmail | ends_with | @your-domain.tld |
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
protoPayload.methodName | eq |
|
protoPayload.response.error | is_null |
Output fields
Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.
| Field | Source |
|---|---|
project | resource.labels.project_id |
principal | protoPayload.authenticationInfo.principalEmail |
caller_ip | protoPayload.requestMetadata.callerIP |
methodName | protoPayload.methodName |
resourceName | protoPayload.resourceName |
serviceName | protoPayload.serviceName |