agent-security-hardening
AFaffaan-m/ECC278k4,046 new stars in the last 7 days
云凭据(AK/SK)泄露后的完整利用链。当通过信息泄露/.env文件/git泄露/SSRF元数据获取到云平台 Access Key 和 Secret Key 后使用。当获取到 AWS AKIA*/ASIA*、腾讯云 AKIDz*、阿里云 LTAI* 等凭据格式时使用。覆盖凭据配置→权限枚举→资源接管→后门持久化的完整攻击链。与 cloud-iam-audit(侧重策略分析)互补——本 skill 侧重拿到凭据后的实战利用动作。腾讯云比赛场景的 CAM/COS/CVM/SCF 利用是重点。发现任何云 API 密钥、临时凭据、或 STS Token 时都应使用此 skill
拿到云凭据后的黄金时间窗口通常很短(尤其临时凭据),需要快速高效地完成"枚举→利用→持久化"链条。
识别云平台后,加载对应 reference 获取完整命令:
| 云平台 | 格式特征 | 示例前缀 |
|---|---|---|
| AWS 长期 | 20字符 AccessKeyId | AKIA... |
| AWS 临时 | 20字符 + SessionToken | ASIA... |
| 腾讯云 | 36字符 SecretId | AKIDz... |
| 阿里云 | ~24字符 AccessKeyId | LTAI... |
| 华为云 | ~20字符 AK | AK... / SK... |
| GCP | Service Account JSON | "type": "service_account" |
| Azure | ClientId + ClientSecret + TenantId | GUID 格式 |
AWS:
export AWS_ACCESS_KEY_ID="AKIA..."
export AWS_SECRET_ACCESS_KEY="..."
export AWS_SESSION_TOKEN="..." # 临时凭据需要
export AWS_DEFAULT_REGION="us-east-1"
aws sts get-caller-identity
腾讯云:
export TENCENTCLOUD_SECRET_ID="AKIDz..."
export TENCENTCLOUD_SECRET_KEY="..."
export TENCENTCLOUD_SESSION_TOKEN="..." # 临时凭据
export TENCENTCLOUD_REGION="ap-guangzhou"
tccli sts GetCallerIdentity
阿里云:
export ALIBABA_CLOUD_ACCESS_KEY_ID="LTAI..."
export ALIBABA_CLOUD_ACCESS_KEY_SECRET="..."
aliyun sts GetCallerIdentity
配置凭据后,按以下顺序操作(具体命令参见对应云平台 reference):
权限枚举(前 2 分钟内完成)
资源接管(按价值排序)
提权
持久化后门
获取到 AK/SK
├── 识别云平台(AKIA=AWS, AKIDz=腾讯, LTAI=阿里)
│ └── 加载对应 reference(aws-exploit.md / tencent-exploit.md)
├── 配置环境变量 + 验证身份
├── 快速权限枚举(2 分钟内)
│ ├── 有 S3/COS 权限 → 列桶 → 下载敏感文件 → 找 flag
│ ├── 有 Lambda/SCF 权限 → 读代码 → 读环境变量
│ ├── 有 EC2/CVM 权限 → 获取 shell
│ ├── 有 IAM/CAM 权限 → 提权 → 管理员
│ └── 有 Secrets 权限 → 读密钥
├── 如果是临时凭据 → 先创建持久化后门
└── 深度利用 → cloud-iam-audit skill
AFaffaan-m/ECC278k4,046 new stars in the last 7 days
DIDietrichGebert/ponytail162k5,405 new stars in the last 7 days
DIDietrichGebert/ponytail162k5,405 new stars in the last 7 days
DIDietrichGebert/ponytail162k5,405 new stars in the last 7 days
GAgarrytan/gstack136k883 new stars in the last 7 days
Harden code against the OWASP Top 10: input handling, authentication, sessions and dependencies.
ADaddyosmani/agent-skills106k3,628 new stars in the last 7 days