githubEdit

Open Redirect

What is it?

An Open Redirect Vulnerability allows an attacker to redirect a user to an arbitrary website of the attacker's choosing. It occurs when an application incorporates user-supplied data into a URL which causes a redirection to that URL. This can be used to facilitate phishing attacks, steal sensitive information, or perform other malicious activities.

A simple example

Consider a website that uses a URL parameter to redirect the user to a specified page. For example: http://website.com/redirect?site=http://some-site.comarrow-up-right. An attacker could replace "http://some-site.comarrow-up-right" with a malicious site, then trick a user into following the crafted link.

Open Redirects can lead to: Phishing attacks Disclosure of sensitive information Malware installation Execution of arbitrary scripts

Other learning resources: OWASP: https://owasp.org/www-community/attacks/Unvalidated\\_Redirects\\_and\\_Forwardsarrow-up-right PortSwigger: https://portswigger.net/web-security/unvalidated-redirectsarrow-up-right

Checklist

Exploitation

Craft an URL with redirection to a malicious site

http://website.com/redirect?site=http://malicious-site.com

Trick the user into clicking the link

Open Redirect

Open Redirect

It accepts a user-controlled input that specifies a link to an external site and uses that link in a redirect.

Payloads

Unrestricted QR Code Scanning

Reference: https://shahjerry33.medium.com/open-redirection-qr-code-magic-18ace1a0170farrow-up-right

If website (or mobile application) has the function for scanning QR code but not restricts URL, we can let it to read malicious QR code.

1. Generate QR Code

First, we need to create a malicious QR code. There are many online tools for generating it.

2. Read Malicious QR Code in the Application

After generating the QR code, read the QR code in the target application. If the application does not validate the URL, we can access to the malicious URL.

Tools

Payloads

Last updated