Unvalidated Redirect

This demo shows an example of an Unvalidated Redirect attack.

Example Use of Redirects

Some web sites have a "redirect" page, that redirects (or forwards) the user to another page or site. An example usage of a redirect maybe to prevent a warning before following links to external websites. For example, a government website may link to some commercial website. Rather than having a direct link link:

http://www.example.com/

the user may instead be redirected to a warning page via the link:

http://www.ministry.gov/redirect.php?url=www.example.com

The warning page may then display a message like We are not responsible for content on external sites and then (with another link or automatically after some time) forward the user to www.example.com.

Using a Redirect in a Phishing Attack

There are different ways a malicious use could take advantage of a poorly implemented redirect page. One is a phishing attack. The malicious user creates an email or other web page that a normal user sees. Inside is a link like:

http://www.ministry.gov/redirect.php?url=www.ministry.gov.com

The user checks the domain in the link and notices it is a trusted domain: www.ministry.gov. But they don't look closely at the rest of the URL (in fact even if they do, they may not understand what it means). Therefore the click on the link.

The user expects to be taken to a page at the trusted domain www.ministry.gov, but the end result is they are redirected to another domain, presumably under control of the malicious user. The malicious user has several ways of taking advantage of this redirection ...

You can try the redirection attack on the grades web site, as there is a page called redirect.php that takes a parameter called url. Try redirecting to a malicious site. An example malicious site is included: http://www.myuni.edu.gr/ades/login.php.

Return to demo