> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/gcp-backend-bucket-having-dangling-gcp-storage-bucket.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# GCP backend bucket having dangling GCP Storage bucket

### Synopsis

| Field               | Value                                                 |
| ------------------- | ----------------------------------------------------- |
| Rule Type           | Detection                                             |
| Finding Type        | GCP backend bucket having dangling GCP Storage bucket |
| Finding ID          | 60000828                                              |
| Generates a Finding | This detection rule also generates a finding          |
| Severity            | Medium                                                |
| Category            | CONFIGURATION                                         |
| Cloud Providers     | GCP                                                   |
| Platform Module     | CSPM                                                  |
| Asset Types         | GOOGLE\_CLOUD\_BACKEND\_BUCKET                        |
| ATT\&CK Tactic      | TA0112 (TA0112)                                       |
| ATT\&CK Technique   | T1685 (T1685)                                         |

### Description

Dangling GCP Storage buckets linked to GCP backend buckets pose a significant security risk, enabling attackers to potentially take over the bucket and serve malicious content.

GCP backend buckets, often used by load balancers for static content delivery, may be configured to point to a GCP Storage bucket. If this linked storage bucket is deleted or doesn't exist within the same project, a misconfiguration arises. An attacker could create a bucket with the same name in their project, intercepting traffic intended for the original bucket. This allows them to host malicious content, facilitating phishing or malware distribution.

The impact of this misconfiguration is the potential for a complete compromise of the service associated with the backend bucket. Maintaining a valid link between the backend bucket and the storage bucket is crucial to prevent unauthorized access and maintain service integrity. Preventing attacker-controlled bucket takeover protects data and users.

To mitigate this risk, regularly verify the existence of storage buckets linked to backend buckets. Delete dangling backend bucket configurations. Ensure proper access controls are in place for all storage buckets, limiting access to only authorized users and services. Regular audits of bucket configurations are vital.

### Remediation

**Manual steps:**

Google Cloud Backend Bucket - Manual remediation steps:

To mitigate the risk, either delete the GCP backend bucket or create a GCP Storage bucket with the name in your account to which the GCP backend bucket points.

**Delete GCP backend bucket**

To delete a GCP backend bucket, it should be disassociated from all GCL Load balancers first. The following steps might be followed:

1. Identify the backend bucket pointing to a non-existing GCP Storage bucket.
2. Login to GCP Portal
3. Go to Network services -> Load Balancing
4. Click on "Backends"
5. Note the names of load balancers that are using the GCP backend bucket. Names are shown under the "Load balancer" column
6. Click on the "LOAD BALANCERS" tab
7. Click on the load balancer name for each load balancer identified in step 4 and repeat the following steps:
   1. After opening the load balancer page, click on "EDIT"
   2. Go to Backend configuration
   3. Under the "Backend buckets" section, remove the GCP backend bucket by clicking "cross" icon in front of it
   4. Go to Routing rules. Edit the rules as desired. Remove any rules pointing to the reported backend bucket.
   5. Click Update
8. Click and switch back to the "Backends" tab
9. Select the GCP backend bucket, the option to delete now should be available.
10. Click "Delete" -> "DELETE"

**Create a new GCP Storage bucket**

Refer to the following link on how to create a new GCP Storage bucket and create a new bucket with the same name as the one the GCP backend bucket is pointing to:

<https://cloud.google.com/storage/docs/creating-buckets#create\\_a\\_new\\_bucket>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/gcp-backend-bucket-having-dangling-gcp-storage-bucket.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
