Coder Social home page Coder Social logo

levanhieu-git / cv-inspector-adblockpluschrome Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 26 KB

Custom changes to Adblock Plus Chrome extension for CV-Inspector

Home Page: https://athinagroup.eng.uci.edu/projects/cv-inspector/

License: GNU General Public License v3.0

JavaScript 100.00%
adblocking circumvention ndss-2021

cv-inspector-adblockpluschrome's Introduction

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.

cv-inspector-adblockpluschrome's People

Contributors

levanhieu-git avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.