GCP Detect high risk permissions by resource and account
Description
This search provides detection of high risk permissions by resource and accounts. These are permissions that can allow attackers with compromised accounts to move laterally and escalate privileges.
- Type: Hunting
-
Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
- Last Updated: 2020-10-09
- Author: Rod Soto, Splunk
- ID: 2e70ef35-2187-431f-aedc-4503dc9b06ba
Annotations
ATT&CK
ID | Technique | Tactic |
---|---|---|
T1078 | Valid Accounts | Defense Evasion, Initial Access, Persistence, Privilege Escalation |
Kill Chain Phase
- Exploitation
NIST
CIS20
CVE
Search
1
2
3
`google_gcp_pubsub_message` data.protoPayload.authorizationInfo{}.permission=iam.serviceAccounts.getaccesstoken OR iam.serviceAccounts.setIamPolicy OR iam.serviceAccounts.actas OR dataflow.jobs.create OR composer.environments.create OR dataproc.clusters.create
|table data.protoPayload.requestMetadata.callerIp data.protoPayload.authenticationInfo.principalEmail data.protoPayload.authorizationInfo{}.permission data.protoPayload.response.bindings{}.members{} data.resource.labels.project_id
| `gcp_detect_high_risk_permissions_by_resource_and_account_filter`
Macros
The SPL above uses the following Macros:
Note that gcp_detect_high_risk_permissions_by_resource_and_account_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Required field
- _time
- data.protoPayload.authorizationInfo{}.permission
- data.protoPayload.requestMetadata.callerIp
- data.protoPayload.authenticationInfo.principalEmail
- data.protoPayload.authorizationInfo{}.permission
- data.protoPayload.response.bindings{}.members{}
- data.resource.labels.project_id
How To Implement
You must install splunk GCP add-on. This search works with gcp:pubsub:message logs
Known False Positives
High risk permissions are part of any GCP environment, however it is important to track resource and accounts usage, this search may produce false positives.
Associated Analytic story
RBA
Risk Score | Impact | Confidence | Message |
---|---|---|---|
25.0 | 50 | 50 | tbd |
Reference
- https://github.com/dxa4481/gcploit
- https://www.youtube.com/watch?v=Ml09R38jpok
- https://cloud.google.com/iam/docs/permissions-reference
Test Dataset
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 | version: 1