Basic SSRF Exploitation Techniques
What you'll learn: How attackers exploit common web features to trick servers into making unintended requests on their behalf.
The Core Idea
Server-Side Request Forgery (SSRF) happens when an attacker can control where your server sends HTTP requests. While you learned the fundamentals and impact scenarios earlier, now we're exploring how attackers actually trigger these malicious requests through everyday web features.
Common Exploitation Vectors
URL Parameters
The most straightforward technique. If your application fetches content from user-supplied URLs (like ?url=http://example.com), an attacker can substitute internal addresses: ?url=http://localhost/admin or ?url=http://192.168.1.5/secrets.
File Upload Callbacks
Many applications accept URLs to remote files instead of direct uploads. An attacker provides http://internal-db:5432 instead of a legitimate image URL, causing the server to probe internal services.
Webhooks
Applications that let users register webhook URLs for notifications are prime targets. Instead of https://legitimate-service.com/callback, an attacker registers http://169.254.169.254/latest/meta-data/ (AWS metadata endpoint) to extract cloud credentials.
PDF Generators
HTML-to-PDF services often fetch external resources. Embedding <img src="http://internal-api/sensitive-data"> in HTML sent for PDF conversion forces the server to make that request, potentially leaking response data in error messages or timing.
Think Like This
Imagine you're a hotel concierge who fetches documents for guests. A malicious guest asks you to retrieve "the file from the manager's locked office." Because you're inside the building (on the internal network), you can access places the guest cannot reach directly—that's SSRF in action.
Key Takeaway:
SSRF exploitation leverages any feature where user input influences the destination of server-initiated requests—URL parameters, file callbacks, webhooks, and document generators are the most common attack surfaces.