Menu

Server-Side Request Forgery (SSRF)

What is SSRF?

SSRF occurs when an attacker can make the server send HTTP requests to arbitrary URLs. The server acts as a proxy, allowing attackers to:

🔓 Vulnerable URL Fetcher

This form fetches content from any URL on the server side, and displays it inline. Image formats are displayed directly, everything else is displayed as text. The server makes the request, not your browser.

Why is this dangerous? The server can access resources you can't, like internal services and cloud metadata.

SSRF Attack Examples

1. Access Cloud Metadata (AWS)

On AWS EC2 instances, try accessing instance metadata:

http://169.254.169.254/latest/meta-data/

This can reveal IAM credentials, instance info, and security groups.

2. Scan Internal Network

Try accessing internal services:

3. Read Local Files (if file:// is allowed)

file:///etc/passwd

May not work depending on PHP configuration (allow_url_include).

4. Port Scanning

Vary the port number to scan internal services:

http://localhost:PORT

Response times and error messages reveal open/closed ports.

Defence Strategies