Learn how to block illegal cryptocurrency mining from your PC

Recently we learned that many websites use Coinhive to mine Monero using our PCs. A simple code from Coinhive, when put into the website, will result in the mining of Monero using the power of our CPU. Whenever someone visits these websites, it uses the user’s CPU power in order to mine Monero without the user’s consent. However, there are ways one can avoid this. In the following blog, we will see ways to block Monero mining.

How to identify if your PC is secretly mining Monero

If in case, some website is using your browser to mine cryptocurrencies, you can find that out easily. The easiest way to identify this is to check your CPU usage while surfing the website. If you spot a huge spike in your CPU usage while visiting a particular website, it’s very obvious that that website is using your CPU.  In case most of the browser tabs are closed, and no applications are running, there are chances that you are becoming a target of such mining campaign. If you aren’t much tech-savvy, you can perform hit and trial with the suspected websites and see which one of them is spiking the CPU usage.

1. Block coin mining domains in the host file

This is the basic way of blocking particular domains that you don’t find harmful or irritating. Due to such blocking, your browser won’t be able to connect to these domains. One can edit the hosts’ file and redirect it to 0.0.0.0.

In Linux, you’ll have to open the hosts’ file by running following command and add 0.0.0.0 coin-hive.com to the end of the document:

sudo nano /etc/hosts

In Linux, run the following command:

sudo nano /private/etc/hosts

For Windows, navigate to C:\Windows\System32\drivers\etc and edit the hosts document to add 0.0.0.0 coin-hive.com at the end.
However, note that this change only blocks the mining script hosted by coinhive. In case one wants to add other mining script domains, one will have to add them further down the line.

2. Block domains in Ad Blocker

One can easily use ad blocking extensions like Adblock to block cryptocurrency mining. One can find relevant Ad blockers depending on their browsers. For example, in Chrome, for AdBlock, navigate to the list of extension and find AdBlock. There, look for Customize > Block an ad by its URL. Then, add the following text in the text box:

https://coin-hive.com/lib/coinhive.min.js

adblock-stop-mining

adblock-stop-mining

3. NoScripts in Firefox

For Firefox, one can use JavaScript-blocking extensions like NoScript. However, it is a pretty aggressive extension that can break lots of websites as it disables all scripts running on pages. If one is using Tor Browser, then he must be aware of NoCripts and its use.

No scripts in firefox

No scripts in firefox

4. Block Coinhive in Opera Web browser

A good news for everyone using Opera web browser. With the release of Opera 50 web browser, the company brought in-built functionality to block CoinHive scripts and cryptocurrency mining techniques. This will allow the users to make sure that their computers don’t go crazy whenever any website using the digital coin mining technique is encountered. The users can find this option in Settings (Preferences on macOS) > Basic > Block ads and under the Recommended lists of ad filters.

blocking on opera

blocking on opera

5. Use Chrome Extension

One can any day use the default Chrome extensions like No Coin and minerBlock to block crypto mining. No Coin is an open-source extension. It is reliable and safe way to control how a website is interacting with your web browser.As soon as you visit a website, No Coin will detect and show if any such activity is going on. Moreover, while this extension blocks any such activity, it also allows you to whitelist a website for a period of time.

No Coin

No Coin

And just like No Coin, minorBlock is another open source Chrome extension that can block cryptocurrency mining in the web browser. These extensions currently list a few popular miner domains to their list, and they are expected to add more once they get popularity.

minerBlock

minerBlock

These are some of the effective ways in which one can block cryptocurrency mining.

 

 

Share this news
>