Saturday, July 19, 2014

Posted by Paulos Yibelo
1 comment | 11:22 AM
Web applications frequently redirect and forward users to other pages and websites, and use untrusted data to determine the destination pages. Without proper validation, attackers can redirect victims to phishing or malware sites, or use forwards to access unauthorized pages.

An unaware user is most probably tricked by attackers to a malware site or a phishing site and gets infected by various types of attacks like leading to complete system compromise. This is caused because of improperly sanitized user redirect script or similar cases. Such attacks can be classified into many ways and some found on huge social media sites like Facebook.

Recently I was browsing through Facebook mobile ( and I found a notification that a friend tagged me into a post… well the post wasn’t that interesting so I decided to hide it. When clicking on hide I notice the URL parameter contained a parameter called ‘continue’ followed by stories.php

so I figured that can lead to a URL redirection if I changed the continue parameter to something like but the Linkshim was rechecking and returning it back to so the redirection wasn’t successful but then I noticed that parameter can be tricked using path transversal tricks like ../

So when I gave the url parameter something like &continue=../ I was able to bypass the Linkshim and get a successful redirection to (which by the way is a blocked link by Facebook)
So the full parameter for redirection including the Linkshim evasion was

And none of the other parameters needs to be accurate; the story_fbid and id parameters can be any number so we don’t need victim’s special parameters to execute redirection.

Now the issue have been fixed and Facebook has promised to reward me with 1000$USD for this bug. I would like to thank the Facebook Security Team so much for their cool support and generous amount. 

1 comment: