{"id":86634,"date":"2018-08-09T14:16:11","date_gmt":"2018-08-09T08:46:11","guid":{"rendered":"https:\/\/blogs_admin.quickheal.com\/?p=86634"},"modified":"2018-08-09T14:16:11","modified_gmt":"2018-08-09T08:46:11","slug":"cryptocurrency-miner-hits-iot-devices-mostly-affects-brazil-russia","status":"publish","type":"post","link":"https:\/\/www.quickheal.com\/blogs\/cryptocurrency-miner-hits-iot-devices-mostly-affects-brazil-russia\/","title":{"rendered":"Cryptocurrency miner hits IoT devices, mostly affects Brazil and Russia!"},"content":{"rendered":"<p>According to a <a href=\"https:\/\/www.trustwave.com\/Resources\/SpiderLabs-Blog\/Mass-MikroTik-Router-Infection-\u2013-First-we-cryptojack-Brazil,-then-we-take-the-World-\/\">blogpost<\/a> published on Aug 1, 2018, 200,000 routers in Brazil were compromised to deliver Cryptocurrency mining scripts to mine Monero (XMR) cryptocurrency. Hackers compromised the vulnerable MikroTik routers by injecting CoinHive scripts into the routers web pages in order to carry out the mass Cryptocurrency miner attack. The IDS\/IPS research team at Quick Heal Security Labs was observing the attack and soon started digging into the telemetry to find out the traces of the attack. The data mining effort landed us on traces of the attack observed at our customers which were completely blocked by Quick Heal\u2019s IDS\/IPS solution.<\/p>\n<p>The telemetry data recorded the hits for IDS\/IPS signatures from the period July 30, 2018, to Aug 4, 2018. We did not see hits after Aug 4, 2018. We believe the infected routers were cleaned up and patched against the vulnerability which led to the attack.<\/p>\n<figure id=\"attachment_86635\" aria-describedby=\"caption-attachment-86635\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-86635\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2018\/08\/Hits-650x154.png\" alt=\"Fig 1. IDS\/IPS signature hits\" width=\"650\" height=\"154\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/08\/Hits-650x154.png 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/08\/Hits-300x71.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/08\/Hits-768x182.png 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/08\/Hits-789x187.png 789w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/08\/Hits.png 947w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><figcaption id=\"caption-attachment-86635\" class=\"wp-caption-text\">Fig 1. IDS\/IPS signature hits<\/figcaption><\/figure>\n<p>The compromised URLs accessed were having a typical structure like this:<\/p>\n<p><em>https:\/\/&lt;Router IP Address&gt;\/&lt;Random String&gt;.php<\/em><\/p>\n<p>The sample URL set received in telemetry looks like below.<\/p>\n<figure id=\"attachment_86636\" aria-describedby=\"caption-attachment-86636\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-86636\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2018\/08\/url-650x170.png\" alt=\"Fig 2. Compromised URL telemetry\" width=\"650\" height=\"170\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/08\/url-650x170.png 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/08\/url-300x79.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/08\/url-768x201.png 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/08\/url-789x207.png 789w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/08\/url.png 885w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><figcaption id=\"caption-attachment-86636\" class=\"wp-caption-text\">Fig 2. Compromised URL telemetry<\/figcaption><\/figure>\n<p>At the time of the analysis, the compromised pages did not deliver the Cryptocurrency miner code as most of them were down. A typical injected CoinHive JavaScript looks like the below:<\/p>\n<figure id=\"attachment_86637\" aria-describedby=\"caption-attachment-86637\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-86637\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2018\/08\/coinhive_1-650x54.png\" alt=\"Fig 3. CoinHive Injection\" width=\"650\" height=\"54\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/08\/coinhive_1-650x54.png 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/08\/coinhive_1-300x25.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/08\/coinhive_1-768x64.png 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/08\/coinhive_1-789x65.png 789w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/08\/coinhive_1.png 966w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><figcaption id=\"caption-attachment-86637\" class=\"wp-caption-text\">Fig 3. CoinHive Injection<\/figcaption><\/figure>\n<p>To know more about how CoinHive cryptocurrency works read this <a href=\"https:\/\/blogs.quickheal.com\/browser-cryptojacking-full-throttle-report-quick-heal-security-labs\/\">blogpost<\/a>.<\/p>\n<p>The fingerprint of one the router is shown below which clearly indicates the device being of MikroTik.<\/p>\n<figure id=\"attachment_86638\" aria-describedby=\"caption-attachment-86638\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-86638\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2018\/08\/censys-650x249.png\" alt=\"Fig 4. Fingerprint of compromised IP \u2013 MikroTik device\" width=\"650\" height=\"249\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/08\/censys-650x249.png 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/08\/censys-300x115.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/08\/censys-768x294.png 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/08\/censys.png 784w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><figcaption id=\"caption-attachment-86638\" class=\"wp-caption-text\">Fig 4. Fingerprint of compromised IP \u2013 MikroTik device<\/figcaption><\/figure>\n<p>The most affected country was Brazil followed by Russia. We also saw countries like Vietnam, the Republic of Moldova and the United States being affected.<\/p>\n<figure id=\"attachment_86639\" aria-describedby=\"caption-attachment-86639\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-86639\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2018\/08\/Country-650x379.png\" alt=\"Fig 5. Affected Countries \" width=\"650\" height=\"379\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/08\/Country-650x379.png 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/08\/Country-300x175.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/08\/Country-768x448.png 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/08\/Country.png 780w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><figcaption id=\"caption-attachment-86639\" class=\"wp-caption-text\">Fig 5. Affected Countries<\/figcaption><\/figure>\n<p>This shows the intensity of the mass router compromise which in turn would have affected many users. This also shows the importance of patching the well-known vulnerabilities. There is a challenge to update the routers or IoT devices but we strongly recommend to get familiar with the upgrade process for various IoT devices and regularly update them with the latest patches. Even though the MikroTik had issued a patch against this vulnerability in April 2018, the affected devices were not patched which led to this massive router compromise. To defend against such attacks, it\u2019s really important to patch all sorts of devices.<\/p>\n<p><strong>Quick Heal IDS\/IPS Detection<\/strong><\/p>\n<ul>\n<li>HTTP\/CoinhiveMiner.UN!KP.4461 &#8211; Coinhive miner requests<\/li>\n<\/ul>\n<p><strong>Reference<\/strong><\/p>\n<p><a href=\"https:\/\/www.trustwave.com\/Resources\/SpiderLabs-Blog\/Mass-MikroTik-Router-Infection-%E2%80%93-First-we-cryptojack-Brazil,-then-we-take-the-World-\/\">https:\/\/www.trustwave.com\/Resources\/SpiderLabs-Blog\/Mass-MikroTik-Router-Infection-%E2%80%93-First-we-cryptojack-Brazil,-then-we-take-the-World-\/<\/a><\/p>\n<p><strong>Subject Matter Expert<\/strong><\/p>\n<p>Pradeep Kulkarni | Quick Heal Security Labs<\/p>\n","protected":false},"excerpt":{"rendered":"<p>According to a blogpost published on Aug 1, 2018, 200,000 routers in Brazil were compromised to deliver Cryptocurrency mining scripts to mine Monero (XMR) cryptocurrency. Hackers compromised the vulnerable MikroTik routers by injecting CoinHive scripts into the routers web pages in order to carry out the mass Cryptocurrency miner attack. The IDS\/IPS research team at [&hellip;]<\/p>\n","protected":false},"author":31,"featured_media":86640,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[133,24,5],"tags":[1235,1617,217,561],"class_list":["post-86634","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hacker","category-malware","category-security","tag-infected-routers","tag-iot","tag-router","tag-vulnerabilities"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/86634"}],"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=86634"}],"version-history":[{"count":1,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/86634\/revisions"}],"predecessor-version":[{"id":86641,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/86634\/revisions\/86641"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/media\/86640"}],"wp:attachment":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/media?parent=86634"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/categories?post=86634"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/tags?post=86634"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}