Detection: Detect New Open GCP Storage Buckets

EXPERIMENTAL DETECTION

This detection status is set to experimental. The Splunk Threat Research team has not yet fully tested, simulated, or built comprehensive datasets for this detection. As such, this analytic is not officially supported. If you have any questions or concerns, please reach out to us at research@splunk.com.

Description

The following analytic identifies the creation of new open/public GCP Storage buckets. It leverages GCP PubSub events, specifically monitoring for the storage.setIamPermissions method and checks if the allUsers member is added. This activity is significant because open storage buckets can expose sensitive data to the public, posing a severe security risk. If confirmed malicious, an attacker could access, modify, or delete data within the bucket, leading to data breaches and potential compliance violations.

 1`google_gcp_pubsub_message` data.resource.type=gcs_bucket data.protoPayload.methodName=storage.setIamPermissions 
 2| spath output=action path=data.protoPayload.serviceData.policyDelta.bindingDeltas{}.action 
 3| spath output=user path=data.protoPayload.authenticationInfo.principalEmail 
 4| spath output=location path=data.protoPayload.resourceLocation.currentLocations{} 
 5| spath output=src path=data.protoPayload.requestMetadata.callerIp 
 6| spath output=bucketName path=data.protoPayload.resourceName 
 7| spath output=role path=data.protoPayload.serviceData.policyDelta.bindingDeltas{}.role 
 8| spath output=member path=data.protoPayload.serviceData.policyDelta.bindingDeltas{}.member 
 9| search (member=allUsers AND action=ADD) 
10| table  _time, bucketName, src, user, location, action, role, member 
11| search `detect_new_open_gcp_storage_buckets_filter`

Data Source

Name Platform Sourcetype Source Supported App
N/A N/A N/A N/A N/A

Macros Used

Name Value
google_gcp_pubsub_message sourcetype="google:gcp:pubsub:message"
detect_new_open_gcp_storage_buckets_filter search *
detect_new_open_gcp_storage_buckets_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Annotations

- MITRE ATT&CK
+ Kill Chain Phases
+ NIST
+ CIS
- Threat Actors
ID Technique Tactic
T1530 Data from Cloud Storage Collection
KillChainPhase.EXPLOITAITON
NistCategory.DE_CM
Cis18Value.CIS_13
Fox Kitten
Scattered Spider

Default Configuration

This detection is configured by default in Splunk Enterprise Security to run with the following settings:

Setting Value
Disabled true
Cron Schedule 0 * * * *
Earliest Time -70m@m
Latest Time -10m@m
Schedule Window auto
Creates Notable Yes
Rule Title %name%
Rule Description %description%
Notable Event Fields user, dest
Creates Risk Event True
This configuration file applies to all detections of type TTP. These detections will use Risk Based Alerting and generate Notable Events.

Implementation

This search relies on the Splunk Add-on for Google Cloud Platform, setting up a Cloud Pub/Sub input, along with the relevant GCP PubSub topics and logging sink to capture GCP Storage Bucket events (https://cloud.google.com/logging/docs/routing/overview).

Known False Positives

While this search has no known false positives, it is possible that a GCP admin has legitimately created a public bucket for a specific purpose. That said, GCP strongly advises against granting full control to the "allUsers" group.

Associated Analytic Story

Risk Based Analytics (RBA)

Risk Message Risk Score Impact Confidence
tbd 25 50 50
The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation Not Applicable N/A N/A N/A
Unit ❌ Failing N/A N/A N/A
Integration ❌ Failing N/A N/A N/A

Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range


Source: GitHub | Version: 2