Giter VIP home page Giter VIP logo

chameleon's Introduction

Chameleon

Browser fingerprinting protection for everybody.

Chameleon is a Chrome privacy extension that ๐ŸŒŸ detects fingerprinting-like activity, and โœจ protects against fingerprinting, currently by making Chrome look like Tor Browser.

โš ๏ธ WARNING โš ๏ธ

Chameleon is pre-alpha, developer-only software.

Please note that while Chameleon detects the use of canvas fingerprinting, Chameleon does not yet protect against it. See the coverage table below for more on Chameleon's current status.

The next step for Chameleon is to block scripts from loading based on their use of fingerprinting techniques, of which canvas fingerprinting is one. This work is in progress now (enabled by tying code execution to originating scripts in 25d7a5).

Detection

Chameleon detects font enumeration and intercepts accesses of fingerprinting-associated JavaScript objects like Window.navigator.

The number over Chameleon's button counts the number of suspected fingerprinters on the current page.

Protection

Since Tor users are supposed to all look alike, Chameleon attempts to blend in by altering request headers and JavaScript properties to match Tor Browser's values.

To start with, Chameleon covers Panopticlick's fingerprinting set, with more complete coverage in the works.

Chrome without Chameleon:

"before" screenshot

Chrome with Chameleon:

"after" screenshot

Tor Browser:

Tor Browser screenshot

Installation

To manually load Chameleon in Chrome, check out (or download and unzip) this repository, go to chrome://extensions/ in Chrome, make sure the "Developer mode" checkbox is checked, click on "Load unpacked extension..." and select the chrome folder inside your Chameleon folder.

To update manually loaded Chameleon, update your checkout, visit chrome://extensions and click on the "Reload" link right under Chameleon's entry.

You could also generate an installable CRX package. See below for details. To install from a CRX package, drag and drop the package file onto the chrome://extensions page.

Development setup

  1. npm install to install dev dependencies.
  2. npm run lint to check JS code for common errors/formatting issues.
  3. npm run watch to monitor extension sources for changes and regenerate extension JS bundles as needed. Leave this process running in a terminal as you work on the extension. Note that you still have to reload Chameleon in Chrome from the chrome://extensions page whenever you update Chameleon's injected script or background page.
  4. npm run dist to generate an installable CRX package. This requires having the signing key in ~/.ssh/chameleon.pem. To get a key, visit chrome://extensions/ in Chrome and click on the "Pack extension..." button to generate a CRX manually.

CSS sprites were generated with ZeroSprites.

Coverage

Fingerprinting technique Detection Protection Notes
Request header values โœ— โœ” detection not possible in a browser extension?
window.navigator values โœ” โœ” partial protection (not all Firefox-specific Navigator properties added, Chrome-specific properties not yet removed)
window.navigator enumeration โœ” โœ— detection only: object enumeration order differs between browsers
window.screen values โœ” โœ”
Date/time queries โœ” โœ” partial protection (need to adjust the entire timezone, not just getTimezoneOffset)
Font enumeration โœ” โœ— unable to override fontFamily getters/setters on the CSSStyleDeclaration prototype in Chrome; needs more investigation
System color enumeration โœ— โœ— detection planned, protection seems to run into the same issue as font enumeration
CSS media queries โœ— โœ— needs investigation
Canvas image data extraction โœ” โœ— protection impeded by image rendering differences between Chrome and Firefox, but this is only a problem if we are trying to match Tor Browser.
WebGL ? โœ— detection needs more work, protection needs investigation
Request header ordering/checksum, window.navigator checksum, checksumming in general โœ— โœ— needs investigation
Flash/Java-driven queries โœ— โœ— plugins need to be switched to click-to-play by default
Third-party cookies โœ— โœ— need to disable by default
JS/rendering engine differences โœ— โœ— Tor Browser masquerading showstopper ...
Packet inspection/clock skew (?) โœ— โœ— not possible in a browser extension

Roadmap

  • Minimize false positives.

  • Block fingerprinter resource loading.

  • Replace Tor masquerading with randomization: #1

  • Create Chameleon for Firefox.

  • Fix getOriginatingScriptUrl for eval'd code:

    • The V8 stack trace API fails to deliver file URLs brought in via eval'd code. For example, see all the misattributed (to jQuery) accesses on http://fingerprint.pet-portal.eu/ during a fingerprint test.
    • The problem is probably not just with eval, but with any dynamic code evaluation, meaning setTimeout('...') and new Function('...').
    • Overriding eval doesn't work.
    • Can (probably) get CSP violation reports for just eval with something like script-src * 'unsafe-inline'; style-src * 'unsafe-inline'; report-uri chrome-extension://..., but they do not appear to provide file names for eval'd script files either.
    • We can get the function that triggered our property getters via arguments.callee.caller.caller, but we still need the URL it came from.
    • Is there anything around the function we have at this point that we can use to figure out where the function came from, besides trying to match the function to page script sources?
    • We can try matching the function to page script sources. The function we have doesn't have to look anything like the originating scripts ... because eval. Can try unpacking packed scripts. What if multiple eval's? What if data/javascript URIs? Not clear how far this will get us.
  • Simplify the UI (fingerprinting detected vs. not; expand to see more info).

  • Add help/about link; explain what the UI shows.

Code license

Mozilla Public License Version 2.0

chameleon's People

Contributors

ghostwords avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chameleon's Issues

Breaks Google Drive Apps

A way to reproduce this bug is to create a spreadsheet in google drive with multiple tabs and switch from one tab to the other, then a "File unavailable error" message should pop up. It might be related to #8.

Canvas fingerprinting false positive

Some kind of WordPress emoji plugin on http://basho.com/riak/:

window._wpemojiSettings = {"baseUrl":"http:\/\/s.w.org\/images\/core\/emoji\/72x72\/","ext":".png","source":{"concatemoji":"http:\/\/basho.com\/wp-includes\/js\/wp-emoji-release.min.js?ver=4.2.2"}};
            !function(a,b,c){function d(a){var c=b.createElement("canvas"),d=c.getContext&&c.getContext("2d");return d&&d.fillText?(d.textBaseline="top",d.font="600 32px Arial","flag"===a?(d.fillText(String.fromCharCode(55356,56812,55356,56807),0,0),c.toDataURL().length>3e3):(d.fillText(String.fromCharCode(55357,56835),0,0),0!==d.getImageData(16,16,1,1).data[0])):!1}function e(a){var c=b.createElement("script");c.src=a,c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g;c.supports={simple:d("simple"),flag:d("flag")},c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.simple&&c.supports.flag||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);

Detect access to navigator plugin and mimeType details

Currently Chameleon cannot intercept access to high entropy plugin properties such as name, filename and description. It only counts the number of accesses to navigator.plugins.

Here's a simple demo page. The script on the page enumerates all the details about navigator.plugins, but the access to individual plugin properties goes unnoticed.

Firefox Version

hello, i love this addon and i can't find a addon that is on the level of anti-fingerprinting this is

my addons
Noscript
cookie monster
Disconnect
Ublock Origin
Umatrix
Canvas Blocker

i would love to add Chameleon to that list of security addons, this combined with my vpn would make my privacy a whole lot better...

Next update

Are you still working on this add-on. (Opera/Chrome). Can you give a status update please.

When will it start blocking the fingerprinting efforts of websites.

Breaks YouTube HTML5 Player

The HTML5 player is unable to detect the proper size of the screen, and displays the proper size box but a smaller size video within it.

Disabling Chameleon in popup windows

Issue #6 changed the global on/off toggle to work on the current page's hostname. The downside, however, is that now it's even harder to disable Chameleon on toolbar-less popups (like the one used by Google Hangouts).

Maybe a rightclick/context menu entry?

will life be a new chameleon?

the author say will life be your project?
I want to have an application that can completely make random prints and canvas prints

[Update] user-agent

Hi,
i this extension is obsolete ? i love your work on this , but just wandering if you can update the user-agent
i did update it as now Chrome ask for it to be unpacked to load it ; just do not see your work go to waste .

Chameleon detects strange property names

On some pages, Chamelon detects strange property names such as undefined:{}.innerWidth, (.devicePixelRatio or undefinied.innerHeight - note the typo. A table summarizing the unexpected property names and a page to reproduce the issue is given below:

Property Page Script
(.devicePixelRatio http://cotrip.org http://partner.googleadservices.com/gpt/pubads_impl_57.js
???.devicePixelRatio
???.innerHeight
???.innerWidth
http://www.lamontagne.fr/accueil.html http://www.lamontagne.fr/pack/2102988336.js
firefox desktop.innerWidth
firefox desktop.innerHeight
http://www.link4.pl/ http://cdn.clicktale.net/www/tc/WRe21.js
Undefined.innerWidth
Undefined.innerHeight
http://new.disney.ru/ http://analytics.disneyinternational.com/analytics/lib/WS_v2.7/s_code.js
Undefined.devicePixelRatio http://new.disney.ru/ http://mc.yandex.ru/metrika/watch.js
global.devicePixelRatio http://businessdirectoryplugin.com/ http://www.screencast.com/inc/scripts/techsmith-smart-player.min.js
global.innerHeight
global.innerWidth
http://www.photobox.it/ http://static-sb.com/js/sb-tracker.js
undefined:{}.innerWidth
undefined:{}.innerHeight
http://www.dkb.de/index.html http://www.dkb.de/_conf/system/js/webtrekk322.js
undefinied.innerHeight
undefinied.innerWidth
((Note the typo!))
http://www.randstad.de/ http://www.randstad.de/js/75203/webtrends.js
Navigator.cwl_228564_728X90__0,0 http://www.timesofisrael.com/ http://ads.contextweb.com/TagPublish/getjs.static.js?v=9
Vector Object properties: Increment: undefined Size: undefined Elements: .innerWidth https://www.giocodigitale.it/home/ https://www.giocodigitale.it/static/js/lib/jquery.dimensions.js
Vector Object properties: Increment: undefined Size: undefined Elements: .innerHeight https://www.giocodigitale.it/home/ https://clicktalecdn.sslcs.cdngc.net/www/tc/WRe21.js
Vector Object properties: Increment: undefined Size: undefined Elements: .devicePixelRatio https://www.giocodigitale.it/home/ https://clicktalecdn.sslcs.cdngc.net/www/WRe21b.js

Add whitelist controls

It would be nice to have a whitelist function. E.g. intranet sites are broken with chameleon activated (because of "Window.innerHeight")

Maybe it can look like this
chameleon_whitelist

Chameleon detects HTML code as the accessed property name

Sometimes Chameleon displays an HTML code snippet instead of the accessed brower/device property. To reproduce, visit the pages in the following table and check the accessed properties by the scripts given below.

Page URL Script URL Detected Property
http://www.arcgis.com/features/ http://www.arcgis.com/features/js/jquery.js <html data-nlspage[...]
http://www.arcgis.com/features/ http://www.google-analytics.com/ga.js <html data-nlspage[...]
http://www.esri.com/ http://www.google-analytics.com/analytics.js <html lang="en" [...]
http://www.esri.com/ http://www.esri.com/styles/esricore/scripts/jquery.js <html lang="en" [...]

Randomising vs. Blending In

Wouldn't it be a lot safer to be able to randomize your browser fingerprint every time when visiting a site? If I understand correctly this script tries to blend in with existing Tor visitors by mimicking their fingerprint but what about completely randomizing the data?

A fingerprint which is never the same twice in a row can hardly be called a fingerprint.

Eventually: Firefox version please

I understand this is early, but please (A) promote people to use this with Chromium vs Chrome (because: free/open software) and (B) release a version for Firefox. Thanks for this important work.

Breaks Flash detection gating desirable content

Some sites use Flash detection before loading Flash content. Since Chameleon overloads window.navigator.plugins, these sites end up showing error messages about needing to install or upgrade Flash.

TODO examples.

Request for Safari

Thank you for your work on this project. Is there any chance that a Safari extension might be on the roadmap at some point in the future? I know this is still in the alpha stage.

Breaks Gmail interface

With Chameleon enabled, attempting to view a message in Gmail causes the following error:

Uncaught CustomError: Error in protected function: Cannot read property '1' of null 

There is also a "Loading..." message that occasionally appears at the top of the screen and stays there.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.