Your SlideShare is downloading. ×
0
Firefox  (in)Security<br />Prasanna K <br />Dead Pixel<br />
What  & Who <br />This presentation demonstrates strength of the Mozilla platform and  how some of the features could be m...
Agenda<br />Basic premise<br />Understanding  the Mozilla Platform<br />Attacking Firefox <br />       Malicious Extension...
Introduction<br /><ul><li>Browser of the choice for millions
Multi Platform
Modular and Scalable !
Pluggable Extension Code !
Browser of my Choice </li></li></ul><li>Mozilla Platform<br />
Mozilla Platform <br />Chrome: <br />It could be used to indicate a “Special Trusted Zone” within the Mozilla Platform <br />
Mozilla Platform <br />XUL (pronounced "zool") : <br />Mozilla's XML-based language that lets you build feature-rich cross...
Mozilla Platform <br />XBL:<br />XML-based markup language used to declare the behavior and look of XUL-widgets and XML el...
Mozilla Platform <br />XPCOM:<br />Cross platform component model from Mozilla.<br />Nerve center of the Mozilla platform....
Important Components of Mozilla Platform<br />
Mozilla Platform<br />
Extension Installation – Mozilla Site<br /><ul><li>Reviewed before being added to the Mozilla site.
Review process is manual lapses have been found
Over 2 billion add-ons as of today and growing
Add-ons can be distributed through Mozilla without review as well</li></ul>https://addons.mozilla.org/en-US/firefox/addon/...
Extension Installation – How else?<br /><ul><li>There is no restriction on any site hosting Mozilla extensions (XPI files)
When installing from any site Mozilla pops a warning but the same message appears on the  official site (confusing!).
Extensions can be installed without warning by other software, USB autorun, login scripts etc. </li></li></ul><li>Extensio...
The filename should be the id of the extension to be loaded
The content of the file should be the location of the extension code</li></ul>Beware: When this file exists in the folder ...
Extension Security!<br />Mozilla extension security model is completely flat<br />Extension code is treated as fully privi...
The Potential<br />Statistics – Firefox Browser Market Share<br />Beyond 20% globally since November 2008, more than 50% i...
Extensions are Everywhere<br />
Concerns on AMO<br />Everyone can write extension and submit to AMO (even us  )<br />AMO review process lacks complete se...
This sums it up<br />
Extension and Malware<br />Some people have already exploited this concept<br />FormSpy - 2006<br />Downloader-AXM Trojan,...
Attacking Firefox !<br />Now that we have seen the basic architecture & problem, let’s have some fun  <br />
Anatomy of an Extension<br />These are the components of every extension. They are archived together into the XPI file for...
Malicious Extensions<br />We will build a malicious extension which will <br />Log all Key Strokes and send them remotely<...
Interesting Finds<br />In the course of making this presentation I found some interesting things<br />
Upcoming SlideShare
Loading in...5
×

Firefox security (prasanna)

2,397

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,397
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
64
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Xp Connect is the scripting front end to underlying Xpcom interfaces
  • Introduction to extensions
  • Xp Connect is the scripting front end to underlying Xpcom interfaces
  • Discuss about Z:\\
  • Xp Connect is the scripting front end to underlying Xpcom interfaces
  • Transcript of "Firefox security (prasanna) "

    1. 1. Firefox (in)Security<br />Prasanna K <br />Dead Pixel<br />
    2. 2. What & Who <br />This presentation demonstrates strength of the Mozilla platform and how some of the features could be misused by malicious users. <br />This presentation is intended to dispel a common myth<br />Just using FIREFOX keeps you SECURE <br />
    3. 3. Agenda<br />Basic premise<br />Understanding the Mozilla Platform<br />Attacking Firefox <br /> Malicious Extensions<br /> XCS<br />Some basic points to watch….<br />That’s All Folks …<br />
    4. 4. Introduction<br /><ul><li>Browser of the choice for millions
    5. 5. Multi Platform
    6. 6. Modular and Scalable !
    7. 7. Pluggable Extension Code !
    8. 8. Browser of my Choice </li></li></ul><li>Mozilla Platform<br />
    9. 9. Mozilla Platform <br />Chrome: <br />It could be used to indicate a “Special Trusted Zone” within the Mozilla Platform <br />
    10. 10. Mozilla Platform <br />XUL (pronounced "zool") : <br />Mozilla's XML-based language that lets you build feature-rich cross platform applications that can run connected or disconnected from the Internet. <br /><?xml version="1.0"?><br /><?xml-stylesheethref="chrome://global/skin/" type="text/css"?><br /><window id="vbox example" title="Example 3...."<br />xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"><br /> <vbox><br /> <button id="yes" label="Yes"/><br /> <button id="no" label="No"/><br /> <button id="maybe" label="Maybe"/><br /> </vbox><br /></window><br />
    11. 11. Mozilla Platform <br />XBL:<br />XML-based markup language used to declare the behavior and look of XUL-widgets and XML elements.<br />scrollbar { -moz-binding: url('somefile.xml#binding1'); }<br />-- “binding1” is the id of the binding<br />
    12. 12. Mozilla Platform <br />XPCOM:<br />Cross platform component model from Mozilla.<br />Nerve center of the Mozilla platform.<br />XPCOM has some Similarity to CORBA and Microsoft COM. <br />
    13. 13. Important Components of Mozilla Platform<br />
    14. 14. Mozilla Platform<br />
    15. 15. Extension Installation – Mozilla Site<br /><ul><li>Reviewed before being added to the Mozilla site.
    16. 16. Review process is manual lapses have been found
    17. 17. Over 2 billion add-ons as of today and growing
    18. 18. Add-ons can be distributed through Mozilla without review as well</li></ul>https://addons.mozilla.org/en-US/firefox/addon/2230/<br />
    19. 19. Extension Installation – How else?<br /><ul><li>There is no restriction on any site hosting Mozilla extensions (XPI files)
    20. 20. When installing from any site Mozilla pops a warning but the same message appears on the official site (confusing!).
    21. 21. Extensions can be installed without warning by other software, USB autorun, login scripts etc. </li></li></ul><li>Extension Installation – Alternate Method<br /><ul><li>Place a file in the extensions folder in the Mozilla profile directory.
    22. 22. The filename should be the id of the extension to be loaded
    23. 23. The content of the file should be the location of the extension code</li></ul>Beware: When this file exists in the folder the extensions is installed automatically it does not require any human interaction.<br />
    24. 24. Extension Security!<br />Mozilla extension security model is completely flat<br />Extension code is treated as fully privilegedby Firefox<br />Vulnerabilities in extension code can result in full system compromise<br />No security boundaries between extensions An extension can silently modify/alter other extensions<br />
    25. 25. The Potential<br />Statistics – Firefox Browser Market Share<br />Beyond 20% globally since November 2008, more than 50% in certain regions/countries<br />Source: Marketshare - marketshare.hitslink.com<br />Over 2 billion add-ons and growing<br />
    26. 26. Extensions are Everywhere<br />
    27. 27. Concerns on AMO<br />Everyone can write extension and submit to AMO (even us  )<br />AMO review process lacks complete security assessment<br />Few extensions signed in AMO. Extensions are generally not “signed”. Users trust unsigned extensions.<br />Experimental extension (not approved yet) are publicly available <br />
    28. 28. This sums it up<br />
    29. 29. Extension and Malware<br />Some people have already exploited this concept<br />FormSpy - 2006<br />Downloader-AXM Trojan, poses as the legitimate NumberedLinks 0.9 extension<br />Steal passwords, credit card numbers, and e-banking login details<br />Firestarterfox - 2008<br />Hijacks all search requests through multiple search engines and redirects them through Russian site thebestwebsearch.net<br />Vietnamese Language Pack - 2008<br />Shipped with adware<br />Vietnamese Language Pack - 2008<br />Shipped with adware<br />Might happen in the near future…<br />Malware authors bribe/hack famous/recommended extension developer/vendor<br />Initial benign extension, malware is introduced in a 3rd/4th update<br />
    30. 30. Attacking Firefox !<br />Now that we have seen the basic architecture & problem, let’s have some fun  <br />
    31. 31. Anatomy of an Extension<br />These are the components of every extension. They are archived together into the XPI file format.<br />Sample Files inside a XPI file<br />exampleExt.xpi:<br /> /install.rdf <br /> /chrome.manifest<br />/chrome/<br /> /chrome/content/<br /> /browser.xul<br /> /browser.js<br />
    32. 32. Malicious Extensions<br />We will build a malicious extension which will <br />Log all Key Strokes and send them remotely<br />Execute native code<br />Extract stored passwords <br />Add a malicious site to the NoScriptwhitelist<br />DEMO<br />
    33. 33. Interesting Finds<br />In the course of making this presentation I found some interesting things<br />
    34. 34. XCS (Cross Context Switching)<br /><ul><li>Cross Context Switching is the art of injecting malicious content into the trusted Chrome Zone.
    35. 35. XCS injections occur from untrusted to the trusted zone.
    36. 36. PDP was the first person to exploit XCS. </li></li></ul><li>Attacking Event & DOM Handlers <br /><ul><li>Event Handlers implement element properties attributes and behavior.
    37. 37. DOM nodes when dragged and dropped move the properties attributes and behavior
    38. 38. An extension that trusts DOM content can be subverted by providing malicious content
    39. 39. CreateEvent() DOM function can be used to send malicious content to the extension</li></ul>DEMO<br />
    40. 40. Bypassing Wrappers<br /><ul><li>Multiple wrappers exist in Firefox and are used to protect privileged interfaces, functions and objects.
    41. 41. wrappedJSObject can be used to strip the wrapper protection.</li></ul>DEMO<br />
    42. 42. What Can We Look For?<br />Suspicious single file(s) in the extension folder.<br />XPI are archives - can be un-Zipped and checked for any packaged executables<br />Check the install.rdf for common pitfalls mainly <em:hidden><br />Verify chrome.manifest does not point to other extension folders as it can overwrite functionality.<br />
    43. 43. What Should a Developer Do?<br />That’s a whole presentation by itself <br />Don’t bypass wrappers <br />Don’t trust content From the un-trusted context.<br />Don’t use eval()<br />Follow this link : <br />https://developer.mozilla.org/en/Security_best_practices_in_extensions<br />
    44. 44. Tools<br />Firebug <br />XULWebDeveloper<br />XPComViewer<br />Venkman<br />Console2<br />Burp<br />
    45. 45. Last Words <br />We discussed some ways to subvert the Mozilla Platform <br />This list is not by any means exhaustive<br />There are some strategies like sandboxes which can be bypassed<br />New features like themes open new avenues ! <br />Last, Mozilla is a secure platform but can be made to do lots of tricks… So some care should be taken. <br />
    46. 46. Questions<br />
    47. 47. Thank You <br />prasanna@deadpixel.org<br />
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×