{"id":11851,"date":"2018-03-26T08:10:02","date_gmt":"2018-03-26T16:10:02","guid":{"rendered":"http:\/\/www.palada.net\/index.php\/2018\/03\/26\/news-5620\/"},"modified":"2018-03-26T08:10:02","modified_gmt":"2018-03-26T16:10:02","slug":"news-5620","status":"publish","type":"post","link":"http:\/\/www.palada.net\/index.php\/2018\/03\/26\/news-5620\/","title":{"rendered":"Malicious cryptomining and the blacklist conundrum"},"content":{"rendered":"<p><strong>Credit to Author: J\u00e9r\u00f4me Segura| Date: Mon, 26 Mar 2018 15:00:00 +0000<\/strong><\/p>\n<p>When Coinhive first came out in September of 2017, it was fairly easy to identify websites using browser miners by looking for a few lines referencing the Coinhive API within the HTML source code. Because this was a new phenomenon, even bad actors didn&#8217;t have to hide their intentions, and\u00a0<a href=\"https:\/\/blog.malwarebytes.com\/cybercrime\/2017\/11\/a-look-into-the-global-drive-by-cryptocurrency-mining-phenomenon\/\" target=\"_blank\" rel=\"noopener\">collecting statistics<\/a> was a fairly straightforward and accurate process.<\/p>\n<p>But as ad blockers and security companies started to detect and block Coinhive, criminals went to greater lengths to mask their code. Our friends over at <a href=\"https:\/\/twitter.com\/sucurisecurity\" target=\"_blank\" rel=\"noopener\">Sucuri<\/a> have reported extensively on\u00a0<a href=\"https:\/\/blog.sucuri.net\/2017\/10\/cryptominers-on-hacked-sites-part-2.html\" target=\"_blank\" rel=\"noopener\">compromised websites<\/a> running different flavors of Content Management Systems injected with creatively obfuscated versions of the silent Coinhive API.<\/p>\n<p>Proxies also became more and more common, not to mention a growing number of new Coinhive-like services. Ultimately, maintaining a blacklist became a bigger\u2014although somewhat expected\u2014challenge.<\/p>\n<p>In this blog, we take a look at an evasion technique used by miners to bypass list-based blockers and behavior-based detection by avoiding maxing out the user&#8217;s CPU. This kind of evasion is nothing new for those tracking malware campaigns, but it shows that it can be successfully applied to cryptomining as well.<\/p>\n<p><a href=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/miner_bypass.gif\" data-rel=\"lightbox-0\" title=\"\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"22598\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2018\/03\/malicious-cryptomining-and-the-blacklist-conundrum\/attachment\/miner_bypass\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/miner_bypass.gif\" data-orig-size=\"723,546\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"miner_bypass\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/miner_bypass-300x227.gif\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/miner_bypass-600x453.gif\" class=\"size-full wp-image-22598 aligncenter\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/miner_bypass.gif\" alt=\"\" width=\"723\" height=\"546\" \/><\/a><\/p>\n<h3>Evading blacklists<\/h3>\n<p>The site in question alternates between two different versions of its miner to guarantee maximum exposure. The &#8220;classic&#8221; one makes a clear reference to <em>coinhive[.]com,<\/em> which can easily be detected and blocked. The second one is similar in syntax but instead uses a different hostname (<em>npcdn1[.]now[.]sh<\/em>). While it may not seem like a big difference, it&#8217;s enough to bypass the majority of blacklists.<\/p>\n<p><a href=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/injected_content.png\" data-rel=\"lightbox-1\" title=\"\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"22599\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2018\/03\/malicious-cryptomining-and-the-blacklist-conundrum\/attachment\/injected_content\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/injected_content.png\" data-orig-size=\"956,368\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"injected_content\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/injected_content-300x115.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/injected_content-600x231.png\" class=\"size-full wp-image-22599 aligncenter\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/injected_content.png\" alt=\"\" width=\"956\" height=\"368\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/injected_content.png 956w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/injected_content-300x115.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/injected_content-600x231.png 600w\" sizes=\"auto, (max-width: 956px) 100vw, 956px\" \/><\/a><\/p>\n<p>Now.sh is a legitimate cloud deployment service for applications built with JavaScript (NodeJS) or Docker where anyone can join for free. Just like other cloud platforms (AWS, Google, Azure), it is impractical to put a block on the domain name or IP address\u00a0without affecting countless other legitimate applications. Instead, the block must be done on the fully qualified domain name (FQDN), for instance <em>npcdn1[.]now[.]sh<\/em>.<\/p>\n<p>As described by <a href=\"https:\/\/twitter.com\/unmaskparasites\" target=\"_blank\" rel=\"noopener\">Denis Sinegubko<\/a> of Sucuri in a blog post about <a href=\"https:\/\/blog.sucuri.net\/2018\/01\/malicious-cryptominers-from-github-part-2.html\" target=\"_blank\" rel=\"noopener\">malicious miners from GitHub<\/a>, this case is part of a fake JQuery campaign running self-hosted DeepMiner web apps. Threat actors are abusing\u00a0platform-as-a-service (PaaS) solutions in order to not only evade blacklists but also to avoid paying the 30 percent Coinhive commission by selecting the Monero mining pool of their choice.<\/p>\n<p><a href=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/traffic_diff.png\" data-rel=\"lightbox-2\" title=\"\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"22600\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2018\/03\/malicious-cryptomining-and-the-blacklist-conundrum\/attachment\/traffic_diff\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/traffic_diff.png\" data-orig-size=\"722,390\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"traffic_diff\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/traffic_diff-300x162.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/traffic_diff-600x324.png\" class=\"size-full wp-image-22600 aligncenter\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/traffic_diff.png\" alt=\"\" width=\"722\" height=\"390\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/traffic_diff.png 722w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/traffic_diff-300x162.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/traffic_diff-600x324.png 600w\" sizes=\"auto, (max-width: 722px) 100vw, 722px\" \/><\/a><\/p>\n<p>The problem lies with essentially chasing an unlimited number of subdomains in what rapidly becomes a whack-a-mole game. As we were working on this blog, a new one (<em>sxcdn3.now.sh<\/em>) had just popped up and was still undetected by many of the publicly available blocklists.<\/p>\n<h3>Watching for CPU usage<\/h3>\n<p>Another way to detect browser miners is to monitor for CPU usage and essentially detect offending tabs that are consuming most of the processor&#8217;s cycles. This is a common behavior among most miners (malware or browser-based), where threat actors run unthrottled code without worrying about slowing down the visitor&#8217;s computer.<\/p>\n<p>Since abusing the CPU can be a way to trigger cryptomining detection, threat actors will often throttle their miner to run below a certain threshold so that it blends in with normal activity. This was the case here, with the miner hovering around 80 percent CPU usage, which could very well have been generated by playing an online game.<\/p>\n<p><a href=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/CPU.png\" data-rel=\"lightbox-3\" title=\"\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"22603\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2018\/03\/malicious-cryptomining-and-the-blacklist-conundrum\/attachment\/cpu-4\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/CPU.png\" data-orig-size=\"882,860\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"CPU\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/CPU-300x293.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/CPU-600x585.png\" class=\"size-full wp-image-22603 aligncenter\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/CPU.png\" alt=\"\" width=\"882\" height=\"860\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/CPU.png 882w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/CPU-300x293.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/CPU-600x585.png 600w\" sizes=\"auto, (max-width: 882px) 100vw, 882px\" \/><\/a><\/p>\n<h3>Conclusion<\/h3>\n<p>The malicious cryptomining landscape is evolving at a rapid pace and forcing defenders to come up with new ways of proactively detecting and blocking this threat. Identifying server compromises requires more time spent deobfuscating suspicious looking scripts while at the same time coming up with more generic detection rules.<\/p>\n<p>For end users, ad blockers and web blocking, in general, are still one of the best means to defeat cryptominers, but they also require constant updates to keep them at bay. It is important to understand the different mechanisms used by threat actors and in turn develop the most effective mitigation techniques.<\/p>\n<p><a href=\"https:\/\/www.malwarebytes.com\/\" target=\"_blank\" rel=\"noopener\">Malwarebytes<\/a> identifies and blocks domains or proxies involved in cryptomining activity but also flags sites that may be using evasion techniques to bypass standard blacklisting approaches.<\/p>\n<h3>Indicators of compromise<\/h3>\n<pre>mxcdn1[.]now.sh  mxcdn2[.]now.sh  npcdn1[.]now.sh  sxcdn02[.]now.sh  sxcdn3[.]now.sh  sxcdn4[.]now.sh  sxcdn6[.]now.sh<\/pre>\n<p>The post <a rel=\"nofollow\" href=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2018\/03\/malicious-cryptomining-and-the-blacklist-conundrum\/\">Malicious cryptomining and the blacklist conundrum<\/a> appeared first on <a rel=\"nofollow\" href=\"https:\/\/blog.malwarebytes.com\">Malwarebytes Labs<\/a>.<\/p>\n<p><a href=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2018\/03\/malicious-cryptomining-and-the-blacklist-conundrum\/\" target=\"bwo\" >https:\/\/blog.malwarebytes.com\/feed\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><strong>Credit to Author: J\u00e9r\u00f4me Segura| Date: Mon, 26 Mar 2018 15:00:00 +0000<\/strong><\/p>\n<table cellpadding='10'>\n<tr>\n<td valign='top' align='center'><a href='https:\/\/blog.malwarebytes.com\/threat-analysis\/2018\/03\/malicious-cryptomining-and-the-blacklist-conundrum\/' title='Malicious cryptomining and the blacklist conundrum'><img src='https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2018\/03\/shutterstock_758242897.jpg' border='0'  width='300px'  \/><\/a><\/td>\n<\/tr>\n<tr>\n<td valign='top' align='left'>When threat actors take to free and disposable cloud services, the battle against malicious cryptomining becomes a lot more difficult.<\/p>\n<p>Categories: <\/p>\n<ul class=\"post-categories\">\n<li><a href=\"https:\/\/blog.malwarebytes.com\/category\/threat-analysis\/cryptomining\/\" rel=\"category tag\">Cryptomining<\/a><\/li>\n<li><a href=\"https:\/\/blog.malwarebytes.com\/category\/threat-analysis\/\" rel=\"category tag\">Threat analysis<\/a><\/li>\n<\/ul>\n<p>Tags: <a href=\"https:\/\/blog.malwarebytes.com\/tag\/adblockers\/\" rel=\"tag\">adblockers<\/a><a href=\"https:\/\/blog.malwarebytes.com\/tag\/blacklist\/\" rel=\"tag\">blacklist<\/a><a href=\"https:\/\/blog.malwarebytes.com\/tag\/coinhive\/\" rel=\"tag\">coinhive<\/a><a href=\"https:\/\/blog.malwarebytes.com\/tag\/cryptominers\/\" rel=\"tag\">cryptominers<\/a><a href=\"https:\/\/blog.malwarebytes.com\/tag\/cryptomining\/\" rel=\"tag\">cryptomining<\/a><a href=\"https:\/\/blog.malwarebytes.com\/tag\/github\/\" rel=\"tag\">GitHub<\/a><\/p>\n<table width='100%'>\n<tr>\n<td align=right>\n<p><b>(<a href='https:\/\/blog.malwarebytes.com\/threat-analysis\/2018\/03\/malicious-cryptomining-and-the-blacklist-conundrum\/' title='Malicious cryptomining and the blacklist conundrum'>Read more&#8230;<\/a>)<\/b><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/td>\n<\/tr>\n<\/table>\n<p>The post <a rel=\"nofollow\" href=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2018\/03\/malicious-cryptomining-and-the-blacklist-conundrum\/\">Malicious cryptomining and the blacklist conundrum<\/a> appeared first on <a rel=\"nofollow\" href=\"https:\/\/blog.malwarebytes.com\">Malwarebytes Labs<\/a>.<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[10488,10378],"tags":[17915,17916,15078,15826,15080,11863,10494],"class_list":["post-11851","post","type-post","status-publish","format-standard","hentry","category-malwarebytes","category-security","tag-adblockers","tag-blacklist","tag-coinhive","tag-cryptominers","tag-cryptomining","tag-github","tag-threat-analysis"],"_links":{"self":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/11851","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/comments?post=11851"}],"version-history":[{"count":0,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/11851\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/media?parent=11851"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/categories?post=11851"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/tags?post=11851"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}