Skip to content

levanhieu-git/cv-inspector-adblockpluschrome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CV-Inspector-adblockpluschrome

Custom changes to Adblock Plus Chrome extension for CV-Inspector.

The changes do the following:

  1. It annotates DOM elements that are hidden with the attribute abp-blocked-element: true
  2. 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.
  3. 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.

Citation

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}
}

Contact

We also encourage you to provide us [email protected] with a link to your publication. We use this information in reports to our funding agencies.

Setup Overview

This setup was tested using Amazon Machine Image: Ubuntu Server 18.04 LTS (HVM), SSD Volume Type

  1. Install basic dependencies
    1. python-pip, virtualenv
    2. Install specific versions of npm and node. (I could not get it to work with nodejs 15)
    3. curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
    4. sudo apt-get install -y nodejs
  2. Create a virtual environment for python2: we will call this adp
    1. virtualenv --python=python2.7 [path_to_your_envs]/adp
  3. Activate the virtual environment
    1. source [path_to_your_envs]/adp/bin/activate
  4. Install python dependencies
    1. pip install jinja2 fonttools brotli pycrypto mercurial
  5. Try to build adblockpluschrome for the first time:
    1. Go to path you keep your projects
    2. git clone https://github.com/adblockplus/adblockpluschrome.git
    3. cd adblockpluschrome
    4. git checkout 7f8c1fb82d3f14515ba09c248f5aaa339246064c (version 3.7, ~Jan 2020)
    5. ./build.py devenv -t chrome
      1. if this breaks for tensor related reasons, then install it yourself using: npm install "@tensorflow/tfjs-core"
      2. re-run the build command
  6. Add in our changes and rebuild:
    1. Go to root directory our project and copy over our version of include.preload.js to where you saved adblockpluschrome
      1. cp include.preload.js [path to adblockpluschrome]/.
      2. cp adblockpluscore_path.diff [path to adblockpluschrome]/adblockpluscore/.
      3. cp contentFiltering.js [path to adblockpluschrome]/lib/.
      4. cd [path to adblockpluschrome]/adblockpluscore/
      5. git apply adblockpluscore_path.diff
    2. rebuild the extension without dependencies
      1. SKIP_DEPENDENCY_UPDATES=true ./build.py devenv -t chrome
  7. The resulting build will be in [path to adblockpluschrome]/devenv.chrome. You will use this directory when running CV-Inspector

Dependencies

CV-Inspector

See CV-Inspector repository for the main component to CV-Inspector.

License

Adblock Plus Chrome Extension for CV-Inspector is licensed under GPL-3.0 License.