{% extends "introduction/base.html" %} {% load static %} {% block content %} {% block title %} Server-Side Request Forgery {% endblock %}

CWE-918: Server-Side Request Forgery

The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
By providing URLs to unexpected hosts or ports, attackers can make it appear that the server is sending the request, possibly bypassing access controls such as firewalls that prevent the attackers from accessing the URLs directly. The server can be used as a proxy to conduct port scanning of hosts in internal networks, use other URLs such as that can access documents on the system (using file://), or use other protocols such as gopher:// or tftp://, which may provide greater control over the contents of requests.


This lab helps you to get an idea of how SSRF can result in major Security flaw. The next pages shows some blog, but can you figure out how the blogs are presented?

This website sends a request to the given url and displays the page withing the page. now there is a page at /ssrf_target which only allowes request from localhost ( ie 127.0.0.1 )
now start the server using python manage.py runserver 0:8000
get your network ip using ifconfig or ipcofig(in windows)
now go to http://[your ip]/ssrf_target
Now you can't access the page because it is not from localhost. Try to get access to this page content now using the utility.


{% endblock %}