alxdavids / challenge-bypass-extension

Home Page:https://privacypass.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Challenge Bypass Extension

CircleCI

The Privacy Pass extension implements the Privacy Pass protocol for providing a private authentication mechanism during web browsing. Privacy Pass is currently supported by Cloudflare to allow users to redeem validly signed tokens instead of completing CAPTCHA solutions. The extension is compatible with Chrome and Firefox (v48+). An example server implementation that is compatible with this extension is available here.

The protocol we use is based on a realization of a 'Verifiable, Oblivious Pseudorandom Function' (VOPRF) first established by Jarecki et al.. For a technical description of the protocol see the PROTOCOL.md. We also detail the entire protocol and results from this deployment in a research paper that appeared at PETS 2018 (Issue 3).

The protocol has received extensive review, but this extension is a work-in-progress and we regard all components as beta releases. In particular in v1.0 of the extension some features are not fully implemented (e.g. DLEQ proof verification).

We hope to address a significant number of existing issues in a future release of the extension. Users can also install the latest branch of master into their browser to use a newer version.

We welcome contributions from the wider community. Also feel free to notify us of any issues that occur. Pull requests and reviews are welcome and encouraged.

Contents

Stable releases

Download the latest stable release of the extension:

Quickstart

Requires installation of a JDK for building sjcl

$ git clone https://github.com/privacypass/challenge-bypass-extension.git && cd challenge-bypass-extension
$ git submodule update --init
$ yarn install
$ yarn build:all
$ yarn test:all

Useful documentation

Documentation for the protocol, workflow and extension components.

Development

  • git clone https://github.com/privacypass/challenge-bypass-extension.git
  • git submodule update --init
  • Directory:
    • src: The source files that are used for establishing the extension.
      • ext: Source files that are specific to the extension.
      • crypto: External source files that provide cryptographic functionality.
    • addon: Extension directory.
    • test: Test scripts for using the jest integration test framework.
    • docs: Documentation.
  • Commands:
    • yarn install: Installs all dependencies.
    • build:all: Builds all source files (including sjcl) and compiles them (using closure) into minified versions that are kept in addon/scripts.
    • test:all: Compiles all source files, excluding browserUtils.js, and compiles them (using closure) into test_compiled.js. Runs sjcl tests and the jest test framework for the extension.
    • build:ext: Builds all extension source files and compiles them (using closure) into bg_compiled.js.
    • test:ext: Builds all extension source files, excluding sjcl. browserUtils.js, and compiles them (using closure) into bg_compiled.js. Runs the jest test framework for the extension.
    • test:ext-quick: Runs the jest test framework for the extension.
    • build:sjcl: Builds sjcl.
    • test:sjcl: Runs the sjcl tests.
    • test:watch: Runs test:all using the jest --watch flag.
    • lint: Lints the source files.
    • dist: Zips the extension files.

Firefox

  • Open Firefox and go to about:debugging
  • Click 'Load Temporary Add-on' button
  • Select manifest.json from addon/
  • Check extension logo appears in top-right corner and 0 passes are stored (by clicking on it)
  • Go to a web page supporting Privacy Pass where internet challenges are displayed (e.g. https://captcha.website)
  • Solve CAPTCHA and check that some passes are stored in the extension now
    • captcha.website cannot be bypassed (this is only for gaining passes)
  • Go to a new website supporting Privacy Pass that ordinarily displays a challenge
  • Check that the website is displayed correctly without human interaction (more than one pass may be spent)
    • No interaction with a CAPTCHA page should occur, for instance

Chrome

Same as above, except the extension should be loaded at chrome://extensions instead.

Plugin overview

The following script files are used for the workflow of Privacy Pass and are found in addon/scripts. They are compiled into a single file (compiled/bg_compiled.js) that is then loaded into the browser.

  • src/ext/

    • listeners.js: Initialises the listener functions that are used for the webRequest and webNavigation frameworks.
    • background.js: Determines the bulk of the browser-based workflow for Privacy Pass. Decides whether to initiate the token issuance and redemption phases of the protocols.
    • browserUtils.js: General utility functions that are used by background.js. We separate them so that we separate the specific browser API calls from the actual workflow.
    • config.js: Config file that decides the workflow for Privacy Pass
    • content.js: (currently unused) Content script for reading page html
    • token.js: Token generation and storage procedures
    • issuance.js: Specific functions for handling token issuance requests from the extension and corresponding server responses
    • redemption.js: Specific functions for construction redemption requests
  • src/crypto/

    • local.js: Wrapper for extension-specific cryptographic operations
    • sjcl.js: Local copy of SJCL library
    • keccak.js: Local implementation of the Keccak hash function (taken from https://github.com/cryptocoinjs/keccak).

Files that are used for testing are found in test/. These test files use their own compiled test file in compiled/test_compiled.js. The only difference is that src/etx/browserUtils.js is removed for better comptability. Functions from this file are mocked during test execution.

Team

Design

Cryptography

Cryptography is implemented using the elliptic-curve library SJCL and compression of points is done in accordance with the standard SEC1. This work uses the NIST standard P256 elliptic curve for performing operations. Third-party implementers should note that the outputs of the hash-to-curve, key derivation, and point encoding functions must match their Go equivalents exactly for interaction with our server implementation. More information about this will be provided when the edge implementation is open-sourced.

Acknowledgements

The creation of Privacy Pass has been a joint effort by the team made up of George Tankersley, Ian Goldberg, Nick Sullivan, Filippo Valsorda and myself.

We would also like to thank Eric Tsai for creating the logo and extension design, Dan Boneh for helping us develop key parts of the protocol, as well as Peter Wu and Blake Loring for their helpful code reviews. We would also like to acknowledge Sharon Goldberg, Christopher Wood, Peter Eckersley, Brian Warner, Zaki Manian, Tony Arcieri, Prateek Mittal, Zhuotao Liu, Isis Lovecruft, Henry de Valence, Mike Perry, Trevor Perrin, Zi Lin, Justin Paine, Marek Majkowski, Eoin Brady, Aaran McGuire, and many others who were involved in one way or another and whose efforts are appreciated.

FAQs

What do I have to do to acquire new passes?

  • Click "Get More Passes" in the extension pop-up (or navigate to "https://captcha.website").
  • Solve the CAPTCHA that is presented on the webpage
  • Your extension should be populated with new passes.

Are passes stored after a browser restart?

Depending on your browser settings, the local storage of your browser may be cleared when it is restarted. Privacy Pass stores passes in local storage and so these will also be cleared. This behavior may also be observed if you clear out the cache of your browser.

About

https://privacypass.github.io

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:JavaScript 99.2%Language:CSS 0.5%Language:HTML 0.3%