Your SlideShare is downloading. ×
  • Like
Firefox security (prasanna)
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Firefox security (prasanna)



  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads


Total Views
On SlideShare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    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


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