CAPEC-664
Server Side Request Forgery
An adversary exploits improper input validation by submitting maliciously crafted input to a target application running on a server, with the goal of forcing the server to make a request either to itself, to web services running in the server’s internal network, or to external third parties. If successful, the adversary’s request will be made with the server’s privilege level, bypassing its authentication controls. This ultimately allows the adversary to access sensitive data, execute commands on the server’s network, and make external requests with the stolen identity of the server. Server Side Request Forgery attacks differ from Cross Site Request Forgery attacks in that they target the server itself, whereas CSRF attacks exploit an insecure user authentication mechanism to perform unauthorized actions on the user's behalf.
Abstraction
Standard
Typical severity
High
Likelihood of attack
High
Understand the attack
What is this attack pattern?
Execution flow
How does the attack proceed, step by step?
Explore
Find target application
Experiment
Examine existing application requests
Techniques used
- Attempt manipulating the URL to retrieve an error response/code from the server to determine if URL/request validation is done.
- Use a list of XSS probe strings to specify as parameters to known URLs. If possible, use probe strings with unique identifiers.
- Create a GET request with a common server file path such as /etc/passwd as a parameter and examine output.
Exploit
Malicious request
Requirements
What does the attack require?
Prerequisites
- Server must be running a web application that processes HTTP requests.
Skills required
- Medium: The adversary will have to detect the vulnerability through an intermediary service or specify maliciously crafted URLs and analyze the server response.
- High: The adversary will be required to access internal resources, extract information, or leverage the services running on the server to perform unauthorized actions such as traversing the local network or routing a reflected TCP DDoS through them.
Resources required
- [None] No specialized resources are required to execute this type of attack.
Impact
What does a successful attack lead to?
Affected scopes: Integrity, Confidentiality, Availability
Affected scopes: Confidentiality
Affected scopes: Availability
Defence
How is it prevented and mitigated?
Real world