Phising Exploit Discovered in ‘Google Public Search Service’

If any DIGGers read this, the reason I linked to this blog is because as far as I can tell, I’m the only person to ever come across this; there isn’t any other site to link to.

DIGG this article

For ADD readers, you can try out the ‘new Gmail Plus service’ here: http://www.google.com/u/gplus. Article follows below:

Yesterday I mentioned that I had discovered an exploit in a little known service from a major web company. It turns out that that exploit is in a little known service called ‘Google Public Service Search’. This service is meant for universities or other non-profit organizations to add a ‘Google’ search to their website. It differs from the other free Google site search in that it allows you to customize the header and footer of the search results page. It’s interesting to note that the code for your header and footer is actually hosted by Google, on their server.

I actually found this site when asked to add a Google search to one of the pages at work. One problem that people had with the default behavior is that while you can customize the initial search box to your heart’s consent, the search box that appears on the results page is off-limits. This was a problem, because people had asked for the radio buttons say specific things, instead of the default ‘WWW’ and ’some other domain’. I pondered how I could get around this, just out of curiosity (though I suspect this would violate the ToS :) ) and tried a simple Javascript alert. Sure enough, when I ‘previewed’ the page, the script was executed. Interesting…

I began to use Javascript to modify the DOM, allowing me to change the search box on the results page. Then I had another idea… I knew that my header was rendered first, then Google’s results, then the footer. I decided to encapsulate the Google search results by placing them in a DIV tag, then closed the DIV tag in the bottom. Right after that, in the footer, I used the Javascript ‘document.getElementById(divID).innerHTML’ property, and essentially, hid all of Google’s search results. I realized that I had created a blank slate, hosted at a Google.com address.

Though this was certainly impressive to me, it would not get the attention of anyone. Most people I know, when I show them I can execute a Javascript alert say “So?”. I decided to up the ante a bit and create a new ‘Google service’, modelled heavily after Gmail, but offering new features. After the Javascript in the footer, I added all of the HTML I needed to render a completely new page, of my choosing. I chose to use a modified version of the Google homepage. For the login form, I directed the user’s input to my server, which simply alerts them that they have been ’scammed’, but reassures them that no information was stolen — I just echo the user’s username and password that they entered.

Similar ‘phishing’ sites could be set up at ANY URL. What makes this type of exploit so insidious is that most people would consider the URL to be safe: http://www.google.com/u/gplus. While Google has suffered from similar attacks in the past, most of them have had suspicious URLs, at least to the advanced user. Using the exploit in this service, a malicious attacker could launch phishing sites that even advanced users could fall for.

Just as a sidenote, the URL of this service always has the form: http://www.google.com/u/something. ‘/something’ can really be anything you want (alphanumeric only, I believe).

The day after I found the exploit, I emailed security@google.com and got a response saying they would follow up with me later. They immediately took down the login page for the service as you can see here: https://services.google.com/publicservice/login. The site has been down since then.

My initial idea was that Google could simply remove script from the headers and footers; however, as my coworker pointed out, you could achieve a similar effect using the CSS ‘hidden’ (I think?) property on the DIV, and not use Javascript at all. It should be interesting to see how Google fixes this issue.

60 Responses to “Phising Exploit Discovered in ‘Google Public Search Service’”

  1. /pd Says:

    Nice hack.. excellent - did you contact google security or just went in full discolure mode directly ??

  2. » Google maakt phishing makkelijk Michel: … Says:

    […] Eric Farraro laat zien hoe je met de hulp van Google Public Search een Phishing Pagina maakt die dankzij de url bijna niet van echt te onderscheiden is. Google heeft inmiddels al gereageerd door de Public Search uit te schakelen. […]

  3. Google mit Phishing-Problem » BloggingTom Says:

    […] Kann Googles “Public Search Service” fr Phishing-Zwecke missbraucht werden? Eine Lcke in der Programmierung macht dies offensichtlich derzeit mglich, wie Eric Farraro feststellte. Durch das Hosting auf der google.com-Domain entsteht tatschlich der Eindruck, man sende seine Logindaten an Google, was aber offensichtlich falsch ist. Ein Proof of Concept zeigt Eric unter http://www.google.com/u/gplus. Wer auf Nummer sicher gehen will, gibt dort aber natrlich nicht seine echten Logindaten ein, sondern probiert es mit falschen Angaben… […]

  4. Kevin Says:

    Good find + coding Eric!

  5. tyler Says:

    bitchin.

  6. Shabda Says:

    Great man. Amazing proof of concept. I am sure a million users would have fallen for it had you just wanted to. Bravo for staying on the light side.

  7. Säkerhetsbrist i Google kan användas för nätfiske « Webbsnack Says:

    […] Eric Farraro har upptäckt en säkerhetsbrist i Google Public Service Search. Public Service Search tillåter bland annat att vem som helst kan skapa ett egendesignat sidhuvud och sidfot till det vanliga sökresultatet. Det Eric upptäckte var att man i sidfoten kan infoga JavaScript eller CSS-kod och på så sätt manipulera den vanliga sidan. […]

  8. watch tv Says:

    nice work, the funny part is that they can’t disable your account because it would mean temporarily suspending the service and because they use this service to dish out search results to the military and universities, they’re stuck in a tough pickle.

    If you were evil you could sell your little exploit (because registrations are disabled, so no one else can do it).

  9. Asa Says:

    I like your disclaimer. Thats really humble. I only dislike articles on digg that are obvious “Blog SPam”. This isn’t. Watch though, someone is going post this story on their blog with a link to you then submit to Digg.

    Great Job on uncovering this!

  10. Zate Says:

    Nice find..

  11. Marc Says:

    Good work… I contacted Google expressing my concern as well.

  12. Tony Says:

    Very impressive. And while google.com base domain will generally be trusted and not suspected of phishing, the form information itself is still posted to an external domain.

    Hmm.. I wonder - since the page is loaded from the google’s server, could you read session/cookies ?

  13. ejfarraro Says:

    @/pd: Yes, I did contact Google. I got a reply back saying they would follow up with me later, and they immediately took down the login page — meaning no one else can sign up for this after seeing the exploit. I wanted to make sure no one could take advantage of it before I put it on Digg.

    @Tony: Yes, I could in fact steal cookies. I don’t know what they contain, but many XSS type attacks to steal cookies to obtain information to falsely authenticate themselves as another user.

  14. Nikolay Kichukov Says:

    Hey, that is cool story. Thanks for revealing that security hole in gmail, thou I am not a gmail user myself.

    Sounds impressive.
    Keep the good work!

  15. Mallik Reddy Says:

    Blew of my mind when I saw my user id and pwd shown on a third party website… This challenges everything I thought I knew about phishing. I still dont get how it is possible on “Similar ‘phishing’ sites could be set up at ANY URL”. However, since you are smarter than me, I may have to believe that. But I would be curious if you can blog more about it. It couldnt possibly be “ANY”.. Does it ??? ):

    By the way, its always nice to have smart guys like you around… thanks for not stealing / storing my uid and pwd…

  16. ejfarraro Says:

    @Mallik:

    When I said any, I meant:

    http://www.google/com/u/(whatever I want)

    So for instance, I had also registered ‘http://www.google.com/u/login’ originally with the service. I could put any word after the ‘/u/ that I want (that isn’t already registered with Google’s service).

  17. Bob Says:

    The party’s over. Google is checking for the url and giving a 403 error now.

    I did see it, though, before they shut it down and echo the sentiments above - nice job and good catch!

    Very scary that phising sites can be hosted on a trusted domain!

  18. Google Watchdog » Blog Archive » Google Public Service Search Exploited Says:

    […] Eric has a great post where he exploited the Google Public Service Search. […]

  19. misiekf Says:

    a bug from google…
    Nice :)

  20. aemil Says:

    Great find, thank you for posting on digg.

  21. Inferno_str1ke Says:

    Very nice - I have tried injecting code to Google before but never knew about the public service site, though even if I had I wouldn’t have thought to do as you did.

    Interestingly as soon as I viewed the page Firefox 2’s Phishing detector went off, so obviously they’ve read this too!

  22. aliendisaster Says:

    Very nice. Here is the CSS code that would do the same thing:

    div style=”display:none”

  23. Wei Says:

    hmm, seems google is working on this issue now

  24. /pd Says:

    “I wanted to make sure no one could take advantage of it before I put it on Digg”

    Very Ethical - Kudos to you :) -

    btw, googs took down the ../u/whatever at approx 1030hrs edt

  25. Thomas J. Brown Says:

    Wow, great find! I’m glad it was you who discovered it and not someone of fewer scruples.

  26. Krotusblog » Blog Archive » http://ericfarraro.com/?p=6 Says:

    […] Krotusblog » Blog Archive » http://ericfarraro.com/?p=6 […]

  27. bd_ Says:

    Worse than just phishing… since you could run arbitrary JS, this allows for easy session cookie snatching. It could’ve happened without any user being aware of it at all…

  28. InfoWorld Tech Watch | InfoWorld | Google’s servers go phishing | September 15, 2006 07:42 AM | By Paul Roberts « Fact200 and Internet Research Says:

    […] Even the mighty G is not immune to javascript exploits and phishing scams. Phising Exploit Discovered in ‘Google Public Search Service’ Posted in Uncategorized | […]

  29. Mobile360 Says:

    Hi,

    Eric Google Phishing GREAT I haven’t seen sommat as good as the you could have esialy got thousands of users fooled and your right about expert user could have been fooled. By the way I am just curious how many people fell for it.

    Thanks

  30. I Like Parentheses (so get used to ‘em) Says:

    Clever Hack…

    Eric Farraro discovered a flaw in Google’s University Search program. Essentially you can upload your own markup to make your university search page look nice. The page is actually hosted on Google’s domain, and through the use of Javascr…

  31. HitLines Says:

    Actually the CSS rule would be:

    .hide {
    display: none;
    }

    content

    You could also do a negative text-indent to move the element(s) off the screen: “text-indent: -9999px;”

  32. Siddhartha Gandhi Says:

    Hey, Eric, I want to say thanks for using this for good and notifying Google, instead of exploiting it and creating an internet scam. It takes good-hearted people like you to rid the Earth of viruses, trojans, spyware, and malware.

  33. Googlified Says:

    Gmail Plus? Phishing!…

    Eric Farraro, a software developer, found an exploit in Google Public Service Search, a little known service for universities or other non-profit organizations to add a ‘Google’ search to their website and allows you to customize the header…

  34. Google fait du phishing ? Says:

    […] Plus de détails ici : http://ericfarraro.com/?p=6 […]

  35. Passion is like genius; a miracle. » Gmail 피싱 사이트 등장 Says:

    […] 원리에 대한 설명은 Phising Exploit Discovered in ‘Google Public Search Service’에 있습니다. 실제 피싱 사이트는 http://www.google.com/u/gplus입니다. 파폭에서 google safe browsing을 설치하셨다면 피싱 경고가 나올 것입니다. 지금은 로그인 창이 막힌것 같지만, 설령 로그인 창이 정상적으로 떠도 절대로 실제 아이디와 비밀번호를 넣으면 안됩니다. […]

  36. Adventures in Programming Says:

    Phising Exploit Discovered in ‘Google Public Search Service’…

    Eric Farraro from software.dev discovered a nasty hole in the Google Public Search Service.

    Yesterday I mentioned that I had discovered an exploit in a little known service from a major web company. It turns out that that exploit is in a little kn…

  37. ha.ckers.org web application security lab - Archive » Google Plagued By XSS - Again Says:

    […] Eric Farraro found another fairly complex XSS exploit in Google - again. I applaud his technique as it was fairly complex (not your standard variable tampering). […]

  38. Depressive Developer » Blog Archive » Google mit XSS angephisht Says:

    […] Ein nicht ganz so bekannter Google Service namens ‘Public Service Search‘ ist laut Eric Farraro gegen XSS Attacken verwundbar und konnte fr ausgefeilte Phishing-Attacken missbraucht werden. […]

  39. Rohan Pinto Says:

    Google Phishing Exploit Exposed …

    Eric Farraro blogged about his P.O.C exploit on Google Public Service Search. I urge you to read about his exploit and notice that how simple an “exploit” could really boil down to….

  40. SecuriTeam Blogs » Exploiting Google for Phishing Says:

    […] From the software.dev blog: Yesterday I mentioned that I had discovered an exploit in a little known service from a major web company. It turns out that that exploit is in a little known service called ‘Google Public Service Search’. This service is meant for universities or other non-profit organizations to add a ‘Google’ search to their website. It differs from the other free Google site search in that it allows you to customize the header and footer of the search results page. It’s interesting to note that the code for your header and footer is actually hosted by Google, on their server. […]

  41. Phishing bei Google @ Frank Ristau Says:

    […] Wie das GoogleWatchBlog schreibt, konnte es durch eine Sicherheitslücke zu Phishing-Attacken bei Google kommen. Das besondere: die ganze Aktion wurde direkt unter der Google.com Domain ausgeführt. Unter der Adresse google.com/u/gplus befand sich eine Login-Page für das angeblich neue GMail Plus - ein Dienst, der gar nicht existiert.Wie es ganz genau geht, kann bei Eric Farraro nachgelesen werden, der diese Lücke mittlerweile an Google gemeldet hat. Die Seite wurde mit Google Public Service Search erstellt. Dies erlaubt es einem Nutzer das Aussehen der Suchergebnisse individuell an die eigene Webseite anzupassen. Damit könnte ein Angreifer also seine persönliche Suchseite so verändern, dass sie wie ein neuer Dienst von Google aussieht. Da die Seite unter der Domain google.com aufrufbar ist, besteht auch Zugriff auf die Cookies dieser Domain. Damit können , auch ohne Login-Daten des Users, Google Accounts entführt werden. Die Seite wurde mitlerweile entfernt, der Google Public Service Search zumindest vorläufig für alle Nutzer gesperrt. […]

  42. Websecurity - Веб безпека Says:

    XSS уразливість в Гуглі…

    Нещодавно, 14.09.2006, модний парубок Eric Farraro знайшов нову XSS уразливість в Гуглі. Давненько вже не було чути про Cross-Site Scripting уразливості в серві…

  43. Hacker Helps Google Add Orkut to Gmail « Wanting to Hack Learning to Crack Says:

    […] Source: eWeek , ericfarraro.com Extracts:” […]

  44. My Theories about Life » Phising Exploit Discovered in ‘Google Public Search Service’ Says:

    […] Eric Farraro discovered about a possible exploit discovered that lets you use google.com domain and do you phising expedition. Here is some excerpt from his article […]

  45. apnovi Says:

    I cant understand why google didn`t see that one coming…Nice one

  46. Miles Says:

    Wow. Google is becoming very security sloppy. While cross-site scripting attacks are difficult impossible? to fully defend against, this was just insecure by design. Allowing user javascript in the google domain is just plain dum (not even deserving of the b), allowing numberous really bad things.

  47. Zerp Says:

    Wow nice catch man, good to have people like you on top of things like this

  48. James Says:

    This is a GREAT find. Really out of the box thinking. Well done…

  49. Derek Ellis Says:

    Hey Eric, great work! I found the link to the ZDnet story this morning in my email. See you in a couple of weeks.

  50. Young Engineer Says:

    That was interesting! didn’t even notice that there was a Public Service search from Google before this.

  51. 又一种钓鱼网站 at Haliluya means Hallelujah Says:

    […]   这是eric利用Google公共服务搜索的一个小漏洞做出来的。这也证明了并非所有Google.com上的网页都是安全的,大家必须要时刻提高警惕。 […]

  52. Vijay Says:

    Nice exploit….. had only I got a chance to lay hands on Google Public Search Service….

    BTW, doesnn’t GPSS check the authenticity of the organization signing up to put a site on their page…??

  53. ejfarraro Says:

    @Vijay: Actually, no. Anyone can sign up (well, not anymore). Previously, anyone could sign up and have a page up and running in 5 minutes.

  54. Wyszukiwarki i wszystko o Google » Archiwum » Phising Exploit z ‘Google Public Search Service’ Says:

    […] Opis stworzenia takiej strony na http://ericfarraro.com/?p=6 […]

  55. Externspeicher » Nette Sicherheitslücke bei Google Says:

    […] Die Möglichkeit, für eine an die eigene Firma/Uni angepasste Suchseite das Layout ändern zu können, kann auch dafür genutzt werden, komplette Phishing-Seiten aufzusetzen, die unter der Domain google.com laufen. Mehr dazu hier. […]

  56. Che’s Blog » Gmail Plus? Says:

    […] 这是eric利用Google公共服务搜索的一个小漏洞做出来的。这也证明了并非所有Google.com上的网页都是安全的,大家必须要时刻提高警惕。 […]

  57. Priyan Says:

    Good work man… Keep the world beautiful ..

    Kudos to u ..

  58. phising scam using google Says:

    […] phising scam using google software.dev Blog Archive Phising Exploit Discovered in ‘Google Public Search Service’ quite an interesting find..some guy realising how to scam google users, gladly he reported the flaw and didnt take full use of the opportunity __________________ Web Community […]

  59. Dragos Says:

    nice work, I am using this service and they haven’t disabled my javascript that I use for navigation on my site as well as in the header. google did mess up jpeg directory links in the header though, but hover javascript still works.

    i believe this is why they allowed scripts on their server, since without this permission many customized headers with javascript navigations would be disabled.

    thanks, however, I would like to be able to check in on the search stats of my site’s account, i guess google analytics will have to do

  60. Antivirus free downloads Says:

    AVG download…

Leave a Reply

It sounds like SK2 has recently been updated on this blog. But not fully configured. You MUST visit Spam Karma's admin page at least once before letting it filter your comments (chaos may ensue otherwise).