I really wonder why the Mozilla Foundation decided to release a serious security update on a friday night and to disclose the link to my proof-of-concept code so quickly. It wasn't intendet from my side to release this as a 0day exploit. Please complain to firstname.lastname@example.org if you disagree with their release policy.
The search plugin technology in Firefox is based on Apple's sherlock files, a simple text format to syndicate a search engine interface. The installer and parser of those files contain design bugs that allow to create a search eninge that works as a spyware tool and/or execution vehicle for arbitrary code.
By creating a special sherlock file it is possible to overwrite an existing search engine without a chance for the user to see what is going on. The displayed name in the confirmation dialog is given as the third parameter of sidebar.addSearchEngine(), but the displayed name in the search dropdown is taken from the sherlock file. This way it is possible to overwrite the default Google search with a modified version that monitors the data and/or waits for a chance to run code. The string "google.src" in the source URL got also be moved out of the dialog by supplying a really long URL to the sherlock file (the dialog just cuts the source URL when it's getting too long).
The user will probably think the search engine installation just failed, because after confirming the installation dialog Firefox never displays an error messages if the installation failed because e.g. the sherlock file is broken or not found. Since there is no UI to see details about the installed searches a common user will probably never find out that the default Google search got modified. Using the built in sherlock update feature an attacker also gets a decent update mechanism to modifiy the scripts beyond the initial infection.
The bugs are fixed in Firefox 1.0.3. Don't install search plugins as a workaround.
2005-04-12 Vendor informed (bugzilla.mozilla.org #290037 and #290038) 2005-04-12 Vendor confirmed bug 2005-04-15 Vendor published fix, advisory and link to PoC (mfsa2005-38) 2005-04-18 This advisory
Tested with Firefox 1.0.2
Michael Krax <email@example.com> http://www.mikx.de/?p=14
Full-Disclosure - We believe in it. Charter: http://lists.grok.org.uk/full-disclosure-charter.html Hosted and sponsored by Secunia - http://secunia.com/