Giter Site home page Giter Site logo

marekschauer / web-api-manager Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pes10k/web-api-manager

0.0 0.0 0.0 1.41 MB

(Unmaintained) WebExtension based browser extension to manage and block untrusted parts of the Web API.

License: GNU General Public License v3.0

JavaScript 89.61% CSS 0.14% HTML 10.25%

web-api-manager's Introduction

Web API Manager

This project is not currently maintained. I no longer have the time to keep it supported. I would welcome a co-maintainer to work with though, if someone might be interested. If so, please contact me over email.

Running the Extension

Download built versions of the extension from each browsers' extension stores:

By default, this extension does not make any changes. No aspects of the Web API are affected until you start creating custom rule sets, or modifying what Web API standards sites have access to by default. You can start creating these rules through the site's configuration pane.

You can find some suggested page configurations in the Wiki.

Overview

This extension allows users to selectively allow different hosts on the web to have access to different types of browser functionality. Doing so allows security and privacy sensitive web users to limit the attack surface presented to websites, and to limit websites to the functionality they actually need to carry out user-serving purposes.

Background

Web browsers gain staggering numbers of new features, without their users knowing what new functionality is being pushed into their trusted base. While some of this functionality is broadly useful for things commonly thought of as "web" related, a large amount of it is useful in only rare situations, if ever. Examples of this rarely-needed functionality includes the low level audio synthesis capabilities of the Web Audio API, the low level graphics capabilities of WebGL, or the light sensing capabilities of the Ambient Light Sensor API. Such complex-but-rarely-used functionality has been often used in attacks on the security and privacy of the web.

Other functionality is frequently used by web sites, but for non-user-serving purposes, like fingerprinting anonymous users and tracking them across websites. Examples of such functionality includes parts of the SVG API, parts of the the Canvas Element's functionality, and the Beacon standard, among many others.

This extension helps users stay private and secure online by limiting websites to only the functionality they need, and prevent them from accessing rarely needed and/or privacy violating functionality.

Functionality

The extension currently includes the following functionality:

  • Creation of domain-specific functionality rules, based on host-matching regular expressions.
  • Blocking of functionality across all domains, with a fallback, "default" blocking rule.
  • A novel method of blocking functionality, designed to minimize the effect of removing functionality on existing code that expects that functionality to be in place.
  • A categorization of approximately 1,400 JavaScript methods into 74 different Web API standards (and, where appropriate, sub-standards).
  • User feedback to alert users how many hosts are executing script every time they visit a site, to ease the creating of new rules.

The following functionality is not currently implemented, but is being considered for future inclusion:

  • The ability to subscribe to blocking rule sets created by trusted third parties, similar to the EasyList / AdBlockPlus model of rule subscriptions.
  • Blocking property accesses on non-global structures through an additional level of interposition on runtime created objects.
  • Adding new Web API standards into the code base.
  • Extend blocking to properties and events (currently only functions and methods are interposed on).

Contributing

Pull requests and contributions of all kinds are greatly appreciated. One thing that would be extremely helpful is help compiling information about new browser standards. The process is not too tricky, and is documented at docs/ADDING_STANDARDS.md.

And in general, please feel free to reach out, either through the issue queue or through email ([email protected]).

Building

You can build the extension with the following steps:

npm install
npm run bundle

# You'll then have a zip'ed up version of the extension at `dist/webapi_manager.zip`

Testing and Development

There is a Mocha and Selenium based test suite in place now. To run it you'll need to provide the test suite with some social networking credentials (to make check for previous regressions related to cookies and logging into sites).

To run the tests, give the following a try:

# install the development libraries
npm install

# copy the skeleton config file to where the test scripts expect it to be.
cp test.config.example.js test.config.js

# edit the new test config file to add github and google account credentials
vim test.config.js

# Run the test suite
npm test

# Or, if you want to watch the tests run...
npm run test:watch

Background

This extension is based on research conducted at the BITSLab at the University of Illinois at Chicago. Further information on the measurements and techniques used in this extension can be found in the following papers.

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.