# MinerGuard: A Solution to Detect Browser-Based Cryptocurrency Mining through Machine Learning
## 1 Introduction
The above approaches decrease the effectiveness of static blacklist mechanisms in mining page detection. The CPU is a reasonably user-friendly tool for users to monitor; this system would be built on a CPU detection tool. After navigating to the \"Job Manager,\" users may utilize the \"Processors\" option at the top. To see the Windows processors in the background, click \"More Details\" at the bottom of this Table To sort by CPU consumption, locate the CPU column towards the top of the Handler tab and click on it. Malware is likely creating the issue by impersonating a typical Windows processor if CPU processor difficulties continue using many resources. Some malware masquerades as well-known names in the task manager, such as \"Cortana.exe\" or \"Runtime Broker,\" and consumes CPU and GPU bandwidth for various reasons (such as virtual currency mining). There are instances when it could not utilize mining but still uses a significant amount of CPU power, such as while playing certain games, using streaming or video-based programs, conducting antivirus scans, or browsing through several browser tabs. If you often experience excessive CPU consumption, you should shut down any background applications and open accounts. Then, check the task manager to see if anything has changed. When multitasking, a high CPU consumption is typical. Modern CPUs divide the processing power across many processor cores to handle multiplexed circumstances while using several instruction sets. If you want to achieve significant efficiency while using CPU-intensive software like Adobe Premiere, you may need to employ all of the cores that are now accessible. This paper proposed a solution called MinerGuard to protect browsers against mining kidnapping attacks. We implemented MinerGuard as a Chrome plug-in to evaluate its effectiveness and efficiency. Because mining operations require much computation, these operations consume plenty of electric power. Based on this phenomenon, the mining page identification mechanism of MinerGuard uses the CPU resource consumption of a browser when rendering a web page as a criterion to decide whether the web page contains a mining script. MinerGuard uses machine learning techniques to distinguish between regular web pages and possible mining pages. To demonstrate the effectiveness of MinerGuard, we conducted extensive experiments. We used 140 websites without mining scripts and 75 websites with hidden mining scripts as a dataset to train our machine learning model. Then, 800 websites were used to evaluate the effectiveness of MinerGuard. Experimental results show that MinerGuard is more accurate than the blacklist mechanism, and MinerGuard does not require manual updates, while the blacklist mechanism needs to update its blacklist constantly. Section 5 gives detailed experiment results. In summary, MinerGuard has made the following contributions:  
* Compared with the blacklist mechanism, MinerGuard does not need to update its data frequently, saving human resources and cost. * MinerGuard has an accurate detection rate of 99%. * MinerGuard allows a browser user to dynamically decide whether his browser can visit a web page that contains mining JavaScript code. Some websites ask browser users whether they can use the users' hosts to mine cryptocurrencies. If a user agrees to let a website perform the mining, MinerGuard will not block related web pages, but the blacklist mechanism still secures all associated web pages. The rest of this paper is organized as follows. Section 2 describes the background knowledge required to study this paper. Section 3 discusses related work, which introduces other related defense mechanisms of Browser-Based Cryptocurrency Mining. Section 4 describes MinerGuard's system architecture and implementation details. Section 5 evaluates the detection accuracy of MinerGuard. Section 6 introduces the advantages and disadvantages of MinerGuard. This section also discusses the limitations and prospects of MinerGuard. Section 7 concludes this paper.