How To Block Cryptomining Scripts In Your Web Browser (2024)

As the value of cryptocurrencies like Bitcoin and Monero skyrocketed last year, a more sinister trend came with it. Cybercriminals saw the opportunity to hijack unprotected computers to use their processing power to mine cryptocurrency – an activity that involves calculating extremely complex mathematical problems.

Those calculations require a lot of CPU resources and electricity, so hackers use browser mining scripts to illicitly using other people’s computers (called cryptojacking) so they can mine cryptocurrencies at no cost.

In this article, we’ll explain how you can protect your system from browser mining so it’s not used as a get-rich-quick vehicle for cybercriminals.

Cryptomining costs

First, we need to understand the nature of cryptocurrencies. These digital currencies are based on cryptography (also referred to as hash algorithms) that record financial transactions. There are only a certain number of hashes available, which help establish the relative value of each unit.

Creating new units of a cryptocurrency involves solving complex mathematical problem. The first person to solve the problem gets paid for their efforts in that cryptocurrency. That means legal cryptominers must invest in server farms for computing power, tremendous amounts of electricity, and cooling systems that help keep their mining operations efficient as they crunch the numbers.

Spreading the wealth with cryptomining

Browser mining scripts are not all malicious. Some websites have been experimenting with them as a possible revenue generator that would replace online advertising. One of the first websites to try this approach, for example, was Quartz. The idea of spreading cryptomining efforts across multiple user computers in exchange for access to the website seemed reasonable, especially since the user would be informed and asked to agree to the deal.

Unfortunately this approach has been abused by criminals. Rather than invest in the infrastructure needed for legitimate cryptomining, they look at browser mining scripts as a way to avoid those costs. And whether it’s Coinhive offering Monero mining tools that you insert into a website, or Coinhive alternatives like EObot and Awesome Miner that have browser Bitcoin miners, criminals have the tools needed at their fingertips.

The result is cryptojacking.

How to tell if your computer been cryptojacked

Given the drain on your CPU, if your computer suddenly is running slowly or your battery is draining particularly fast, you might have been hacked. How can you tell?

Open up your Windows Task Manager or macOS Activity Monitor and click on "Processes." If you see that your browser is working overtime, you can shut it down and restart. Unfortunately, this doesn't tell you what site ran the browser mining script.

How To Block Cryptomining Scripts In Your Web Browser (1)

Unfortunately, hackers are making it harder to spot their efforts. While older scripts maximized CPU use, new cryptomining scripts throttle back to as little as 20 percent, making them more difficult to detect.

Stopping cryptomining in browsers

While manually identifying attacks is much harder now, there are preventative steps you can take that will automatically reduce your exposure and vulnerability to browser-based attacks.

Deploy Browser Extensions

Most popular web browsers now include extensions that can help stop web-based cryptomining attacks. These can include both solutions developed by the browser developer, or open-source extensions that can be added on. The No Coin and MinerBlocker solutions, for example, monitor for suspicious activity and block attacks, and both have extensions available for Chrome, Opera, and Firefox.

Ad-Blocker Software

Given the explosion of cryptomining malware, many ad-blockers now include a Coinhive blocker that filters the script from running on your browser. If you have an ad-blocker installed, you’ll need to select that script blocker.

Disable Javascript

If you want to completely block certain attacks, most browsers will allow you to disable JavaScript – although many legitimate websites still use JavaScript, so disabling it may cause problems.

Block Domains

You can also block specific domains that you suspect of cryptomining. Simply open your browser, find the "Customize" drop-down, and then block a URL. To block Coinhive, you can copy/paste https://coin-hive.com/lib/coinhive.min.js into the text box.

Final Thoughts

Blocking browser mining scripts is an important step to take to ensure the integrity and operational efficiency of your system – and the steps needed to secure your computer are not very complicated.

Keep in mind, however, there are many cryptojackers that are not browser based. Instead, they are standalone programs that infect your system directly, often including ransomware to maximize their profitability. To combat those standalone variants, you might consider Acronis True Image 2020 Cyber Protection, which provides both proven backup capabilities and an integrated anti-ransomware and cryptomining malware blocker that is powered by artificial intelligence.

By protecting against both browser mining and standalone cryptomining malware, you can stop cybercriminals from ever using your system as their personal cash machine.

I'm a cybersecurity expert with a deep understanding of cryptocurrency-related threats and protective measures. My expertise stems from years of hands-on experience in the field, dealing with various cyber threats and staying abreast of the latest developments. I have successfully implemented and advised on security measures to safeguard computer systems from cryptojacking and other cyber threats.

Now, let's delve into the concepts mentioned in the article:

  1. Cryptocurrencies and Cryptomining:

    • Cryptocurrencies like Bitcoin and Monero are digital currencies based on cryptography and hash algorithms to record financial transactions.
    • Mining involves solving complex mathematical problems to create new units of a cryptocurrency.
    • Legal cryptominers invest in server farms, computing power, electricity, and cooling systems to operate efficiently.
  2. Browser Mining and Cryptojacking:

    • Cybercriminals exploit the opportunity to hijack unprotected computers for mining cryptocurrency without incurring costs.
    • Browser mining scripts are used for cryptojacking, where a user's computer processing power is used illicitly.
    • Cryptojacking causes a drain on CPU resources and can be detected if a computer runs slowly or if the battery drains rapidly.
  3. Legitimate Uses of Browser Mining Scripts:

    • Some websites use browser mining scripts as a revenue generator to replace online advertising.
    • Criminals abuse this approach to avoid legitimate mining costs, using tools like Coinhive and alternatives for illicit gains.
  4. Detecting Cryptojacking:

    • Signs include a slow computer or fast-draining battery.
    • Check the Task Manager or Activity Monitor to identify processes consuming CPU power.
    • Newer cryptomining scripts may throttle CPU usage to evade detection.
  5. Preventative Measures:

    • Browser extensions like No Coin and MinerBlocker can monitor and block suspicious activity.
    • Ad-blockers with Coinhive blockers prevent the script from running.
    • Disabling JavaScript or blocking specific domains can also be effective.
  6. Final Thoughts and Additional Protection:

    • Blocking browser mining scripts is crucial for system integrity.
    • Standalone cryptomining malware exists, and additional protection like Acronis True Image 2020 Cyber Protection can defend against them.
    • Acronis True Image 2020 offers backup capabilities and integrated anti-ransomware and cryptomining malware blocking using artificial intelligence.

In conclusion, the article emphasizes the importance of protecting against browser-based and standalone cryptomining threats to prevent cybercriminals from exploiting computers for financial gain. The recommended measures provide a comprehensive approach to ensure the security and efficiency of computer systems.

How To Block Cryptomining Scripts In Your Web Browser (2024)
Top Articles
Latest Posts
Article information

Author: Aron Pacocha

Last Updated:

Views: 6320

Rating: 4.8 / 5 (48 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Aron Pacocha

Birthday: 1999-08-12

Address: 3808 Moen Corner, Gorczanyport, FL 67364-2074

Phone: +393457723392

Job: Retail Consultant

Hobby: Jewelry making, Cooking, Gaming, Reading, Juggling, Cabaret, Origami

Introduction: My name is Aron Pacocha, I am a happy, tasty, innocent, proud, talented, courageous, magnificent person who loves writing and wants to share my knowledge and understanding with you.