maxwellmlin / bannerclick

Automated cookie banner detection and interaction.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Note: This is a fork of BannerClick for use in Duke CS+ 2023: Web Cookie Security and Privacy. The original README file is below.

BannerClick

BannerClick is a web privacy measurement tool that is built on top of OpenWPM. It is designed to detect and interact with cookie banners. For more details on how BannerClick works please read our paper.

Installation

We implemented BannerClick as a custom command in OpenWPM. Therefore, to run BannerClick first you need to install OpenWPM as follows.

The main pre-requisite for OpenWPM is conda. it is an open-source cross-platform package management tool, and can be installed from https://docs.conda.io/en/latest/miniconda.html.

Next, the install.sh script will install all the prerequisites in a separate conda environment named openwpm. Note that we customized install.sh to install the Firefox binary using the local firefox-bin.tar.bz2 file instead of downloading it from the server (as Firefox 95 is not available for download anymore). . To run the install script, run

./install.sh

After running the install script, activate your conda environment by running:

conda activate openwpm

Quick Start

Running BannerClick is the same as OpenWPM. Check out demo.py for an example. This will use the default setting specified in openwpm/config.py::ManagerParams and openwpm/config.py::BrowserParams, with the exception of the changes specified in demo.py. As an example the following command will run the bannerclick custom command using 8 headless browsers with 5 repetitions for each domain in the Tranco5Nov.csv file.

python demo.py --bannerclick --headless --num-browsers 8 --num-repetitions 5 ./bannerclick/input-files/Tranco5Nov.csv

Note that it is also possible to run BannerClick as an independent module from OpenWPM. To do this please take a look at the instructions here.

Configuration

Aside from the configuration for OpenWPM, there are other parameters that can be modified in config.py to configure BannerClick. Each parameter is documented in the file directly. For example, MOBILE_AGENT can be set to simulate a mobile agent.

Attribution

If you use BannerClick in your research, please reference it with the following citation:

@inproceedings{rasaii2023exploring,
    title = {Exploring the Cookieverse: A Multi-Perspective Analysis of Web Cookies},
    author = {Ali Rasaii and Shivani Singh and Devashish Gosain and Oliver Gasser},
    booktitle = {Proceedings of the 2023 Passive and Active Measurement Conference},
    year = {2023},
    month = mar
}

About

Automated cookie banner detection and interaction.

License:Other


Languages

Language:Python 70.4%Language:TypeScript 11.3%Language:HTML 8.7%Language:JavaScript 8.7%Language:Shell 0.8%Language:Dockerfile 0.1%Language:CSS 0.0%