Skip to content

reduce fingerprint produced by uBlock Origin #1121

@jtracey

Description

@jtracey

Prerequisites

  • I verified that this is not a filter issue
  • This is not a support issue or a question
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue
    • Your issue may already be reported.
  • I tried to reproduce the issue when...
    • uBlock Origin is the only extension
    • uBlock Origin with default lists/settings
    • using a new, unmodified browser profile
  • I am running the latest version of uBlock Origin
  • I checked the documentation to understand that the issue I report is not a normal behavior

Description

tl;dr: uBlock Origin should take steps to reduce the fingerprint (i.e., identifying features) it produces: warn anti-fingerprinting users it generates a fingerprint, stop anti-fingerprinting users from changing their subscribed lists, use ~weekly snapshots for updates for anti-fingerprinting users, and implement a watershed update for anti-fingerprinting users.

Despite advice to the contrary, many Tor Browser users install ad blockers. I'm assuming uBlock Origin is the most popular among those who do. People do this despite knowing that Tor Browser should not have extra extensions installed, since any change in browser behavior detectable by a website will partition the anonymity set (i.e., it shrinks the list of possible people who could be the one using connections x, y, and z). Having spoken to probably half a dozen people who use Tor Browser with an ad blocker, they all have the same justification: "Ad blocking is important enough to me that I'm okay with being part of the smaller anonymity set that uses an ad blocker with Tor Browser".

What these users haven't realized, in every case I've seen so far, is that they're not partitioning themselves into "users who block ads vs. those who don't", or even "users who use uBlock Origin". A website can fingerprint a user by looking at what specific elements are being blocked (whether network blocking by just looking at resource requests, or cosmetic blocking using browser fingerprinting scripts). From that information, the site can learn not only which filter lists a user has enabled, but when each list was last updated. Since lists are frequently updated server-side multiple times daily, while clients pull from those lists at a ~random time (per list) every 5 days or so, that's a lot of entropy a site can use to fingerprint—far more than should be conveyed on Tor Browser.

For example, suppose an activist in an oppressive regime was using Tor Browser with uBlock Origin installed to access a local social media site with two different accounts: one with their real name, and one with a pseudonym. The social media site uses these fingerprinting techniques on it users, and tells the oppressive regime it noticed these two accounts always log in blocking the same elements as each other, and are therefore highly likely to be the same person.

Ideally, there are three things that should happen when a user uses uBlock Origin with Tor Browser (or more precisely, with the resistFingerprinting property of the privacy.websites API enabled). First, it should display a warning to the user that because of how anti-fingerprinting works, extensions like uBlock Origin can make them less private, since websites will be able to tell they're using it. The users I've spoken to already understood this part, but my selection is biased towards the more technically knowledgeable, and I'm guessing many users would find this counter-intuitive. Second, the extension should make it more difficult to change which filter lists are enabled from the default (plus maybe ad guard mobile on mobile devices). Third, the updates to those lists should use a watershed update mechanism, where those users start using a new list at the same time as each other.

The first two should be fairly straight forward, but watershed update mechanisms can get a bit tricky, since we probably don't want to just have all Tor users hammer the list servers at the exact same time. The following scheme is a simple mechanism I've come up with, but there are obviously other options, with different trade-offs.

Every Monday at midnight, a snapshot of all the default filter lists is taken server side. Users who have anti-fingerprinting enabled pull their updates from this snapshot, rather than the current live version, but do not start using said update. Then, on Saturday at midnight, all of those users switch to the more recent snapshot, which they have already downloaded.

Note that the days of the week/times here are mostly arbitrary, I just picked specific ones for clarity. All that matters is that there is enough time between when the snapshot is updated and the watershed update time that all users should have pulled that update. The above assumes a normal user who uses uBlock Origin multiple times a week. An edge case that has to be considered is a user who doesn't use uBlock Origin for a length of time that includes when they would normally update their lists, and when the watershed update happens. To accommodate that scenario, two snapshots have to be kept by the server (the one users are currently using, and the one they will update to next). When a user starts uBlock Origin in anti-fingerprinting mode, it needs to check if its lists are too old, and if so, pull both lists immediately.

This could be implemented in phases. The warning and disabling of filter list selection should be simple to implement, and would go a long way towards informing users and preventing a good chunk of potential entropy. Then, creating the weekly snapshots and changing anti-fingerprinting users to it would dramatically reduce entropy for most of those users, since at that point, most of them would be using one of two filter lists (last week's if they haven't updated yet, or this week's if they have). Finally, adding the watershed update would eliminate the last bits of extra entropy for all users, so that the only information an adversary gains from uBlock Origin is that it's installed.

A specific URL where the issue occurs

I made a demonstration fingerprinting page (warning: the page will likely make requests to advertisers you don't block yet—but just headers, not assets). It only fingerprints when (approximately) your EasyList subscription was last updated. It's a little bit buggy, since it's just a 24 line proof of concept, so it doesn't try to use sites that have CORB headers, sites that fail to download with curl, sites that don't have TLS, it doesn't try to account for other addons like Privacy Badger, etc., but all of these bugs are solvable if someone were actually trying to fingerprint users. As of this writing, there are about 45 updates it can use from the past week (again, a better implementation could use more), so ~5.5 bits of entropy. By fixing the bugs, identifying which lists are in use, and running a similar algorithm on those lists (giving a multiplicative growth, not additive), that number would get even larger.

Steps to Reproduce

Access the above page, including on a browser with the privacy.resistFingerprinting about:config option on.

Expected behavior:

uBlock Origin reveals nothing about the user other than the fact it's used (obviously it would be ideal if even that wasn't visible, but that's not feasible right now ;)).

Actual behavior:

uBlock Origin reveals information via the elements blocked, according to the filter lists subscribed to and when they were last updated.

Your environment

  • uBlock Origin version: 1.27.10
  • Browser Name and version: Tor Browser 9.5
  • Operating System and version: (irrelevant)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions