user.js: sticky: Prefs vs Recommended Extensions: Co-Existance+Enhancement | Conflicts

A list of stuff - thanks @smithfred for the ideas

Extensions can often work better than a global pref because of their flexibility (but may still have downsides or issues), or they can enhance/compliment them, or they can clash. Either way, there is always more than one way to skin a cat no cats were harmed in the making of this issue.

Here are some solutions that may fit your needs. If you have any other suggestions to this list-in-progress, please let us know šŸ˜ƒ


šŸ”¶ Mixed Passive Content

  • pref: security.mixed_content.block_display_content=true (1241)
  • alternative:
    • set the pref to false
    • add https-strict: * true to uMatrix
    • allow exceptions on a site by site basis

šŸ”¶ Web Workers

  • pref(s): dom.workers.enabled=false (2301) and/or dom.serviceworkers.enabled=false (2302)
    • Note: dom.workers.enabled was removed in FF60
  • alternative:
    • set the pref(s) to true
    • add no-workers: * true to uMatrix
    • allow on a site by site basis
  • note:
    • FYI: uMatrix (and FF) canā€™t use workers if cookies are set to ā€œKeep until I close firefoxā€ 1429714
    • if FF prefs allow web workers, but uMatrix blocks them, there may be instances where the web site detects workers are available but canā€™t actually use them, leading to breakage, rather than falling back to the non-web-worker version [read this somewhere on uM repo but canā€™t find it now]

šŸ”¶ Cookies [1]

  • pref: network.cookie.cookieBehavior=2 (block all) (2701)
    • use FF site exceptions (allow eg for logins, allow for session eg for sites that require them to work)
  • alternative:
    • set pref to allow cookies (recommended value of 1 for same host only)
    • add * * cookie block to uMatrix
    • allow on a granular level
  • notes: uMatrix wiki on cookies
    • ā€œBlacklisted cookies are not prevented by uMatrix from entering your browser. However they are prevented from leaving your browserā€
    • This is about standard HTTP Cookie header. Cookies can still be read, and sent to remote servers by javascript in other data structures (POST request for example)
  • issues:
    • cookies control other persistent storage (local storage, IndexedDB), both when allowing creation and for FF and extensions when cleaning. While uMatrix has a setting to automatically delete blocked cookies, currently FF/Extensions have issues/limitations with sanitizing/FPI. Just removing a cookie can leave behind orphaned persistent data 99% sure AFAIK

šŸ”¶ Cookies [2]

  • pref: network.cookie.cookieBehavior=2 (block all) (2701)
    • use FF site exceptions (allow eg for logins, allow for session eg for sites that require them to work)
  • alternatives
    • set pref to allow cookies (recommended value of 1 for same host only)
      • I think Cookie Autodelete requires cookies to be enabled or it wonā€™t work
    • cookie extensions
  • notes
    • these block/allow cookies coming in. They allow lots of flexibility (white-black-greylists, auto-clearing on tab close etc), and will one day be able to properly handle related persistence storage and FPI (see issues for Cookies [1])

šŸ”¶ Canvas

  • pref(s): privacy.resistFingerprinting=true (4501) (RFP)
    • so much is bundled under this pref that it is not feasible to set it to false
    • for the gazillion things RFP does see #7
  • alternatives:
    • CanvasBlocker (or similar)
  • notes:
    • RFP canvas protection currently prompts for every site (but can remember site permissions). In FF59+ canvas has been added to the PageInfo>Permissions panel. RFPCanvas might have a pref for its default permission (but looks unlikely). Hopefully it will also be added to the options Site Preferences section for site management. Update: preferred fix is to restrict/lower the prompts
  • strategy:
    • set CanvasBlocker to fake. Do NOT set to block as this will disable the API and you will not get the same result as RFP.
    • block sites when prompted: RFP takes over and CB is never used
    • allow sites IF you must: RFP allows CB to take over which will fake
    • use a CB whitelist for sites that MUST have the real thing

šŸ”¶ Referers

  • pref(s): section 1600
    • these are global settings, and at defaults and in our user.js, they only limit some data in some cases (otherwise way too much of the internet breaks)
    • if you want ANY real control over referers, you NEED an extension
  • terms:
    • source: the site you loaded, 1st party
    • destination: a site linked to, or the site being requested for 3rd party content
    • example:
      • load SiteA (SOURCE, 1st party)
      • SiteA requests content from 3rd party SiteB, SiteC, SiteD (B,C,D are DESTINATION)
      • SiteA might include a referer (basically saying ā€œHi Iā€™m requesting this for SiteAā€) to any or all of those destination sites
  • EXTRA Solution 1: uMatrix
    • spoof by default: referrer-spoof: * true
      • Dashboard>Settings>Privacy>ā€œSpoof HTTP referrer string of third-party requestsā€
      • uMatrix spoofs any referers as the destination (see this uMatrix wiki entry)
    • allow exceptions on a per scope basis (this is under the three vertical dots dropdown in your uMatrix panel)
    • uMatrix can only control the SOURCE, not per DESTINATION (so in the example above, Sites B C + D would all get referers)
  • EXTRA Solution 2: Smart Referer (instead of uMatrixā€™s setting)
    • whitelist, blacklist, built-in whitelist to reduce breakage, etc
    • allows source-destination control: so in the example above, you could allow SiteB but still block Sites C + D
    • allows blocking, spoofing as destination, faking, allowing, etc
    • the ultimate referer tool

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 32 (5 by maintainers)

Most upvoted comments

@Thorin-Oakenpants: I see you already updated the code URL. Now that @meh has given me full access rights on AMO, Iā€™ve also create the privacy policy you requested a year ago: https://addons.mozilla.org/de/firefox/addon/smart-referer/privacy/ Sorry for the long delay, but I simply wasnā€™t able to do this before today. šŸ™‚

Edit: Thorin: done. And thanks. PS: I stripped out the /de part

I do understand and there is more than one school of thought on fingerprinting than just ā€œblend in,ā€ although in this case, I blend in MORE using a faked fingerprint canvas hash than using the one generated by RFP according to panopticlick.

The fact that all my other fingerprint attributes are inline with basically all *fox browsers based on ESR with a randomized fingerprint (as opposed to a 1 in 1200-1800) makes me less trackable using temp containers, as every container, every domain in every container gets itā€™s own random fingerprint hash.

Detection of RFP and canvas fakery doesnā€™t matter, either, since the standard now is to lie to the webserver. How you lie is where people debate - do you want to blend in, or do you randomize your UA, canvas, and every other aspect, or mix and match. There are valid points on all sides but thereā€™s not really been any useful data provided by any of the testing sites, as to WHAT makes you stand out the most, specifically.

Also: just so people are aware - use Waterfox, because it doesnā€™t prioritize politics and monetization like Mozilla does these days with Firefox. Philosophy matters with software, not just the code itself. Free software is about freedom, that includes customization of the code, and of which fork or mainline to use. Stop trying to imply that we must trust the Mozilla as some kind of authority - they have a pretty bad track record over the last 10 years.

Even Archlinux includes a Google tracking id in their Firefox builds for oneā€¦and the lack of pocket and other complete and other bullsh*t inclusions that Mozilla has pushed on users makes Waterfox much more attractiveā€¦and that doesnā€™t even get into their persecution and termination of people based on their personal beliefsā€¦yeah, no to Firefox.

I also remember Mozilla installing an addon silently to market some TV showā€¦showing that not only can they do that without user interaction, but will do so proves that they are no longer trustworthy without heavy auditingā€¦and then thereā€™s the ad laden new tab pageā€¦shall I go on?

You donā€™t seem to understand fingerprinting very well. RFP & canvas currently lowers the entropy in that metric, in fact, it eliminates it by making everyone the same. As soon as you diverge from other RFP users, you stand out. Obviously it depends on the script, but Iā€™m talking theoretically - which is how you need to approach it. Any hole is a hole that can be exploited.

Itā€™s not hard to detect RFP: you can just check timing rounding (which could be changed by a pref value - it sucks though because the check takes time: you could probably get away with 30ms). And there are other cumulative checks that could give it away (but not totally infallible). But since FF78 thereā€™s an even quicker method (less than 1ms, 100% correct, all the time).

And RFP does allow a site exception for canvas: itā€™s not like you donā€™t have some control.

Of the at least 8 methods to confound FPing, one is to lower entropy, one is to raise. Both have pros and cons. AFAIK, RFP canvas is going to become randomized - but until it does, donā€™t undermine it - thatā€™s just stupid


Also: just so people are aware - donā€™t use Waterfox: there is nothing it does that Firefox canā€™t (there might be the one odd thing here or there: Iā€™m not wasting my time checking). This does not include legacy extension support: which I consider the lack of in Firefox as a good thing, and the inclusion of in Waterfox as a security hole.

I feel many many more users would switch to Waterfox, especially this user.js crowd

Not if I can help it. There is no reason to use a fork.

not surprising at all given the number of commits on uBO vs. uM

iā€™m very disappointed by this - thereā€™s lots i could say about this but iā€™ll refrain, suffice to say that i think some of his decisions are idiotic, starting with splitting uBO off from uM

Just visited uMatrix repos, @gorhill has Archived it all, says he wonā€™t spend any more time on uMatrix. uBO is nice and all for cosmetic filtering but it does not come anywhere close to the control you have in uMatrix. Disappointing - no discussion, no warning, just a guy opening an issue and getting told ā€œforget it Iā€™m doneā€ and poof, everything archived šŸ˜¦

CanvasBlocker 0.4.6-Alpha1 does now also Audioā€¦ see here; https://github.com/kkapsner/CanvasBlocker/issues/71#issuecomment-397759582

I am sure that @kkapsner would appreciate some testing from you guys too.

Cheers