How to disable browser add-ons that block scripts from running. Mining in the browser. How to protect yourself from it. How to protect yourself from browser mining




In order to disable JavaScript in Chrome go to settings by clicking the button with three lines in the upper right corner of the browser window. Scroll to the bottom of the settings page and click below. You will find the section "Personal data", where you need to click on "Content settings":

In chapter "JavaScript" set the checkbox to value "Prohibit execution...". Click the button "Ready".

How to disable JavaScript in Mozilla Firefox

Type in the address bar of your browser:

about:config

In this way you can open a list of settings. Use search to find an item javascript.enabled. Left click on it and click "Switch":

How to disable JavaScript in Yandex

Users of the Yandex browser, which is similar to Chrome in many ways, should also start with the three-bar settings button in the top right corner. Click there "Show advanced settings". Find the "Privacy Protection" section, where you click "Content Settings":

Having entered this section, move the switch to the item "Disable JavaScript on all sites". To confirm changes, click "Ready":

How to disable JavaScript in Apple Safari

If you're using Safari, open Settings and go to "Safety". Further, in the section "Web content", uncheck the box "Enable JavaScript":

How to disable JavaScript in Internet Explorer

Open settings by clicking on the gear button in the upper right corner of the browser. Go to section "Browser Options" and then to the tab "Safety". Select zone "Internet" and press the button "Another":

Find a section "Active Scenarios" and select the option "Disable". The same must be done in the paragraph below, "Run Java Application Scripts":


Works in Chrome, Firefox, Edge, Safari, IE10+ etc, basically in any browser that supports userscript managers. Exceptions are some of the oldest browsers that do not support the API we use, the script may not be fully functional there.

  • Advanced pop-up detection

PopupBlocker doesn't apply the filtering rules approach to pop-up detection. Instead, it adds an additional layer on top of the browser"s native APIs that are used to create pop-ups. This way, these APIs can only be called when caused by a manual input, and not by pop-up/pop-under scripts. That allows to block pop-ups even on websites that try to bypass regular ad blockers by using WebRTC or varying the ad servers.

  • Restores the expected click behavior

Self-explanatory but important: if a click would cause a pop-up to show, not only the pop-up is blocked, but also the initial click is processed as it would be without the pop-up.

  • Invisible to other scripts

Other scripts on the page can not detect that PopupBlocker is being used, other than by actually trying to open a pop-up. This prevents any possible circumvention of PopupBlocker.

Installation

PopupBlocker is being developed by the same team that develops AdGuard , and AdGuard for Windows can serve as a userscript manager. If you are an AdGuard user, go to Settings – Extensions – Add Extension and add the PopupBlocker .js file there. This way you can use it in literally any browser.

On the other hand, PopupBlocker is an independent project, you can use it with any other userscript manager like Greasemonkey, Tampermonkey or Violentmonkey. Make sure one of them is installed in your browser to be able to use the PopupBlocker, and then hit the green button at the top of the page.

You can also find all PopupBlocker versions, including beta-versions and all past versions,

The number of these queries in the search has increased significantly, especially against the backdrop of a significant increase in the cost of the most famous digital currency, Bitcoin, in a very short time. Buying bitcoins and waiting for the rate to rise is risky, mining cryptocurrency is too costly and often unprofitable. There remains one more way to make a profit, too arrogant and mean - to use the resources of Internet users for mining. Of the latter, the so-called browser mining is now on hearing.

A bit of theory

It would be wrong to say that such a phenomenon has appeared only now. Back in 2011, Symantec announced that mining could be run in a botnet, and Kaspersky Lab discovered malware that connected infected computers to a mining pool. These were special Trojans that literally destroyed even powerful computers. In the next few years, this problem was returned more than once. The most famous case - the developers of the well-known torrent client μTorrent in March 2015 built into the program (version 3.4.2 build 28913) a hidden EpicScale module that used computer resources for calculations during idle time. After massive user outrage, the developers had to remove it from the installation file.
A completely logical question arises: why has no one thought of doing hidden mining in the browser before? After all, this method does not require special equipment, and the audience of many sites exceeds tens of millions of visitors. It turned out that everything is very simple. A few years ago, the extraction of digital currency was a specific occupation, mostly only bitcoins were mined, which required, and still requires, the presence of ASIC processors and certain video cards. With the popularization of mining, new cryptocurrencies began to appear, for example, Feathercoin, Litecoin and Monero, the extraction of which, thanks to special hashing algorithms, does not require such capacities.

Because of what all the fuss

Browser mining appeared against the backdrop of a massive craze for cryptocurrencies and their mining. Some see this as an alternative to advertising on websites, while others see it as a tricky way to make money at the expense of visitors to web resources. But both those and others are not yet ready to play by the rules. The process of mining in the browser can be characterized by the proverb “both the wolves are full and the sheep are safe”. If earlier for such purposes hackers used trojans that infected the computer, now it is enough to add a special code to the site page and while the user is on this page, his computer is mining cryptocurrency. And no matter where this code will be registered, you can even insert it into an advertising banner. All that is required from the "victim" is a browser with active JavaScript.

A loud scandal that angered the entire Internet community was the recent case of The Pirate Bay, the largest torrent resource, using a hidden miner on its web pages. After the exposure, the owners of the site admitted that they just wanted to experiment with mining as a new method of monetization. In the code of some pages of The Pirate Bay, users found lines with a Coinhive script that generates the Monero cryptocurrency.


By the way, on the Coinhive website they quite openly offer their services for embedding a JavaScript miner on web pages - anyone can do this. At the same time, the developers themselves position their miner as an alternative to advertising and oppose its hidden embedding without warning users. Last month, the authors of the miner Coinhive reported a record-breaking simultaneous connection of more than 2.2 million users in the first week of its existence. The total power at the same time amounted to 13.5 megahash per second, which is approximately 5% of the entire Monero network.


The new trend began to quickly gain momentum, and information about it has already appeared on the network, which forced users' computers to mine the Monero cryptocurrency. The SafeBrowse extension used the same Coinhive script.

Specialists of the antivirus company ESET identify miners hidden in the page code as malware and classify them as malvertising (malicious advertising). They conducted a study in which they found out that sites with such scripts are mainly located in Russia, Ukraine and Belarus.


In truth, Coinhive is far from the only service of its kind. There are other sites that sell ready-made scripts for mining in the browser. This suggests that such services are in demand.

How much can you earn hidden mining in the browser

The creators of the Chain media channel in Telegram tried to answer this question using the example of a ready-made Coinhive script. According to their calculations, if you continuously mine Monero through the browser with only one processor, you will get somewhere around $15 per year. Considering The Pirate Bay's traffic (more than 300 million visits per month) and the average time spent on the site (5.17 minutes), the income is in the range of $47,000 per month. If, according to this principle, we calculate how much the well-known resource Pornhub can earn, it comes out to be quite a decent amount - $ 20 thousand per day.


Thus, it makes sense for large sites with online games and media content. Otherwise, this method will not bring much income. In particular, information resources can earn much more from advertising, press releases and custom articles than from hidden mining in the browser.

How to protect yourself from browser mining

So we come to the main question. If you often play browser games, watch movies and series online, disappear for a long time on large resources and at the same time notice how your computer starts to slow down, it is likely that it is now mining someone's cryptocurrency. There are several ways to protect yourself from this.

By disabling JavaScript
The easiest way is to disable JavaScript on websites in your browser settings. On the other hand, this method may cause problems in running scripts on pages, and some sites may not open at all.



Using browser extensions
It is much more convenient to use extensions that can selectively block scripts, such as NoScript (Firefox), ScriptBlock or ScriptSafe (Chrome).

You can also fight mining scripts with the help of ad blockers. The popular AdBlock Plus and UBlock extensions have already added servers accessed by hidden miners to the filter list. If, nevertheless, the script changed the domain and stopped blocking, you will have to make the appropriate changes manually.


There were also special extensions for browsers - anti-miners. Among them is Coinhive on Windows, open the hosts file in notepad, which is located along the path: Windows\System32\drivers\etc.
Add a line at the end of the document 0.0.0.0 coin-hive.com and save your changes.

On Linux, this file can be opened by typing the following command in a terminal: sudo nano /etc/hosts, in Mac OS X - sudo nano /private/etc/hosts. Similarly, you need to do with other miners, but if you know their domains.

Using the Anti-WebMiner utility
In principle, the small Anti-WebMiner utility can do the same job with editing the hosts file for you. This is a Windows program that blocks various web mining scenarios. It redirects domains accessed by scripts. At the same time, the utility allows you to delete the entries that were made by it, thus returning the hosts file to its original state. Anti-WebMiner is suitable for those users who do not know what hosts is and what it is for.

Eventually

In general, hidden mining in the browser is like another direction on the Internet, where you can quickly and easily earn extra money. At least, many want to believe it. The saddest thing is that everyone and sundry is already resorting to this method, even small online stores and sites with a small audience. If the phenomenon becomes widespread, then a more serious decision will be required at the level of search engines or the browsers themselves.

Cryptocurrency miners on websites have become a real problem. Recently even The Pirate Bay such a monetization option. The first services like Coinhive have appeared, which encourage website owners to install miners and earn money without banners and advertising. According to their calculations, a typical website visitor on an average laptop generates 30 hashes per second. For The Pirate Bay with an average session time of 5 minutes and a monthly audience of 315 million people, this gives 30x300x315000000 = 2,835,000 megahashes per month.

If you treat people humanely and load the processor at only 30%, then there are 850,000 megahashes left. Coinhive pays website owners 0.00015 XMR per million hashes, so The Pirate Bay could earn 127.5 XMR ($12,000) per month and completely kill his reputation in the eyes of users.

Unfortunately, more and more sites are choosing this monetization option. Sometimes mining scripts penetrate websites without the knowledge of the owners themselves. One such story was recently told by one of the Habr users. He accidentally discovered the miner on a small Russian website selling pet products.

Even worse, attackers have begun to embed hidden miners directly into browser extensions so that they can run continuously, stealing computing resources from computers. For example, the SafeBrowse extension with a miner was distributed through the official Chrome Web Store for several days before it was removed. Two extensions with miners have been released for Firefox.

Naturally, we are not happy about this prospect. From the point of view of an ordinary person, the main problem is how to protect yourself from these miners so that they do not load the processor, slow down the computer and devour electricity.

Users of the ad blocker uBlock Origin have been discussing the issue on GitHub for several weeks and maintain a list of malicious domains to block. Unfortunately, recently miner scripts have started randomly changing domains, so you won't be able to block scripts that easily unless you disable JavaScript in your browser altogether.


A mining script that uses random domains is difficult to block with standard blockers

However, scripts with random domains are still rare. You can protect yourself from most mining scripts by blocking at least the most popular domains in hosts - and keeping the list up to date, adding new domains as they are discovered. Recently, a free program Anti-WebMiner appeared that does just this: its authors add to the list of mining domains on GitHub, and the program itself adds these domains to the hosts file.

This can also be done manually. The list currently includes 16 domains, including that of the aforementioned Coinhive, although it bills itself as a legitimate service for website owners:

# Anti-WebMiner Start 1.0 43011
0.0.0.0 azvjudwr.info
0.0.0.0 cnhv.co
0.0.0.0 coin-hive.com
0.0.0.0 gus.host
0.0.0.0 jroqvbvw.info
0.0.0.0 jsecoin.com
0.0.0.0 jyhfuqoh.info
0.0.0.0 kdowqlpt.info
0.0.0.0 listat.biz
0.0.0.0 lmodr.biz
0.0.0.0 mataharirama.xyz
0.0.0.0 minecrunch.co
0.0.0.0 minemytraffic.com
0.0.0.0 miner.pr0gramm.com
0.0.0.0 reasedoper.pw
0.0.0.0 xbasfbno.info
# Anti-WebMiner End

Although no one bothers you to edit hosts manually, with this utility updating the list of domains and making changes to hosts is faster and more convenient.

You can also manually enter a list of “banned” domains into the ad blocking program you use.

There are other options for blocking mining scripts. For example, the No Coin extension for Chrome (source code on GitHub).


The No Coin extension detected a mining script on the site

This extension monitors activity on each site and alerts you if a mining script is detected on it. This approach even helps against scripts with random domains. Plus, here you can whitelist the site if you really want to donate some CPU time to it. For example, many users The Pirate Bay in the comments to the news about testing a mining script, they expressed the opinion that they would not mind helping their favorite site with their CPU time. Over the past year, this torrent tracker collected only $3,500 in donations, and through a mining script it can collect $12,000 per month without people having to part with money (at least not directly). People download warez, free music and movies here, so why not give something back.

Another minerBlock extension for Chrome works on the same principle as No Coin. It is also distributed as open source, so you don’t have to worry that the miner blocker itself is quietly mining cryptocurrency.

But still, the most reliable way to block mining scripts is to install an extension that generally blocks the execution of any scripts, like NoScript for Firefox.