Server Side Request Forgery: Methodology
SSRF is a security vulnerability that occurs when an attacker manipulates a server to make HTTP requests to an unintended location. This happens when the server processes user-provided URLs or IP addresses without proper validation.
Common exploitation paths:
Accessing Cloud metadata
Leaking files on the server
Network discovery, port scanning with the SSRF
Sending packets to specific services on the network, usually to achieve a Remote Command Execution on another server
Example: A server accepts user input to fetch a URL.
url = input("Enter URL:")
response = requests.get(url)
return responseAn attacker supplies a malicious input:
http://169.254.169.254/latest/meta-data/This fetches sensitive information from the AWS EC2 metadata service.
Comments
No comments yet.