user.js icon indicating copy to clipboard operation
user.js copied to clipboard

Etags: solutions besides clearing/disabling cache [which does clear/block etags, sorry about the confusion]

Open Thorin-II opened this issue 9 years ago • 69 comments

snip

Thorin-II avatar Jul 24 '17 18:07 Thorin-II

Cookieless Cookie Fake Test: The test page mentioned by Pants uses the IP address for session tracking and the user agent but not ETags.

This test should use ETags, instead.

Atavic avatar Jul 24 '17 19:07 Atavic

http://lucb1e.com/rp/cookielesscookies/

Results: browser.cache.memory.enable TRUE & same IP - I was tracked. browser.cache.memory.enable FALSE & same IP - I was not tracked. browser.cache.memory.enable TRUE & different IP - I was not tracked.

This "test" could be fake! We need a more reliable ETag test.

Just-me-ghacks avatar Jul 24 '17 19:07 Just-me-ghacks

Noscript. NoScript's ABE (Application Boundaries Enforcer) allows stripping etags.

Secret Agent generates spoof ETags headers with random values, preventing ETags being misused for tracking.

Run a local proxy as Privoxy that can block ETag headers.

Atavic avatar Jul 24 '17 21:07 Atavic

Tor Browser 7.0.2 (vanilla) TB with stored text > tracked by number of visits but not by stored text TB with stored text + new identity > not tracked

2glops avatar Jul 24 '17 21:07 2glops

Installed Modify Header Value (HTTP Headers) on FF ESR 52.0 In HTTP Headers options I created a new entry with:

URL * Header Name If-None-Match Header Value * Then I picked Add.

The test passed.

I get 2 Visits repeatedly if I pick Remove instead of Add.

Atavic avatar Jul 24 '17 22:07 Atavic

@Atavic This way every other Website breaks its layout/design.

Forsaked avatar Jul 25 '17 07:07 Forsaked

You can whitelist sites, deactivate your filtering choice or launch a second browser with this WebExtension on AMO, part of these projects by Andy Portmen.

The HTTP Entity Tag is used to reduce the server bandwidth when a resource was previously stored in the cache. Abusing the ETag values allows browser's tracking: the ETag value is unique as an MD5 or SHA1 hash. You can either strip the hash value from every If-None-Match header value with Privoxy or spoof it with Secret Agent Add-on: its spoofing feature adds a random hash to outgoing requests, while its whitelist feature allows you to specify trusted hosts. For Privoxy issues there's an active forum.

Atavic avatar Jul 25 '17 18:07 Atavic

LOL!

Hmmm .. where did zymase's comment go? .. Yup, this is testing ETags zymase, there is no JS, no cookies, no dom etc etc

That's why I had removed my comment. Thanks for not including in your brief recall of my shame the fact I love chocolate and mini-skirts!

Yeah, I had commented too quickly, suggesting the LocalStorage to be an explanation of the cache issue detailed by this thread. I then took the time to read extensively, and at this time I've installed The Secret Agent add-on (from developer's page mentioned above by Atavic, when unavailable on AMO).

Hey! I'm a secret agent man as sung by Austin Powers; yeah! -- Seriously, the add-on is most interesting, testing it right now as I said. One thing is sure, the cache issue revealed, exposed, applied with the ETag Test PoC is obsolete with Secret Agent.

ghost avatar Jul 31 '17 12:07 ghost

After some time testing the Secret Agent add-on I'm finally keeping it but will be using only its eTags & Caching feature because it seems to handle the eTag intrusion correctly by spoofing it.

Secret Agent has several other features but too many sites get problematic when these features are enabled. Of course the add-on has a whitelist which is flawless but I've had to whitelist domains, sites only because of the features I then removed. But whitelisting a site will then stop filtering its eTags as well.

In other words, only eTag spoofing and no sites (up to now) need to be whitelisted

Secret Agent then but only for eTag spoofing, which it does well, and which resolves the very concern of this thread, as I see it.

One last thing: Secret Agent is displayed with a toolbar button on its dedicated toolbar, positioned right under the urlbar and reserving the screen width for only its toolbar button followed by description of the add-on's status (what it's doing, is it on or off). Removing the toolbar button is possible, can then be positioned anywhere and the toolbar itself can be hidden with right-click on the tabs toolbar then uncheck Secret Agent toolbar. Of course Secret Agent toolbar button alone will not be followed by description of status as when it is on its toolbar, but hovering it provides the information and right-clicking it opens a drop-down menu for whitelisting the site, disabling/enabling Stealth Mode and access to Options.

Done this way, seems interesting to me.

ghost avatar Jul 31 '17 17:07 ghost

I don't like the idea of needing another addon (and why isn't it in AMO anyway? Not that I would use it if it were).

As I and the author understand it, cache in general is the problem: "[...] cache tracking issues [...]" and "[...] I currently have no straightforward answer since cache tracking is virtually undetectable, [...]" . I don't understand, why is cache not cleared if Firefox is closed? This tracking seems to be disabled if browser.cache.memory.enable is set to false (https://github.com/ghacksuserjs/ghacks-user.js/issues/179#issuecomment-317534877). I would prefer deleting the cache if Firefox is closed. This seems not to work? (https://github.com/ghacksuserjs/ghacks-user.js/issues/179#issuecomment-317547307) What's the status on that?

ghost avatar Aug 10 '17 09:08 ghost

@Thorin-Oakenpants Thanks for your work then. This is indeed intriguing. I think this must be local indeed, because if I use a second profile, the tracking-cookie isn't there. I wouldn't bother with ETags, because the cache is the generic issue here and who knows that other techniques are used using cache. The real issue is, as you pointed out in your initial post, is that the cache is not being cleared -- if it's set to be cleared -- when FF is closed. I'd personally would want the cache to be cleaned when FF is closed (expected behavior), or I would disable cache altogether (not the preferred solution).

ghost avatar Aug 10 '17 10:08 ghost

Another fingerprinting test, and this one is the toughest I know : Cross-browser fingerprinting test 2.0

ghost avatar Aug 10 '17 14:08 ghost

Of course it's always possible to add a uBlockO filter to block Cross-browser fingerprinting test 2.0, such as /evercookie.js$important but that solves a test, an effect and not the cause. Moreover I doubt a site using evercookies would name their script evercookie.js.

ghost avatar Aug 11 '17 17:08 ghost

@zymase You're right and I just deleted my comment after a short time while you were answering. Gulty ! That will not happen again.

2glops avatar Aug 11 '17 17:08 2glops

@2glops it happens to everyone! If deleting a comment is authorized it's for a good reason.

So, we can use medicine to block evercookie.js (namely) but we cannot cure the fingerprinting disease :)

ghost avatar Aug 11 '17 17:08 ghost

About ETags and performace... To get rid of ETags, I have set: user_pref("browser.cache.memory.enable", false); user_pref("browser.cache.memory.capacity", 0);

No ETags, but I don't see any performance issues too.

crssi avatar Dec 04 '17 12:12 crssi

^^Is any of those master switch and I don't need the other one?

crssi avatar Dec 04 '17 12:12 crssi

As I say, I don't see any performance issues. Why don't you try it?

crssi avatar Dec 04 '17 13:12 crssi

That is OK and understandable. But I have asked why don't YOU try it. I haven't implied anything further, at least not to include it into public version.

crssi avatar Dec 04 '17 14:12 crssi

you can try this one: https://addons.mozilla.org/en-US/firefox/addon/header-editor/ I have my own WE to do these kinds of things but I'm not gonna release it anytime soon. (or maybe ever) You can't remove If-None-Match though because it's one of the headers that gets added after WEs had their hands on them. But removing the ETag Response Header should work.

earthlng avatar Dec 08 '17 14:12 earthlng