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-persistence.md
View on GitHub# GCP Cloud-native Persistence
## 1. IAM Binding
最直接的云控制面持久化之一。
保存原 IAM:
```bash
gcloud projects get-iam-policy <PROJECT> --format=json > iam-original.json
```
授权靶场最小验证:
```bash
gcloud projects add-iam-policy-binding <PROJECT> \
--member='serviceAccount:<CONTROLLED_SA>' \
--role='<ROLE>'
```
清理:
```bash
gcloud projects remove-iam-policy-binding <PROJECT> \
--member='serviceAccount:<CONTROLLED_SA>' \
--role='<ROLE>'
```
## 2. Service Account Key
条件型 persistence:组织策略可能禁止新 key。
```bash
gcloud iam service-accounts keys list --iam-account=<SA>
gcloud iam service-accounts keys create redteam-key.json --iam-account=<SA>
```
清理:
```bash
gcloud iam service-accounts keys delete <KEY_ID> --iam-account=<SA>
```
优先记录 key id,不要把 JSON key 留在共享目录。
## 3. Service Account Impersonation Path
如果已有长期控制的 principal 被授予 Token Creator 到高权 SA,这是一种无需创建 SA key 的持续云身份路径。
通过 IAM binding 建立/验证,结束时删除对应 binding。
## 4. Serverless persistence
Function/Cloud Run service 的代码、revision、execution service account、IAM policy 改动都可形成平台原生持续执行/访问能力。
原则:保存原 revision/config → 最小验证 → 回滚。
## 5. Detection
重点看 Cloud Audit Logs:IAM policy updates、SA key creation、function/run deployment、service account changes。
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 |