Langsung ke konten
Skillpedia
Keamanan5.5k ยท #14787

cloud-pentest

Fungsinya

Skill ini mengajari agent cara memeriksa izin identitas cloud yang sudah dimiliki penguji. Mencakup pendataan apa saja yang bisa dijangkau identitas tersebut dan jalur eskalasi hak akses, dimulai dari langkah yang hanya membaca.

Kapan dipakai

  • โœ“Saat penguji punya kunci akses cloud atau token metadata dan perlu tahu apa yang diizinkannya.
  • โœ“Saat penguji perlu memastikan apakah identitas cloud bisa memperoleh izin yang lebih banyak.
  • โœ“Saat penguji perlu menunjukkan dampak nyata dari akses cloud tanpa menyentuh data pelanggan.

Link skill

https://github.com/awarexone/Agentic-Bug-Hunter/blob/main/skills/cloud-pentest/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/awarexone/Agentic-Bug-Hunter/blob/main/skills/cloud-pentest/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit โ†’

Contoh permintaan ke AI

โ€œSaya punya kunci akses AWS yang masuk dalam cakupan pengujian ini. Bantu saya melihat apa yang bisa dilakukan identitas ini, dengan membaca dulu.โ€

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent pertama-tama mengidentifikasi identitas dengan panggilan yang hanya membaca, lalu mendaftar izinnya. Agent memeriksa jalur eskalasi yang sudah dikenal dan membuktikan dampak dengan objek uji yang tidak berbahaya, bukan data pelanggan.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

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
Pertanyaan umum

Apakah agent bisa mengubah sesuatu di cloud?

Skill ini menyebutkan pendataan dilakukan hanya membaca sebelum ada perubahan apa pun, dan cakupan harus dipastikan lebih dulu.

Apakah boleh memakai data pelanggan sebagai bukti?

Tidak. Skill ini menyebutkan akses harus dibuktikan dengan canary yang tidak berbahaya atau objek milik penguji sendiri.

Apakah kunci yang bocor sudah dihitung sebagai temuan?

Tidak. Skill ini menyebutkan temuannya adalah apa yang bisa dilakukan identitas tersebut.

Detail

Deskripsi asli dari pembuat

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

repo: awarexone/Agentic-Bug-Hunter

Popularitas

Bintang GitHub
5.5k
Peringkat
#14787
Lisensi
MIT
Diperbarui
28/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • โ€ฆ

Skill lain dari repositori ini

Skill serupa