Facebook Old Generated URLs Still Vulnerable to Open Redirect Attacks & A New Open Redirect Web Security Bugs
Domain:
"Facebook is an online social networking service headquartered in Menlo Park, California. Its website was launched on February 4, 2004, by Mark Zuckerberg with his college roommates and fellow Harvard University students Eduardo Saverin, Andrew McCollum, Dustin Moskovitz and Chris Hughes. The founders had initially limited the website's membership to Harvard students, but later expanded it to colleges in the Boston area, the Ivy League, and Stanford University. It gradually added support for students at various other universities and later to high-school students. Since 2006, anyone who is at least 13 years old is allowed to become a registered user of the website, though the age requirement may be higher depending on applicable local laws. Its name comes from a colloquialism for the directory given to it by American universities students." (Wikipedia)
"Facebook had over 1.44 billion monthly active users as of March 2015.Because of the large volume of data users submit to the service, Facebook has come under scrutiny for their privacy policies. Facebook, Inc. held its initial public offering in February 2012 and began selling stock to the public three months later, reaching an original peak market capitalization of $104 billion. As of February 2015 Facebook reached a market capitalization of $212 Billion." (Wikipedia)
Discover:
Wang Jing, Division of Mathematical Sciences (MAS), School of Physical and Mathematical Sciences (SPMS), Nanyang Technological University (NTU), Singapore. (@justqdjing)
(1) General Vulnerabilities Description:
(1.1) Two Facebook vulnerabilities are introduced in this article.
Facebook has a computer cyber security bug problem. It can be exploited by Open Redirect attacks. This could allow a user to create a specially crafted URL, that if clicked, would redirect a victim from the intended legitimate web site to an arbitrary web site of the attacker's choosing. Such attacks are useful as the crafted URL initially appear to be a web page of a trusted site. This could be leveraged to direct an unsuspecting user to a web page containing attacks that target client side software such as a web browser or document rendering programs.
Since Facebook is trusted by large numbers of other websites. Those vulnerabilities can be used to do "Covert Redirect" to other websites such as Amazon, eBay, Go-daddy, Yahoo, 163, Mail.ru etc.
Since Facebook is trusted by large numbers of other websites. Those vulnerabilities can be used to do "Covert Redirect" to other websites such as Amazon, eBay, Go-daddy, Yahoo, 163, Mail.ru etc.
(1.1.1)
One Facebook Open Redirect vulnerability was reported to Facebook. Facebook adopted a new mechanism to patch it. Though the reported URL redirection vulnerabilities are patched. However, all old generated URLs are still vulnerable to the attacks. Section (2) gives detail of it.
The reason may be related to Facebook's third-party interaction system or database management system or both. Another reason may be related to Facebook's design for different kind of browsers.
(1.1.2) Another new Open Redirect vulnerability related to Facebook is introduced, too. For reference, please read section (3).
The vulnerabilities can be attacked without user login. Tests were performed on IE (9.0) of Windows 8, Firefox (24.0) & Google Chromium 30.0.1599.114 ubuntu0.14.04.1.1064 (64-bit) of Ubuntu (12.10),Safari 6.1.6 of Mac OS X Lion 10.7.
(1.2) Facebook's URL Redirection System Related to "*.php" Files
All URLs' redirection are based on several files, such l.php, a.php, landing.php and so on.
The main redirection are based on file "l.php" (Almost all redirection links are using it right now).
For file "l.php", one parameter "h" is used for authentication. When it mentions to file "a.php", parameter "eid" is used for authentication. All those two files use parameter "u" for the url redirected to. In some other files such as "landing.php", parameters such as "url", "next" are used.
<1>For parameter "h", two forms of authentication are used.
<a>h=HAQHyinFq
<b>h= hAQHalW1CAQHrkVIQNNqgwhxRWLNsF VeH3auuImlbR1CgKA
<2>For parameter "eid", one form of authentication is used.
<a>eid= AQLP8sRq6lbU0jz0lARx9A9uetB6FI F1N2-Yjj_ePj0d_ ezubjstZeDo6qDsalKVJwy6uDb_hQ- 9tBsA2dVoQRq0lniOu0os_ gPe3gY5l8lYblhQSwBtdvgjXjNqaxL ZMYoasr3vv46tFsh1fL7q4kjT2LFw5 2dnJWd4SE8qc0YuPWfgPeQywgM2wl0 CoW- lftWkr2dX0dLcytyHjXnvhKfVS_ pQBllszUzsPENxE6EuZ- 53Lh188o56idnfyyk2L58pE7C94PF- za4ZVB0qbuA2EnPcSJI- 7oIiIJmIhifHe0CYTzG512-Z_ heN44VlyJHevhS9auAR8- lFCAIlYymnT_ Qiwp92RxjNOfBypBvszQUrvB6PH3fA Nn1prfMBVm4RD_ GFel14KVDS5USswbTOTkL3sZNhHUqq PHwBwU3JFePMMuwsfesigH85B_ AxCsXUIWN7klKGSq8bPPsKSHttsa9h kkMpSfRKL7D_ xwW4dU2xlmfGWil7jYRJmwfbOeF0zu jk1FRBuM757tbfFMav-J- K9npbdrDrCuUVqV__Tf7CGZ89nPl- M2d09pE9enJj0OBXOaSXZX16LKaYnv 1Wh4GKme7C-EOunITxyQtp1zy- 48Uaz9mxO2x4bw7sBDfzDStF_Al8_ 0SMjWNTh-J38rBHAgT96X- dPFI43HU3x3fVymE9szrclBpvTaSfY ezatgMzf77s3lQrQAMSlwSSRIzRuoF vQBmWKT0T5ZFgH5ykhYKhNMiKj577U O5g2Ojm-_-KKF4N_DBuG5R- I6EOSlhok2xUkpKVDnDcxZFTLxGmx5 xc56J5kZLjJ96wnF2fH09Q19Qc2aU3 xYFlEFrKjrlLpwGyOyCDx7_ z7y1O4Efqew3Fa0Cb9s6Kk2jpLF5XE IaYzzXOLAffxXG6icBJVovb9RPmiZ5 s9dKYYotLol68_X04O05bEvVccPEh- IQwX_ VTMt3f23be2MECEqR2l1A1ZkJx4qP0 0GI1pZhU_ CXAnjSaTNmtaINRUeSsLNEZZsPwpWJ MfeeGSwuof9krC05eSWjO0jH9tua0K teMYhj8i- 3dwSBp4f7nMcFwH5ltfCLhMCYNB8rx gzcAczyhLIo2UY- 3FSaJXBZ0lvuZBvnj7myUnyc2lCcy- fWh93MRRaJrrinjtfr9fDSMHM9Cja5 xi0eG3Vs0aClnWbeJZA79TvmYt7E53 HfwGuv5-EJOqRh3cwZF- 53uPHA73ikUk3xTApjQunJM4uIBhpy 7iBIgn_ OXXo3X03YUJtJcDuC20ocJbZ310VHl iox5tYZF2oiMaOfgo9Y9KeqgsrJgwP CJeif4aB0Ne4g_oM_ Tuqt2pXbdgoCawHIApF087eFKJqejp 0jpEkJerXPyK-IqsD_SQfIm_ 2WJSkzwzATwQKs
(2.1) A security researcher reported two Open Redirect vulnerabilities to Facebook in 2013. The following are the two links reported.
Though a new mechanism was adopted. However, all old generated redirections still work by parameter "h" and "eid".
(2.2) A website was used for the following tests. The website is "http://www.tetraph.com/". Suppose this website is malicious.
(2.2.1)
<1>First test
<a>file: "l.php"
<b>URL parameter: "u"
<c>authentication parameter: "h"
<d>form: "h=HAQHyinFq".
<e>The authentication has no relation with all other parameters, such as "s".
Examples:
URL 1:
Redirect Forbidden:
Redirect Works:
URL 2:
Redirect Forbidden:
Redirect Works:
(2.2.2)
<2>Second test. It is the same situation as above.
<a>file: "l.php",
<b>url parameter "u"
<c>authentication parameter: "h"
<d>form: "h= hAQHalW1CAQHrkVIQNNqgwhxRWLNsF VeH3auuImlbR1CgKA".
<e>The authentication has no relation to all other parameters, such as "env", "s".
Examples:
URL 1:
Redirect Forbidden:
http://www.facebook.com/l.php? u=http%3A%2F%2Fwww.tetraph. com&h= pAQHnUOVGAQGcsXLy0MBttG7W1uiOv Sghc_POwYa6k35hbw&enc= AZNBNYyWIbhPD6ZDAw1Zom458dO6dN BHnPh1tWnzEgxsxqvjfAbnH1ynSYgN NOvQzY7oolrIRfkll4-z2Pm7C63N& s=1
Redirect Works:
Redirect Works:
URL 2:
Redirect Forbidden:
Redirect Works:
(3) Facebook File "a.php" Open Redirect Security Vulnerability
(3.1)
<a>file: "a.php"
<b>parameter "u"
<c> authentication parameter: "eid"
<d> form: "eid=5967147530925355409. 6013336879369. AQKBG5nt468YgKeiSdgExZQRjwGb9r 6EOu-Uc5WPvi- EVHEzadq8YSrgSvUzbMmxKPPfTgM- JrPff7tN38luc-8h16lxL0Gj_4qs1- 58yWgXirMH4AEf8sOEsZc5DTx7yFnd gODvD5NrC- 314BIj4pZvMhlljXv89lHRH6pBgyGG Vm- oWBDIF8CuRER1f5ZGbKdsiUcBISdWT ninVzvBdW1mZY0SWzqT21fZmhgVKtd kRf5l_ pag7hAmotFK9HI5XHfGicWVqzRyTNi DIYjyVjTv4km2FOEp7WP3w65aVUKP_ w".
<e>The authentication has no relation to all other parameters, such as "mac", "_tn_".
Examples:
Vulnerable URL:
POC:
(3.2) Facebook Login Page Covert Redirect Security Vulnerability
Vulnerable URL Related to Login.php Based on a.php:
POC:
Those vulnerabilities were reported to Facebook in 2014 and they have been patched.
Several other similar products 0-day vulnerabilities have been found by some other bug hunter researchers before. Facebook has patched some of them. "The Full Disclosure mailing list is a public forum for detailed discussion of vulnerabilities and exploitation techniques, as well as tools, papers, news, and events of interest to the community. FD differs from other security lists in its open nature and support for researchers' right to decide how to disclose their own discovered bugs. The full disclosure movement has been credited with forcing vendors to better secure their products and to publicly acknowledge and fix flaws rather than hide them. Vendor legal intimidation and censorship attempts are not tolerated here!" All the fllowing web securities have been published here, Buffer overflow, HTTP Response Splitting (CRLF), CMD Injection, SQL injection, Phishing, Cross-site scripting, CSRF, Cyber-attack, Unvalidated Redirects and Forwards, Information Leakage, Denial of Service, File Inclusion, Weak Encryption, Privilege Escalation, Directory Traversal, HTML Injection, Spam. Large number of Facebook bugs were published here. FD also publishes suggestions, advisories, solutions details related to Open Redirect vulnerabilities and cyber intelligence recommendations.
Several other similar products 0-day vulnerabilities have been found by some other bug hunter researchers before. Facebook has patched some of them. "The Full Disclosure mailing list is a public forum for detailed discussion of vulnerabilities and exploitation techniques, as well as tools, papers, news, and events of interest to the community. FD differs from other security lists in its open nature and support for researchers' right to decide how to disclose their own discovered bugs. The full disclosure movement has been credited with forcing vendors to better secure their products and to publicly acknowledge and fix flaws rather than hide them. Vendor legal intimidation and censorship attempts are not tolerated here!" All the fllowing web securities have been published here, Buffer overflow, HTTP Response Splitting (CRLF), CMD Injection, SQL injection, Phishing, Cross-site scripting, CSRF, Cyber-attack, Unvalidated Redirects and Forwards, Information Leakage, Denial of Service, File Inclusion, Weak Encryption, Privilege Escalation, Directory Traversal, HTML Injection, Spam. Large number of Facebook bugs were published here. FD also publishes suggestions, advisories, solutions details related to Open Redirect vulnerabilities and cyber intelligence recommendations.
(4) Amazon Covert Redirect Security Vulnerability Based on Facebook
Domain:
http://www.amazon.com
"American electronic commerce company with headquarters in Seattle, Washington. It is the largest Internet-based retailer in the United States. Amazon.com started as an online bookstore, but soon diversified, selling DVDs, Blu-rays, CDs, video downloads/streaming, MP3 downloads/streaming, software, video games, electronics, apparel, furniture, food, toys and jewelry. The company also produces consumer electronics—notably, Amazon Kindle e-book readers, Fire tablets, Fire TV and Fire Phone — and is a major provider of cloud computing services. Amazon also sells certain low-end products like USB cables under its inhouse brand AmazonBasics. Amazon has separate retail websites for United States, United Kingdom & Ireland, France, Canada, Germany, The Netherlands, Italy, Spain, Australia, Brazil, Japan, China, India and Mexico. Amazon also offers international shipping to certain other countries for some of its products. In 2011, it had professed an intention to launch its websites in Poland and Sweden." (Wikipedia)
The vulnerability exists at "redirect.html?" page with "&location" parameter, e.g.
More Details:
(4.1) When a user is redirected from Amazon to another site, Amazon will check parameters "&token". If the redirected URL's domain is OK, Amazon will allow the reidrection.
However, if the URLs in a redirected domain have open URL redirection vulnerabilities themselves, a user could be redirected from Amazon to a vulnerable URL in that domain first and later be redirected from this vulnerable site to a malicious site. This is as if being redirected from Amazon directly.
One of the vulnerable domain is,
(4.2) Use one of webpages for the following tests. The webpage address is "http://www.inzeed.com/ kaleidoscope". Suppose it is malicious.
Vulnerable URL:
POC:
POC Video:
Blog Details:
Related Articles:
http://seclists.org/fulldisclosure/2015/Jan/22
http://permalink.gmane.org/gmane.comp.security.fulldisclosure/1428
http://lists.openwall.net/full-disclosure/2015/01/12/1
http://marc.info/?l=full-disclosure&m=142104333521454&w=4
http://diebiyi.com/articles/security/facebook-open-redirect/
http://seclists.org/fulldisclosure/2015/Jan/22
http://permalink.gmane.org/gmane.comp.security.fulldisclosure/1428
http://lists.openwall.net/full-disclosure/2015/01/12/1
http://marc.info/?l=full-disclosure&m=142104333521454&w=4
http://diebiyi.com/articles/security/facebook-open-redirect/
https://www.facebook.com/essaybeans/posts/570476126427191
http://germancast.blogspot.de/ 2015/06/facebook-web-security- 0day-bug.html
https://mathfas.wordpress.com/2015/01/11/facebook-open-redirect/
http://essaybeans.lofter.com/ post/1cc77d20_7300027
https://www.facebook.com/permalink.php?story_fbid=472994806188548&id=405943696226993
https://mathfas.wordpress.com/2015/01/11/facebook-open-redirect/
http://www.tetraph.com/blog/phishing/facebook-open-redirect/
http://germancast.blogspot.de/
https://mathfas.wordpress.com/2015/01/11/facebook-open-redirect/
http://essaybeans.lofter.com/
https://www.facebook.com/permalink.php?story_fbid=472994806188548&id=405943696226993
https://mathfas.wordpress.com/2015/01/11/facebook-open-redirect/
http://www.tetraph.com/blog/phishing/facebook-open-redirect/
Are you looking to earn money from your visitors with popunder ads?
ReplyDeleteIn case you are, did you ever use PropellerAds?