Arbitrary URL Redirection Attack often is popularly known as an Open Redirection attack, which is a common web vulnerability that allows an attacker to redirect the victim user to an attacker-controlled domain. This attack can leveraged to steal sensitive information such as tokens, perform social engineering, and other attacks.
The Arbitrary URL Redirection Attack mostly happens at the endpoint where the application accepts user-supplied URL and redirects it upon the execution of the vulnerable function. Some of the common parameters are ?return=,?returnURI=,?forwardedTo=, ?redirect=, ?redirectURI=, ?url=,?forward= and other such parameter that seems to load or redirect user to another endpoint.
Hi Fellow Hackers and Bug Bounty Hunters, In this article, I will be sharing about one of my recent findings where I was able to perform an Arbitrary URL Redirection Attack by evading the filters.
Modern frameworks by default implement security checks to validate and avoid Open Redirect Attacks. Often various filters such as validating if a third party URL or IP is used, validating if HTTPS:// protocol is used and if found, the application block the redirection from happening.
Recently, I encountered a similar situation while testing a private application say target.com. While checking for the various vulnerabilities from my application security checklist, I was looking for URL Redirection next.
The general approach I follow to test this attack is the following:
In this case, for the application I was testing, I used Approach — 1 and I found the following potential endpoint for Open Redirection:
https://www.target.com/login?forward=/account/address
However, the forward parameter was validating if a URL is supplied and was blocking the redirection from happening. After further investigation I came to know that:
However, the application was allowing the use of the HTTP protocol. After thinking for a while, I used the following payload as a bypass:
http://2899905732 : 2899905732 is the Integer IP representation of google.com’s IP: 142.250.64.100
The final payload looked like the following:
https://www.target.com/login?forward=http://2899905732
I navigated to the above URL and logged in with valid credentials. Upon the login, the application redirected to google.com resulting in a successful Arbitrary URL Redirection Attack.