This browser extension was developed as part of my bachelor thesis. Please note that the extension is only a proof-of-concept and not ready for use in production.
This browser extension detects "Client-Side Web API Manipulations".
The examples/
directory contains demo HTML pages that allow testing the browser extension:
index.html
- Index with list of pagessafe.html
- Does not modify browser APIsfetch-manipulation.html
- Modifies thefetch
browser APIproperty-manipulation.html
- Modifiesconsole
logging APIsexternal-polyfill.html
- Includes an external polyfill library that overrides browser APIs
- Checkout the copied repository to your local machine eg. with
git clone https://github.com/irgendwr/wam-detector.git
- run
npm install
to install all required dependencies - run
npm run build
The build step will create the distribution
folder, this folder will contain the generated extension.
Using web-ext is recommended for automatic reloading and running in a dedicated browser instance. Alternatively you can load the extension manually (see below).
- run
npm run watch
to watch for file changes and build continuously - run
npm install --global web-ext
(only only for the first time) - in another terminal, run
web-ext run
for Firefox orweb-ext run -t chromium
- Check that the extension is loaded by opening the extension options (in Firefox or in Chrome).
You can also load the extension manually in Chrome or Firefox.
- Visit about:debugging#/runtime/this-firefox
- Click 'Inspect' on the extension
- Open the console or debugger
This repository also contains scripts that allow the collection and evaluation of data generated by the extension.
Scripts in scripts/
:
data-collector.py
- REST API that receives data from the browser extensionstart-evaluation.sh
- BASH script that starts the evaluation / runsauto-evaluator.py
auto-evaluator.py
- Script that automates the browser and visits domains from the tranco listprocess-data.py
- Script that processes the gathered data and generates statistics
Install requirements: pip install -r scripts/requirements.txt
Edit the constants at the top of the script files to fit your setup.
Start the scripts:
-
Data collection
./scripts/data-collector.py
-
Start evaluation
./scripts/start-evaluation.sh
-
Process data
./scripts/process-data.py
- Based on the browser extension template by @fregante.
- Icons created by @HansiMcKlaus
Licensed under the MIT License.