{"id":85205,"date":"2017-11-24T12:51:16","date_gmt":"2017-11-24T07:21:16","guid":{"rendered":"https:\/\/blogs_admin.quickheal.com\/?p=85205"},"modified":"2017-11-24T12:58:41","modified_gmt":"2017-11-24T07:28:41","slug":"massive-campaign-delivering-monero-miner-via-compromised-websites-analysis-quick-heal-security-labs","status":"publish","type":"post","link":"https:\/\/www.quickheal.com\/blogs\/massive-campaign-delivering-monero-miner-via-compromised-websites-analysis-quick-heal-security-labs\/","title":{"rendered":"Massive campaign delivering Monero Miner via compromised websites \u2013 an analysis by Quick Heal Security Labs"},"content":{"rendered":"<p>Ransomware outbreaks have been on the rise for quite some time now but suddenly we are observing a change in this trend. \u00a0Seems like the rise observed in cryptocurrency valuations especially for Bitcoins is making attackers to go after <a href=\"https:\/\/en.wikipedia.org\/wiki\/Cryptocurrency\">cryptocurrency<\/a> mining. Cryptocurrency miner malware have become hot attack vectors for cybercriminals. By looking at the current complexities of mining, a mining pool of computers is needed for effective mining of cryptocurrencies. To achieve this, cybercriminals are attacking end users&#8217; machines with miner malware with the aim of creating mining pools. This type of mining attacks can be termed as <strong>distributed mining<\/strong>.<\/p>\n<p>In this blog post, we will be talking about an ongoing distributed mining campaign targeted towards mining of cryptocurrency called <a href=\"https:\/\/en.wikipedia.org\/wiki\/Monero_(cryptocurrency)\">Monero<\/a>. Monero (XMR) is an open source cryptocurrency which was launched in April 2014. Cryptocurrency mining requires massive computation power. Cybercriminals are misusing the processing power of end user devices to mine targeted cryptocurrency. In order to achieve this, hackers are compromising several websites mostly hosted on WordPress to deliver the Monero miner.<\/p>\n<p><strong><em>As per the telemetry received at Quick Heal Security Labs, the compromised websites include those of Government, Pharmaceuticals, and Educational institutions.<\/em><\/strong><\/p>\n<p><strong>Attack chain<\/strong><\/p>\n<p>This infographic depicts the attack chain of this campaign.<\/p>\n<figure id=\"attachment_85208\" aria-describedby=\"caption-attachment-85208\" style=\"width: 960px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-85208 size-full\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/11\/a_chain.png\" alt=\"Fig 1: Attack Chain\" width=\"960\" height=\"720\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/a_chain.png 960w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/a_chain-300x225.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/a_chain-768x576.png 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/a_chain-520x390.png 520w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/a_chain-789x592.png 789w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><figcaption id=\"caption-attachment-85208\" class=\"wp-caption-text\">Fig 1: Attack Chain<\/figcaption><\/figure>\n<p>In this campaign, websites with known vulnerabilities are being targeted. Once exploited, a malicious obfuscated JavaScript is injected into web pages. When a user visits such compromised websites, the injected JavaScript lures them into downloading a fake font update. On execution of the fake font update, it downloads the Monero miner and executes on user\u2019s system. This attack is currently only targeting users of Google Chrome and Firefox browser.<\/p>\n<p>Let\u2019s deep dive into the various phases of this attack. The below fiddler session capture shows the attack sequence. <strong><em>The attack sequence is that of a compromised website of a Pharmaceutical company<\/em><\/strong><em>.<\/em><\/p>\n<figure id=\"attachment_85209\" aria-describedby=\"caption-attachment-85209\" style=\"width: 1364px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-85209 size-full\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/11\/Fiddler_1_censored.jpg\" alt=\"Fig 2: Fiddler Capture (Shortened Version)\" width=\"1364\" height=\"613\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/Fiddler_1_censored.jpg 1364w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/Fiddler_1_censored-300x135.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/Fiddler_1_censored-768x345.jpg 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/Fiddler_1_censored-650x292.jpg 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/Fiddler_1_censored-789x355.jpg 789w\" sizes=\"(max-width: 1364px) 100vw, 1364px\" \/><figcaption id=\"caption-attachment-85209\" class=\"wp-caption-text\">Fig 2: Fiddler Capture (Shortened Version)<\/figcaption><\/figure>\n<p>The injected JavaScript on execution pops up a window to update the font. The analysis was carried out on a Google Chrome browser during which we saw a pop-up to update \u201cChrome Font Pack\u201d. Fig 3. shows the pop-up window.<\/p>\n<figure id=\"attachment_85210\" aria-describedby=\"caption-attachment-85210\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-85210\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/11\/Fig2-pop-up_censored-650x351.jpg\" alt=\"Fig 3. Pop-up window which asks user to update Fake Font\" width=\"650\" height=\"351\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/Fig2-pop-up_censored-650x351.jpg 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/Fig2-pop-up_censored-300x162.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/Fig2-pop-up_censored-768x415.jpg 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/Fig2-pop-up_censored-789x426.jpg 789w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/Fig2-pop-up_censored.jpg 837w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><figcaption id=\"caption-attachment-85210\" class=\"wp-caption-text\">Fig 3. Pop-up window which asks user to update Fake Font<\/figcaption><\/figure>\n<p>When the update button is clicked on, it pops up an instruction page on the screen. It also downloads a malicious ZIP file to Google Chrome\u2019s default download directory. The instructions displayed on the pop-up window asks the user to execute the file.<\/p>\n<figure id=\"attachment_85211\" aria-describedby=\"caption-attachment-85211\" style=\"width: 549px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-85211\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/11\/Fig3-font-update_censored-549x390.jpg\" alt=\"Fig 4. Pop up window with instructions and downloads malicious ZIP file\" width=\"549\" height=\"390\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/Fig3-font-update_censored-549x390.jpg 549w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/Fig3-font-update_censored-300x213.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/Fig3-font-update_censored-768x545.jpg 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/Fig3-font-update_censored-789x560.jpg 789w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/Fig3-font-update_censored.jpg 842w\" sizes=\"(max-width: 549px) 100vw, 549px\" \/><figcaption id=\"caption-attachment-85211\" class=\"wp-caption-text\">Fig 4. Pop up window with instructions and downloads malicious ZIP file<\/figcaption><\/figure>\n<p>The downloaded ZIP file i.e., \u2018ttf.zip\u2019 consists of a malicious \u2018ttf.js\u2019 file. When the user clicks on \u2018ttf.js\u2019 it gets executed by \u2018cscript.exe\u2019 and downloads the malicious executable i.e., Monero miner.<\/p>\n<p><strong>JavaScript analysis<\/strong><\/p>\n<p>The Injected JavaScript is obfuscated. It consists of a de-obfuscation routine and a long string which is encoded with Base64.<\/p>\n<figure id=\"attachment_85212\" aria-describedby=\"caption-attachment-85212\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-85212\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/11\/Injected_script-650x276.png\" alt=\"Fig 5. Injected JavaScript into Compromised Website \" width=\"650\" height=\"276\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/Injected_script-650x276.png 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/Injected_script-300x127.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/Injected_script-768x326.png 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/Injected_script-789x335.png 789w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/Injected_script.png 1346w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><figcaption id=\"caption-attachment-85212\" class=\"wp-caption-text\">Fig 5. Injected JavaScript into Compromised Website<\/figcaption><\/figure>\n<p>The de-obfuscation of the above-injected JavaScript reveals the below code.<\/p>\n<figure id=\"attachment_85214\" aria-describedby=\"caption-attachment-85214\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-85214\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/11\/de-obfuscated_script-650x192.png\" alt=\"Fig 6. De-obfuscated version of injected JavaScript\" width=\"650\" height=\"192\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/de-obfuscated_script-650x192.png 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/de-obfuscated_script-300x89.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/de-obfuscated_script-768x227.png 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/de-obfuscated_script-789x233.png 789w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/de-obfuscated_script.png 1359w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><figcaption id=\"caption-attachment-85214\" class=\"wp-caption-text\">Fig 6. De-obfuscated version of injected JavaScript<\/figcaption><\/figure>\n<p>As spotted in above Fig 6, it redirects the user to below malicious URL.<\/p>\n<p>\u201chxxp:\/\/bmooc[.]net\/wp-content\/service\/cat[.]php?m=f\u201d.<\/p>\n<p>The above URL fetches another malicious JavaScript code which looks like the below.<\/p>\n<figure id=\"attachment_85215\" aria-describedby=\"caption-attachment-85215\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-85215\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/11\/cat_php_js-650x292.png\" alt=\"Fig 7. Malicious JavaScript which loads Pop-up window\" width=\"650\" height=\"292\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/cat_php_js-650x292.png 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/cat_php_js-300x135.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/cat_php_js-768x346.png 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/cat_php_js-789x355.png 789w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/cat_php_js.png 1338w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><figcaption id=\"caption-attachment-85215\" class=\"wp-caption-text\">Fig 7. Malicious JavaScript which loads Pop-up window<\/figcaption><\/figure>\n<p>The above malicious JavaScript loads the pop-up window on only Google Chrome and Firefox browsers. This, in turn, prompts the user to download the fake font update i.e., \u2018ttf.zip\u2019 file and gives instructions on how to install it.<\/p>\n<p><strong>Monero miner post-infection activity<\/strong><\/p>\n<p>On successful execution, the Monero miner generates the below post-infection traffic.<\/p>\n<figure id=\"attachment_85216\" aria-describedby=\"caption-attachment-85216\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-85216\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/11\/post-infection-650x246.png\" alt=\"Fig 8. Post infection traffic of Monero Miner\" width=\"650\" height=\"246\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/post-infection-650x246.png 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/post-infection-300x113.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/post-infection-768x290.png 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/post-infection-789x298.png 789w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/11\/post-infection.png 868w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><figcaption id=\"caption-attachment-85216\" class=\"wp-caption-text\">Fig 8. Post infection traffic of Monero Miner<\/figcaption><\/figure>\n<p>At the time of analysis, the CnC server did not respond as expected.<\/p>\n<p>Using the old trick of compromising websites with known vulnerabilities turns out to be an effective way of mass infection. This campaign also makes use of compromised websites in order to infect mass users with Monero miner. This forms distributed network of Monero miners. To solve the complex job of mining digital currency, such distributed networks of miner pools turns out to be an effective tool. We advise our users to stay protected by keeping their <a href=\"https:\/\/bit.ly\/2ncPU26\">antivirus<\/a> up to date with the latest security updates.<\/p>\n<p><strong>Indicators of compromise<\/strong><\/p>\n<p>bmooc[.]net<br \/>\nbuyorganicvisitors[.]com<br \/>\n47D3C7B7510F7AA962B184CBF41EF630<\/p>\n<p><strong>Subject Matter Experts<\/strong><\/p>\n<p>Pradeep Kulkarni | Prashant Tilekar, Quick Heal Security Labs<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ransomware outbreaks have been on the rise for quite some time now but suddenly we are observing a change in this trend. \u00a0Seems like the rise observed in cryptocurrency valuations especially for Bitcoins is making attackers to go after cryptocurrency mining. Cryptocurrency miner malware have become hot attack vectors for cybercriminals. By looking at the [&hellip;]<\/p>\n","protected":false},"author":31,"featured_media":85218,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[719,998,1535,1534,1533,561],"class_list":["post-85205","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-malware","tag-bitcoin","tag-compromised-websites","tag-malicious-javascripts","tag-miner","tag-monero","tag-vulnerabilities"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/85205"}],"collection":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/users\/31"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/comments?post=85205"}],"version-history":[{"count":7,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/85205\/revisions"}],"predecessor-version":[{"id":85221,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/85205\/revisions\/85221"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/media\/85218"}],"wp:attachment":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/media?parent=85205"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/categories?post=85205"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/tags?post=85205"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}