pale-knight/redteam-skill / skills/cloud-attack
cloud-attack
FlaggedCloud control-plane exploitation for AWS, Azure/Entra, GCP, and Alibaba Cloud: IAM/RAM privilege escalation, impersonation, cross-account trust, serverless/compute control, and cloud-native persistence. Host OS persistence/C2 after root/SYSTEM belongs to /post. K8s RBAC belongs to /k8s. Operator chooses next modules; new identities default to /cloud-recon first.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.8 KB |
| references/alibaba-persistence.md | markdown | 2.0 KB |
| references/alibaba-privesc-paths.md | markdown | 3.0 KB |
| references/aws-persistence.md | markdown | 2.7 KB |
| references/aws-privesc-paths.md | markdown | 3.3 KB |
| references/aws-serverless.md | markdown | 2.1 KB |
| references/azure-persistence.md | markdown | 2.1 KB |
| references/azure-privesc-paths.md | markdown | 1.8 KB |
| references/gcp-persistence.md | markdown | 1.5 KB |
| references/gcp-privesc-paths.md | markdown | 1.9 KB |
references/gcp-privesc-paths.md
View on GitHub# GCP 提权路径
## 1. Service Account Impersonation
条件:`roles/iam.serviceAccountTokenCreator` 或等价 `iam.serviceAccounts.getAccessToken`。
```bash
gcloud auth print-access-token \
--impersonate-service-account=<TARGET_SA>
```
验证:用 `--impersonate-service-account` 执行只读 API,确认目标 SA 权限。
## 2. iam.serviceAccounts.actAs
`actAs` 本身通常需要与可指定 service account 的 Compute/Cloud Run/Functions 等资源创建或修改权限组合。
典型思路:
```text
actAs(high-priv SA)
+
create/update execution resource
→ service runs as high-priv SA
```
## 3. setIamPolicy
`resourcemanager.projects.setIamPolicy` / folder/org IAM 修改属于直接高影响权限。
保存当前 policy:
```bash
gcloud projects get-iam-policy <PROJECT> --format=json > iam-original.json
```
任何测试 binding 修改后必须恢复。
## 4. SA Key
条件:`iam.serviceAccountKeys.create`,同时组织策略没有禁止 key creation。
```bash
gcloud iam service-accounts keys create key.json \
--iam-account=<SA_EMAIL>
```
当前很多组织会通过 `iam.managed.disableServiceAccountKeyCreation`(或 legacy constraint)禁止创建,失败时不要重复尝试,改走 impersonation/workload identity 路径。
## 5. Compute Metadata / Startup Script
条件:能修改 instance metadata。
```bash
gcloud compute instances add-metadata <INSTANCE> \
--zone <ZONE> \
--metadata-from-file startup-script=script.sh
```
需考虑脚本是否只在 boot 触发、Guest Agent 状态、实例重启影响。靶场外需谨慎。
## 6. Cloud Functions / Cloud Run
修改代码/配置并指定高权 service account 可能形成执行链。
先记录原 revision/function config 和 execution SA,再做最小验证。
## 7. GKE boundary
可获取 GKE credential → `/k8s` 候选,不在本文件继续 Kubernetes RBAC。
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |