Custom changes to Adblock Plus Chrome extension for CV-Inspector.
The changes do the following:
- It annotates DOM elements that are hidden with the attribute
abp-blocked-element: true
- It forces the extension to load EasyList and Anti-CV list from a different local web proxy:
127.0.0.1:5000
(see the patch file for details). This allows us to freeze the filter list that we are using during data collection for CV-Inspector. - Minor: It also keeps track of when a JS snippet filter rule is matched. See patch for details:
notifyBodyWithSnippetBlock
. This is then picked up when using CV-Inspector.
For more details, we will refer to the paper.
This should be used in combination with CV-Inspector.
Visit our CV-Inspector Project page for more information, including datasets that we utilized in the paper.
If you create a publication (including web pages, papers published by a third party, and publicly available presentations) using this repository or CV-Inspector, please cite the corresponding paper as follows:
@inproceedings{le2021cvinspector,
title={{CV-Inspector: Towards Automating Detection of Adblock Circumvention}},
author={Le, Hieu and Markopoulou, Athina and Shafiq, Zubair},
booktitle={The Network and Distributed System Security Symposium (NDSS)},
url = {https://dx.doi.org/10.14722/ndss.2021.24055},
doi = {10.14722/ndss.2021.24055},
year={2021}
}
We also encourage you to provide us athinagroupreleases@gmail.com with a link to your publication. We use this information in reports to our funding agencies.
This setup was tested using Amazon Machine Image: Ubuntu Server 18.04 LTS (HVM), SSD Volume Type
- Install basic dependencies
- python-pip, virtualenv
- Install specific versions of npm and node. (I could not get it to work with nodejs 15)
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
- Create a virtual environment for python2: we will call this
adp
virtualenv --python=python2.7 [path_to_your_envs]/adp
- Activate the virtual environment
source [path_to_your_envs]/adp/bin/activate
- Install python dependencies
pip install jinja2 fonttools brotli pycrypto mercurial
- Try to build adblockpluschrome for the first time:
- Go to path you keep your projects
git clone https://github.com/adblockplus/adblockpluschrome.git
cd adblockpluschrome
git checkout 7f8c1fb82d3f14515ba09c248f5aaa339246064c
(version 3.7, ~Jan 2020)./build.py devenv -t chrome
- if this breaks for tensor related reasons, then install it yourself using:
npm install "@tensorflow/tfjs-core"
- re-run the build command
- if this breaks for tensor related reasons, then install it yourself using:
- Add in our changes and rebuild:
- Go to root directory our project and copy over our version of
include.preload.js
to where you savedadblockpluschrome
cp include.preload.js [path to adblockpluschrome]/.
cp adblockpluscore_path.diff [path to adblockpluschrome]/adblockpluscore/.
cp contentFiltering.js [path to adblockpluschrome]/lib/.
cd [path to adblockpluschrome]/adblockpluscore/
git apply adblockpluscore_path.diff
- rebuild the extension without dependencies
SKIP_DEPENDENCY_UPDATES=true ./build.py devenv -t chrome
- Go to root directory our project and copy over our version of
- The resulting build will be in
[path to adblockpluschrome]/devenv.chrome
. You will use this directory when running CV-Inspector
npm 6, nodejs 14
: to build this projectAdblock Plus 3.7 for Chrome
: https://github.com/adblockplus/adblockpluschromePython 2.7
See CV-Inspector repository for the main component to CV-Inspector.
Adblock Plus Chrome Extension for CV-Inspector is licensed under GPL-3.0 License.