AWS
Instance Metadata Service (IMDS)
IMDSv1 vs IMDSv2
# IMPORTANT: AWS is moving towards IMDSv2 as default
# Many new instances have IMDSv1 disabled - always try both methods
# IMDSv1 (Legacy - simple GET request)
# May be disabled on newer instances
curl http://169.254.169.254/latest/meta-data/
# IMDSv2 (Current - requires session token)
# Two-step process: get token, then use it
TOKEN=$(curl -X PUT "http://169.254.169.254/latest/api/token" \
-H "X-aws-ec2-metadata-token-ttl-seconds: 21600" 2>/dev/null)
curl -H "X-aws-ec2-metadata-token: $TOKEN" \
http://169.254.169.254/latest/meta-data/
# Check which version is enabled on instance
# HttpTokens: required = IMDSv2 only
# HttpTokens: optional = Both versions
aws ec2 describe-instances --query 'Reservations[].Instances[].MetadataOptions'IMDSv2 Full Exploitation
SSRF Bypass Techniques
AWS basic info
Find AWS in domain/company
AIO AWS tools
S3
Basic Commands
Find S3 buckets
Check S3 buckets perms and files
S3 examples attacks
Enumerate read access buckets script
IAM
Basic commands
Tools
AWS IAM Cli Enumeration
EBS
Find secrets in public EBS
EBS attack example
EC2
EC2 basic commands
EC2 example attacks
Tools
Cloudfront
Info
Tools
AWS Lambda
Info
Tools
AWS Inspector
AWS RDS
Basic
Attacks
ECR
Info
Tools
ECS
Info
AWS Cognito API


AWS Systems Manager

Aws Services Summary
AWS Service
Should have been called
Use this to
It's like
AWS vs AD

Related Topics
Last updated
Was this helpful?