Overview Server-Side Request Forgery (SSRF) occurs when a web application fetches a remote resource based on a user-supplied URL without validating the destination. In cloud and containerized environments, SSRF frequently allows attackers to reach internal services or instance metadata endpoints.
Offensive Testing Workflow 1. **Identify URL-fetching parameters**: Look for parameters named `url=`, `webhook=`, `dest=`, `callback=`, `avatar=`, or PDF/image export generators. 2. **Test Out-of-Band (OOB) interactions**: Supply an external listener (e.g., `interactsh` or Burp Collaborator) to confirm whether the backend server initiates HTTP or DNS requests. 3. **Probe loopback and internal ranges**:
bash
# Testing internal loopback & cloud metadata endpoints
curl -i -s "https://target.local/api/fetch?url=http://127.0.0.1:8080/admin"
curl -i -s "https://target.local/api/fetch?url=http://169.254.169.254/latest/meta-data/"