MinerGuard: A Solution to Detect Browser-Based Cryptocurrency Mining through Machine Learning

Min Hao Wu, Yen Jung Lai, Yan Ling Hwang, Ting Cheng Chang, Fu Hau Hsu

Research output: Contribution to journalArticlepeer-review

6 Scopus citations


Coinhive released its browser-based cryptocurrency mining code in September 2017, and vicious web page writers, called vicious miners hereafter, began to embed mining JavaScript code into their web pages, called mining pages hereafter. As a result, browser users surfing these web pages will benefit mine cryptocurrencies unwittingly for the vicious miners using the CPU resources of their devices. The above activity, called Cryptojacking, has become one of the most common threats to web browser users. As mining pages influence the execution efficiency of regular programs and increase the electricity bills of victims, security specialists start to provide methods to block mining pages. Nowadays, using a blocklist to filter out mining scripts is the most common solution to this problem. However, when the number of new mining pages increases quickly, and vicious miners apply obfuscation and encryption to bypass detection, the detection accuracy of blacklist-based or feature-based solutions decreases significantly. This paper proposes a solution, called MinerGuard, to detect mining pages. MinerGuard was designed based on the observation that mining JavaScript code consumes a lot of CPU resources because it needs to execute plenty of computation. MinerGuard does not need to update data used for detection frequently. On the contrary, blacklist-based or feature-based solutions must update their blocklists frequently. Experimental results show that MinerGuard is more accurate than blacklist-based or feature-based solutions in mining page detection. MinerGuard’s detection rate for mining pages is 96%, but MinerBlock, a blacklist-based solution, is 42.85%. Moreover, MinerGuard can detect 0-day mining pages and scripts, but the blacklist-based and feature-based solutions cannot.

Original languageEnglish
Article number9838
JournalApplied Sciences (Switzerland)
Issue number19
StatePublished - Oct 2022


  • JavaScript miner
  • bitcoin
  • browser-based cryptocurrency mining
  • cryptojacking
  • machine learning
  • monero


Dive into the research topics of 'MinerGuard: A Solution to Detect Browser-Based Cryptocurrency Mining through Machine Learning'. Together they form a unique fingerprint.

Cite this