Extended SSRF Detection (Cloud Metadata & Protocol Exploits)
Overview
Server-Side Request Forgery (SSRF) attacks using specific targets and protocols:
Cloud metadata endpoints:
- AWS:
http://169.254.169.254/latest/meta-data/ - GCP:
http://metadata.google.internal/ - Azure:
http://169.254.169.254/metadata/
- AWS:
Non-HTTP protocols:
file://: Read local filesgopher://: Binary protocol for internal service exploitationdict://: Info leak via Redis/Memcachedftp://: Internal FTP access
IPv6 bypass:
http://[::1]/to reach localhostURL encoding bypass:
http://127.0.0.1%2F/orhttp://0x7f000001/
Remediation
- Allowlist permitted URL schemes (only
https://) - Allowlist permitted destination IPs/domains
- Use a dedicated HTTP client proxy that enforces policies
- Disable
file://,gopher://,dict://in HTTP clients