Firefox Resource URLs Reader

The resource:// URI scheme is a mechanism used by Firefox to access on-disk resources from internal modules and extensions.

While these resources are not intended for use outside of the browser, some can be accessed by any web page via the script tag, which can lead to unintentional data exposure. This includes information that could be used for fingerprinting, such as the user's platform, locale, and installed extensions.

This is an obsolete tool, affecting the old Firefox of the pre-Quantum era (versions <57).
JavaScript Disabled

System Summary

Platform Detection× False
Default Locale× False
Update Locale× False
Tor Browser× False

Firefox Build

Firefox Official Build× False
Firefox Release Build× False
Firefox ESR Channel× False
Firefox Beta Channel× False
Firefox Developer Edition× False
Firefox Nightly Build× False
Firefox GTK Build× False
PDF.js× False

Default Preferences

FilenameItemsHash
× firefox.js
× firefox-branding.js
× firefox-l10n.js
× webide-prefs.js
× greprefs.js
× services-sync.js
× 000-tor-browser.js
Total

Firefox Resources Reader Details

Default Preferences table is a list of built-in Firefox files that contain Firefox defaults. They are identical for all those who install the same Firefox Setup.exe, but they may be different between Firefox versions, platforms, repositories. The table also shows the number of items in each file, and MD5 hash of all items ("key+val+key+val…") that helps to identify the similarity or difference with another Firefox instance.

Locale Detection is done by two ways. First way is trying resource:///chrome/*/locale/ directories for all possible Firefox locales. If the resource:///chrome/zh-TW/ exists, that means this Firefox is Chinese. Second way (not available if the Firefox installed from a Linux repository) is reading resource://gre/update.locale file, that contains a locale that is used on Firefox Update, so it shows real Firefox interface language.

Platform Detection and Firefox Build type is done by comparing differences in resource:///defaults/preferences/firefox.js. Some keys and values in this file exist only on Windows, some on Linux, some on Mac. Thus it enables to determine the OS:

  1. var include = function(load, err) {
  2. var el = document.createElement("script");
  3. el.type = "text/javascript";
  4. el.onload = load;
  5. el.onerror = err;
  6. document.head.appendChild(el);
  7. el.src = "resource:///defaults/preferences/firefox.js";
  8. }
  9. var pref,
  10. sticky_pref,
  11. os;
  12. pref = sticky_pref = function(key, val) {
  13. if (!os)
  14. if (key == "browser.gesture.pinch.out" && val == "cmd_fullZoomEnlarge")
  15. os = "Windows";
  16. else if (key == "browser.backspace_action" && val == "2")
  17. os = "Linux";
  18. else if (key == "browser.gesture.pinch.threshold" && val == "150")
  19. os = "Mac";
  20. }
  21. include(function() {
  22. console.log( "OS: " + (os ? os : "unknown") );
  23. },function() {
  24. console.log( "OS: n/a (not a Firefox)" );
  25. });

Further Reading

Leave a Comment (13)