Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add new heuristic for fingerprinting detection. #1505

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

cowlicks
Copy link
Contributor

We have list of methods commonly used by browser fingerprinting tools. We wrap each of these in a counter to track their usage. When an origin uses more than some threshold percentage (currently %75) of the methods, we say it is fingerprinting.

I set the %75 value empirically from testing. The highest percentage I saw on a non-fingerprinting site was 45% (github), the lowest I saw on a fingerprinting site was 80% (this site has since gone down).

There are currently some architectural issue with privacy badger which should be fixed before merging this. Mainly: This kind of tracking should not be associated with an origin, instead it should be associated with a URL (or some notion of it). It makes sense for cookies to be associated with an origin, because that is how cookies are scoped. But this tracking is normally loaded from a standalone library that could be anywhere, like a third party CDN service or the first party.

If we block origins associated with fingerprinting, we'll end up blocking CDN's, which breaks other sites, which means we'll manually have to add the sites to the cookieblock list, which will just allow the fingerprinting to continue. I'll expand more on this in a separate issue.

@vecna
Copy link

vecna commented Aug 22, 2017

image

Hi @cowlicks, I merged this branch in my fork, I'll just report in this PR the issues I encounter. The one above happen with this branch merged in master, navigating on http://www.gettvstreamnow.com/

@cowlicks
Copy link
Contributor Author

Hi @vecna ! Awesome, I'm glad someone is testing it out! Note that it currently does not account for domains that were found fingerprinting. The code here would need to be expanded to register the fingerprinting resource.

@cowlicks
Copy link
Contributor Author

What browser are you using, and what version? What happens if you run this in a the page:

Object.defineProperty(window, 'sessionStorage', {get: function() {console.log('stuff')}});
window.sessionStorage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement fingerprinting Relating to (canvas) fingerprinting detection heuristic Badger's core learning-what-to-block functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants