Giter Club home page Giter Club 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 distinct attempts to collect information about your browser on the current page. Higher numbers suggest fingerprinting might be taking place.

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 of passive fingerprinting requires an indirect approach
window.navigator values โœ” โœ” partial protection (navigator.javaEnabled not yet overriden, ...)
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
CSS media queries โœ— โœ— needs investigation
Canvas image data extraction โœ” โœ— protection impeded by image rendering differences between Chrome and Firefox
WebGL โœ” โœ— 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 โœ— โœ— needs investigation
Packet inspection/clock skew (?) โœ— โœ— not possible in a browser extension

Roadmap

  • Add heuristic for what constitutes fingerprinting and mark scripts accordingly.

  • 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).

  • Block fingerprinting scripts.

  • Add user-initiated blocking/unblocking.

  • Add site whitelisting.

  • Reevaluate Tor masquerading vs. randomizing (see issue #1).

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

Code license

Mozilla Public License Version 2.0

chameleon's People

Contributors

ghostwords avatar

Watchers

 avatar

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.