Cryptocurrency mining scripts

Scripts for mining

Mining of the first digital assets began in January 2009: they were Bitcoins. But technology evolved, new cryptocurrencies appeared, as well as schemes for obtaining them. This article discusses such a phenomenon as browser mining scripts. These are programs that use the computing power of website visitors. Initially, they were conceived as an alternative to advertising banners: the owner of the site could monetize it by mining on someone else’s equipment. However, over time, this began to be abused.

The principle of operation of scripts for mining

For the first time such a program appeared in 2017. CoinHive is a mining script for mining Monero on the equipment of website visitors. It was installed by the owners of web resources for monetization. Their visitors logged in, agreed to the terms and conditions and voluntarily mined XMR to the developers. The CoinHive program mined coins on central processing units (CPUs). Often, they were only loaded by 40-70%.

In 2018, the developers of the mining program stopped supporting it and removed it. This is due to the abuse of CoinHive. Hackers began to embed it on third-party sites, services and platforms without the knowledge of their creators. All profits made from affected users were sent to the wallets of the attackers.

According to PublicWWWW service, as of mid-October 2022 CoinHive is present on 1 website worldwide.

Cryptocurrency mining scripts come in different ways of implementation and operation. They are categorized into:

5020 $
bonus for new users!

9.8

ByBit provides convenient and safe conditions for cryptocurrency trading, offers low commissions, high level of liquidity and modern tools for market analysis. It supports spot and leveraged trading, and helps beginners and professional traders with an intuitive interface and tutorials.

Earn a 100 $ bonus

for new users!

9.5

The largest crypto exchange where you can quickly and safely start your journey in the world of cryptocurrencies. The platform offers hundreds of popular assets, low commissions and advanced tools for trading and investing. Easy registration, high speed of transactions and reliable protection of funds make Binance a great choice for traders of any level!

  • Hidden.
  • Scripts in the form of widgets.
  • Captcha.
  • Shortened links.
  • With API integration.

Hidden script

The program is embedded on the Internet resource together with its program code, so users do not see the mining script. But they receive a request to apply their computing power. This allows you to bypass the protection of antivirus programs. The disadvantage of this method is that most site visitors do not agree to such conditions. But some of them accept them.

Cryptocurrency mining scripts
Example of a notification from the CoinHive script

The hidden web miner method is rather designed for inattentive users who do not read such notifications. But a part of them agrees to the terms on their own.

Widget

This method is based on the curiosity of visitors to the resource. The owner makes a widget and disguises it under any functional part of the site, for example, a computer test for the speed of cryptocurrency mining, weather and so on. When the user clicks on it, the script is launched. Widgets can be customizable in appearance and size. Earlier on the CoinHive website there was a list of commands to change them.

Captcha

This method is popular among the owners of online resources. They add captchas that users need to pass in order to perform certain actions. But to do this, they need to provide the service with a hash rate of 1024 or 2048 H/s. There are many situations where captcha will be appropriate:

  • Authorization.
  • Registration.
  • Navigating to a website or tabs.
  • Writing a review.
  • Rating (liking).

Shortened links

If the site is filled with content, then its owner can leave URLs to primary sources. Links for convenience are shortened through special services. Such a feature was previously offered by the developers of CoinHive on their platform. The function was available to registered users.

The mining script is triggered when visitors to the Internet resource click on the link left. The amount of the required hash rate for redirection is prescribed in the code. It can be set from 1024 to 2048 H/s. Users will not feel uncomfortable when clicking on the link, and the site owner will get coins.

HTTP API

This is the fairest way to implement a browser mining script. Its essence is to allow users themselves to earn with the payment of a commission. The site owner creates personal accounts for visitors, where they start mining coins and earn, he himself takes fees from users for the services offered.

The owner can take 10-30% commission, which is less profitable compared to previous methods. However, the opportunity to earn will attract many more users. A part of them will mine cryptocurrency non-stop. In sum, this can lead to higher profitability.

This method is more complicated relative to the previous ones. The site owner needs to create personal accounts, customize the API interface and attract visitors to mining.

How to detect mining scripts

CoinHive is the most popular program for browser-based crypto mining. However, there are other mining scripts available. Their comparison is in the table below.

NameCoin to be minedCommission of the scriptWorkability in 2022
CoinHive
Monero (XMR)
30%
No
Crypto-Loot
uPlexa (UPX)
12%
Yes
MineMyTraffic
No
JSEcoin
JSECoin (JSE)
15%
No

In 2023, there are almost no legitimate mining scripts left. Most of them are designed for malicious use by hackers. Often, these programs are covertly embedded on web resources and mine digital assets of their visitors. This leads to slower page loading speeds, freezes, rapid discharge of laptops, smartphones and tablets. But there are ways to combat them.

How to secure your browser

In 2023, there are the following ways to do it:

  • Edit the system hosts file. In the Windows operating system, it is located in the System32driversetc folder. You need to open the file in Notepad or a code editor (Notepad++, SublimeText and others). At the bottom you will need to enter 0.0.0.0.0 [domain name], for example – 0.0.0.0.0 coin-hive.com. After that, the system will start blocking access to this service. The mining script will not start. The disadvantage of the method is that you need to manually add domains.
  • Another method is to install a special utility, for example, Anti-WebMiner. It blocks the work of programs for browser-based mining of digital assets.
  • Disable JavaScript. Scripts work in this programming language. This is done in the browser or with the help of extensions (for example, NoScript). However, the method has a disadvantage – a part of web resources needs JavaScript to work.
  • Install the browser extension NoCoin. The program is designed to block mining scripts.

Frequently Asked Questions

🙋‍♂️ How do I realize that a mining script is running on an Internet resource?

On certain pages your PC will slow down and freeze. You need to check the CPU load through the system program “Device Manager”. It will most likely be running at 100%.

🔴 What will happen to the CPU because of JavaScript miner?

It will start overheating, which will reduce the life of the device. There may also be constant reboots of the operating system.

🤔 Are there malicious programs that mine coins from outside the browser?

Yes, they are called miner viruses. They infect your computer and then use its processing power for crypto mining. These viruses harness video cards, processors, and storage drives.

😎 How to detect hidden miners on a computer?

The hardware in your PC will get noisy and overheat, and the system will start to slow down. But some of the virus miners know how to hide. They shut down when the system needs power to perform certain tasks. To detect them, you will need to use an antivirus.

❓ What is mining?

It is the process of solving special cryptographic problems. It is needed to find hashes (block identifiers) in decentralized networks.

Is there a mistake in the text? Highlight it with your mouse and press Ctrl + Enter.

Author: Saifedean Ammous, an expert in cryptocurrency economics.

Вашият коментар

Вашият имейл адрес няма да бъде публикуван. Задължителните полета са отбелязани с *

bg_BGBulgarian

Spelling error report

The following text will be sent to our editors: