privacytools / privacytools.io

🛡🛠 You are being watched. Protect your privacy against global mass surveillance.
https://www.privacyguides.org
Creative Commons Zero v1.0 Universal
3.12k stars 384 forks source link

CanvasBlocker #99

Closed ghost closed 5 years ago

ghost commented 7 years ago

CanvasBlocker is a Firefox addon to prevent canvas fingerprinting.

Does anyone have experience with this addon?

ghost commented 7 years ago

CanvasBlocker generates a new random value whenever a particular function is called which is uncommon, but not unique.

Canvas Defender, on the other hand, lets you change the fingerprint whenever you want.

You probably wouldn't notice canvas fingerprinting, so CanvasBlocker might be a better option.

BUT

"Blending in" - not using a canvas blocker is also a solution (depends on the situation, I'd use CanvasBlocker as a protection against mass surveillance and Canvas Defender if someone would be tracking specifically me). I think it's best to let people decide, as in show them both.

ghost commented 7 years ago

TODO: Write something about CanvasBlocker vs Canvas Defender while recommending CanvasBlocker.

Atavic commented 7 years ago

Some info collected by CHEF-KOCH.

C-O-M-P-A-R-T-M-E-N-T-A-L-I-Z-A-T-I-O-N commented 7 years ago

@Shifterovich Do those two addons let one allow websites to extract canvas data (which is necessary in some cases)? If not then that's a huge usability issue, and waiting for this to be merged (it's at the review phase now).https://bugzilla.mozilla.org/show_bug.cgi?id=967895 may be a better idea.

I also have a few remarks concerning the implementation of those addons:

Instead of completely blocking canvas fingerprinting, Canvas Defender add-on creates a unique and persistent noise that hides your real canvas fingerprint. This add-on protects you while browsing both in normal and private mode.

This might not be the right approach, for example consider this scenario: I ran a website and I want to track my users using, among other things, canvas fingerprinting. If I go through my logs I can see that there are about 20 people who visit my site using the Tor Browser since the hash of the canvas fingerprint is that of a a blank image. I also have a list of common hashes of canvas fingerprints. Suddenly, I notice something strange, someone visits my site with a hash that didn't match any of the common values. Maybe my list wasn't exhaustive so I can just ignore that. The next day someone visits with a different hash that doesn't match any of my values. The process repeats, but eventually I can easily conclude with a high probability (and since there are a few of users of my site, and an even rarer percentage who may be randomizing their canvas fingeprint) that those different random hashes belong to the same person. Effectively, randomization has turned him into a more distinguishable target, but this could've been a lot harder if I didn't have a list of common canvas fingerprints (which is not the case here as I had logged hashes of canvas fingerprints of my previous users).

Furthermore, concerning randomizing values the Tor Browser Design document has some nice things to say against it,

Strategies for Defense: Randomization versus Uniformity

When applying a form of defense to a specific fingerprinting vector or source, there are two general strategies available: either the implementation for all users of a single browser version can be made to behave as uniformly as possible, or the user agent can attempt to randomize its behavior so that each interaction between a user and a site provides a different fingerprint.

Although some research suggests that randomization can be effective, so far striving for uniformity has generally proved to be a better strategy for Tor Browser for the following reasons:

  1. Evaluation and measurement difficulties

The fact that randomization causes behaviors to differ slightly with every site visit makes it appealing at first glance, but this same property makes it very difficult to objectively measure its effectiveness. By contrast, an implementation that strives for uniformity is very simple to evaluate. Despite their current flaws, a properly designed version of Panopticlick or Am I Unique could report the entropy and uniqueness rates for all users of a single user agent version, without the need for complicated statistics about the variance of the measured behaviors.

Randomization (especially incomplete randomization) may also provide a false sense of security. When a fingerprinting attempt makes naive use of randomized information, a fingerprint will appear unstable, but may not actually be sufficiently randomized to impede a dedicated adversary. Sophisticated fingerprinting mechanisms may either ignore randomized information, or incorporate knowledge of the distribution and range of randomized values into the creation of a more stable fingerprint (by either removing the randomness, modeling it, or averaging it out).

  1. Randomization is not a shortcut

While many end-user configuration details that the browser currently exposes may be safely replaced by false information, randomization of these details must be just as exhaustive as an approach that seeks to make these behaviors uniform. When confronting either strategy, the adversary can still make use of any details which have not been altered to be either sufficiently uniform or sufficiently random.

Furthermore, the randomization approach seems to break down when it is applied to deeper issues where underlying system functionality is directly exposed. In particular, it is not clear how to randomize the capabilities of hardware attached to a computer in such a way that it either convincingly behaves like other hardware, or such that the exact properties of the hardware that vary from user to user are sufficiently randomized. Similarly, truly concealing operating system version differences through randomization may require multiple reimplementations of the underlying operating system functionality to ensure that every operating system version is covered by the range of possible behaviors.

  1. Usability issues

When randomization is introduced to features that affect site behavior, it can be very distracting for this behavior to change between visits of a given site. For the simplest cases, this will lead to minor visual nuisances. However, when this information affects reported functionality or hardware characteristics, sometimes a site will function one way on one visit, and another way on a subsequent visit.

  1. Performance costs

Randomizing involves performance costs. This is especially true if the fingerprinting surface is large (like in a modern browser) and one needs more elaborate randomizing strategies (including randomized virtualization) to ensure that the randomization fully conceals the true behavior. Many calls to a cryptographically secure random number generator during the course of a page load will both serve to exhaust available entropy pools, as well as lead to increased computation while loading a page.

  1. Increased vulnerability surface

Improper randomization might introduce a new fingerprinting vector, as the process of generating the values for the fingerprintable attributes could be itself susceptible to side-channel attacks, analysis, or exploitation.

ghost commented 7 years ago

Canvas Defender only changes your fingerprint when you tell it to, CanvasBlocker changes it on every canvas use iirc.

Canvas Defender add-on creates a unique and persistent noise

someone visits my site with a hash that didn't match any of the common values [...] The next day someone visits with a different hash

I don't see your point, since the next time they visit your site they're going to have the same hash.

C-O-M-P-A-R-T-M-E-N-T-A-L-I-Z-A-T-I-O-N commented 7 years ago

I don't see your point, since the next time they visit your site they're going to have the same hash.

In my paragraph I assumed that they changed their hash each time, but my argument holds as well if their hash is uniquely generated, in which case I can easily see that it doesn't match any of the known values.

ghost commented 7 years ago

The point of canvas fingerprinting is that it's a unique fingerprint thus not a known value afaik.

C-O-M-P-A-R-T-M-E-N-T-A-L-I-Z-A-T-I-O-N commented 7 years ago

@Shifterovich But since it persists and doesn't match any of the known values then it makes it an even easier vector for tracking.

Atavic commented 7 years ago

@Shifterovich

Does anyone have experience with this addon (CanvasBlocker)?

I'm using its block mode, see comment

Vincevrp commented 5 years ago

Firefox has this functionality built in for a while now. Is this still relevant?

Atavic commented 5 years ago

If you set RFP to true, you're defeating canvas tracking, while with Canvas Blocker you get more options.

privacytoolsIO commented 5 years ago

Added CanvasBlocker here: https://www.privacytools.io/browsers/#fingerprint