WebGoat – SSRF (Server-Side Request Forgery)
Objective
The objective of this lab was to understand Server-Side Request Forgery (SSRF) and how a server can be manipulated into making a request to a specified URL.
Steps Performed
1. Opened the SSRF lab in WebGoat.
2. Examined the URL input field provided by the application.
3. The application expected a complete URL including the protocol.
4. Added the http:// protocol before ifconfig.pro.
5. Submitted the modified URL.
6. The application successfully processed the request and the lab was completed.
Vulnerability
The application accepted a user-controlled URL and used it to make a server-side request without properly validating the destination.
Impact
An SSRF vulnerability can allow an attacker to make the server send requests to unintended resources. Depending on the application’s environment, this may expose internal services or sensitive information.
Remediation
* Validate and restrict user-supplied URLs.
* Use an allowlist of trusted domains and protocols.
* Block requests to internal and private network addresses.
* Disable unnecessary URL-fetching functionality.
* Apply network-level controls to restrict outbound requests.