Coder Social home page Coder Social logo

drmine's Introduction

Dr. Mine

Dr. Mine is a node script written to aid automatic detection of in-browser cryptojacking. The most accurate way to detect things that happen in a browser is via browser itself. Thus, Dr. Mine uses puppeteer to automate browser thingy and catches any requests to online cryptominers. When a request to any online cryptominers is detected, it flags the corresponding URL and cryptominer being in use. Therefore, however the code is written or obfuscated, Dr. Mine will catch it (as long as the miners are in the list). The list of online cryptominers are fetched from CoinBlockerLists. The result is also saved on file for later use.

  • Can also process single URL passed directly via command line
  • All links found on the first (requested) page are also processed, if same-origin
  • All configurable options are stored in config.js allowing easier modifications
  • To reduce extra bandwidth and processing, all requests to resources like fonts, images, media, stylesheets are aborted

Dr. Mine, now, uses bluebird- making it much faster and more efficient.

Pre-requisites & Installation

The following 3 lines of commands should set everything up and running on Arch distros;

pacman -S nodejs npm
git clone https://github.com/1lastBr3ath/drmine.git && cd drmine
npm i --save bluebird puppeteer

Please make sure your version of node is 7.6.0 or greater. For any installation assistance or instructions on specific distros, please refer to respective documents;
https://nodejs.org/en/download/package-manager/
https://docs.npmjs.com/getting-started/installing-node
https://github.com/GoogleChrome/puppeteer#installation

Usage

Dr. Mine accepts either a URL or a file which is expected to contain valid URLs. Usage is as simple as;

node drmine.js list.txt

A sample list.txt looks like;

http://cm2.pw
http://cm2.pw/xmr/
https://example.com/

An example of passing URL directly via command line;

node drmine.js http://cm2.pw/xmr/

Screenshot

Screenshot

Contribution

Dr. Mine can still be improved in a lot of ways. Any feedback and/or contributions are highly appreciated.

To-do

  • Proper Error Handling

drmine's People

Contributors

1lastbr3ath avatar paralax avatar

Watchers

 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.