cloud-iam-deep
What it does
This skill guides security testers through checking cloud identity permissions after a credential is found. It covers AWS, Azure and Google Cloud. It is for authorized testing of a company's cloud accounts.
When to use it
- βWhen a cloud access key or service account file is found during an authorized test.
- βWhen a web flaw might reach the cloud metadata service.
- βWhen you need to see what permissions an identity has in a cloud account.
Skill link
https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/cloud-iam-deep/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βWe found an AWS key during an authorized test. Can you check what permissions it has and how far it reaches?β
5 new skills a week. 1 minute to read.
How it works
The agent identifies the type of credential, then lists the identity's permissions and roles using the cloud command-line tools. It explains what the findings mean for the owner.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
When to use
Trigger when:
- A cloud credential surfaces (key, secret, token, JSON file)
- SSRF chain reaches IMDS / metadata endpoint
- APK / git-leak reveals embedded cloud key
- Recon shows public S3/GCS/Azure-blob with permissions you can verify
- A Kubernetes API or service-account token is exposed
- Post-RCE on a cloud-hosted instance β pivot to cloud control plane
Do NOT use for:
- On-prem-only environments (use AD attack skills β but those are out of scope per external-only boundary)
- Web2 vulns that happen to be on AWS β use the relevant
hunt-*skill
Credential identification (first 60 seconds)
# AWS access key patterns
AKIA[0-9A-Z]{16} # IAM user access key (long-term)
ASIA[0-9A-Z]{16} # STS temporary credential
AGPA[0-9A-Z]{16} # IAM group
AIDA[0-9A-Z]{16} # IAM user (user-id)
AROA[0-9A-Z]{16} # IAM role
ANPA[0-9A-Z]{16} # Managed policy
# AWS secret pattern (40-char base64-ish β context required)
[A-Za-z0-9/+=]{40} # AWS secret access key
# Azure
AccountKey=[A-Za-z0-9+/=]{86} # Storage account key
client_secret pattern + UUID # Azure AD app credential
# GCP service account JSON
{
"type": "service_account",
"project_id": "...",
"private_key_id": "...",
"private_key": "-----BEGIN PRIVATE KEY-----..."
}
# K8s SA token (JWT format β decode to confirm)
eyJhbGciOiJSUzI1... # decode kid claim to see issuer
AWS β read-only validation (the safe first step)
# Set credential
export AWS_ACCESS_KEY_ID="AKIA..."
export AWS_SECRET_ACCESS_KEY="..."
# 1. WHO am I?
aws sts get-caller-identity
# Returns: UserId, Account, Arn
# Arn tells you: IAM user vs role, account ID, name
# 2. WHAT can I do? (the privesc question)
# Try common read-only first β failures still inform you
aws iam list-users 2>&1 | head -5
aws iam list-roles 2>&1 | head -5
aws iam list-policies 2>&1 | head -5
aws iam list-groups 2>&1 | head -5
# 3. WHAT policies are attached to me?
aws iam list-attached-user-policies --user-name <self>
aws iam list-user-policies --user-name <self> # inline policies
aws iam list-groups-for-user --user-name <self>
# 4. Service-by-service surface
aws ec2 describe-instances --max-items 1 2>&1 | head
aws s3 ls 2>&1 | head -10
aws lambda list-functions --max-items 5 2>&1 | head
aws rds describe-db-instances --max-items 5 2>&1 | head
aws secretsmanager list-secrets --max-results 5 2>&1 | head
aws ssm describe-parameters --max-results 5 2>&1 | head
# 5. Audit any cross-account / external trust
aws iam list-roles --query 'Roles[?contains(AssumeRolePolicyDocument.Statement[0].Principal.AWS, `arn:aws:iam::`)]' 2>&1 | head -20
AWS privesc patterns (24+ documented β iam_privesc techniques)
Quick lookup β if you have any of these IAM actions, escalate via the listed technique:
| You have | Escalate via |
|---|---|
iam:CreateAccessKey |
Create access key on any user β impersonate |
iam:CreateLoginProfile |
Set a console password on a user β login |
iam:UpdateLoginProfile |
Reset console password on a user |
iam:AttachUserPolicy |
Attach AdministratorAccess to self |
iam:AttachGroupPolicy |
Attach AdministratorAccess to a group you're in |
iam:AttachRolePolicy + sts:AssumeRole |
Attach to a role you can assume |
iam:PutUserPolicy |
Inline AdministratorAccess to self |
iam:PutGroupPolicy |
Inline policy on a group |
iam:PutRolePolicy |
Inline on a role you can assume |
iam:AddUserToGroup |
Add self to admin group |
iam:UpdateAssumeRolePolicy + sts:AssumeRole |
Modify trust to allow self |
iam:CreatePolicyVersion |
Create v2 of an attached policy with admin |
iam:SetDefaultPolicyVersion |
Switch attached policy to admin version |
iam:PassRole + ec2:RunInstances |
Launch EC2 as admin role β use instance creds |
iam:PassRole + lambda:CreateFunction/InvokeFunction |
Run code as admin role |
iam:PassRole + cloudformation:CreateStack |
CF stack creates resources as admin |
iam:PassRole + glue:CreateDevEndpoint |
Notebook runs as admin role |
iam:PassRole + datapipeline |
Pipeline runs as admin role |
iam:PassRole + codestar:CreateProject |
New project gets admin role |
ec2:RunInstances (with admin instance profile already on the AMI) |
Spin instance, exfil creds from IMDS |
lambda:UpdateFunctionCode (function has admin role) |
Replace code β exfil creds |
| `lambda |
FAQ
Is this for on-premises systems?
No. The skill says on-premises-only environments are covered by other skills.
Which clouds does it support?
It covers AWS, Azure and Google Cloud, plus Kubernetes service account tokens.
What kinds of credentials does it recognize?
It recognizes common formats such as AWS access key prefixes, Azure storage keys and Google service account JSON files.
Details
Original description by the author
Cloud IAM red-team attack chain across AWS, Azure, GCP β focused on EXTERNAL exploitation paths and post-credential-discovery privilege analysis. Covers IAM enumeration (aws iam, az role, gcloud iam), STS/AssumeRole chaining, Azure Managed Identity abuse (via SSRF/leak), GCP service account JSON abuse, IMDSv1/v2 attacks via SSRF, K8s ServiceAccount token privilege analysis once held (token discovery / cluster exposure is owned by hunt-k8s), role-trust-policy confused-deputy, cross-account assume-role enumeration, IAM privilege escalation patterns (24+ AWS, 8+ Azure, 6+ GCP), and AWS Cognito Id
Popularity
- GitHub stars
- 5.4k
- Ranking position
- #14889
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
apk-redteam-pipeline
5.4kHelps your agent test an Android app for security weaknesses, from finding the APK file and decompiling it to checking for exposed secrets.
bugcrowd-reporting
5.4kHelps your agent write better Bugcrowd vulnerability reports, choosing the right category and answering out-of-scope objections.
enterprise-vpn-attack
5.4kHelps your agent check VPN and remote-access appliances from Cisco, Fortinet, Citrix and others for known weaknesses during an authorized test.
evidence-hygiene
5.4kHelps your agent prepare screenshots and request logs for a bug report while hiding cookies, personal data and other sensitive details.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.