{"id":546,"date":"2018-01-30T09:40:38","date_gmt":"2018-01-30T09:40:38","guid":{"rendered":"http:\/\/www.cloudcoffer.com\/?p=546"},"modified":"2018-02-26T09:55:02","modified_gmt":"2018-02-26T09:55:02","slug":"honeypot-extraction-digital-currency-mining","status":"publish","type":"post","link":"https:\/\/www.cloudcoffer.com\/?p=546","title":{"rendered":"Honeypot Extraction &#8211; Digital Currency Mining"},"content":{"rendered":"<p><strong>Date of Detection:<\/strong><\/p>\n<p>2018.1.30<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Description:<\/strong><\/p>\n<p>Cryptocurrency mining becomes more and more popular. Attackers are widely exploiting victims&#8217; systems to mine digital currencies and making profits. According to the <a href=\"https:\/\/arstechnica.com\/information-technology\/2018\/02\/tesla-cloud-resources-are-hacked-to-run-cryptocurrency-mining-malware\/\">news report<\/a> on February 21st, 2018, even Tesla cloud resources are hacked to run cryptocurrency-mining malware. As CloudCoffer&#8217;s honeypots keep detecting this type of exploit and the number of this type of attack is rising, system administrators should really keep an eye on the issue.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Source IP Addresses:<\/strong><\/p>\n<p>211.23.165.65, 37.48.110.24<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Target Systems:<\/strong><\/p>\n<ol>\n<li>PHP Platforms<\/li>\n<li>Systems with OS Command Injection Vulnerabilities<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>An example of PHP code that\u2019s vulnerable to OS command injection is as follows.<\/p>\n<pre>&lt;?php\r\n\r\nprint(\"Please select the file to be deleted:\");\r\n\r\n$f1=$_GET['f'];\r\n\r\nsystem(\"rm $f1\");\r\n\r\n?&gt;<\/pre>\n<p>&nbsp;<\/p>\n<p>The following request is an example of a working attack.<\/p>\n<p>https:\/\/www.example.com\/del.php?f=<span style=\"color: #ff0000;\">garbage.txt;whoami<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>The system is then controlled to print the effective username of the current user as follows. Attackers can certainly inject any malicious commands instead of whoami. The output of the server is as follows.<\/p>\n<pre>Please select the file to be deleted:\r\n\r\nroot<\/pre>\n<h3><\/h3>\n<p>&nbsp;<\/p>\n<p><strong>Analysis:<\/strong><\/p>\n<p>By exploiting OS command injection vulnerabilities, attackers control victims\u2019 systems to download a .tgz package and decompress the package to absolute paths as follow.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-547 size-full\" src=\"http:\/\/www.cloudcoffer.com\/wp-content\/uploads\/2018\/02\/malware.png\" alt=\"\" width=\"468\" height=\"354\" srcset=\"https:\/\/www.cloudcoffer.com\/wp-content\/uploads\/2018\/02\/malware.png 468w, https:\/\/www.cloudcoffer.com\/wp-content\/uploads\/2018\/02\/malware-300x227.png 300w\" sizes=\"auto, (max-width: 468px) 100vw, 468px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>The package includes many options for attackers to control victims\u2019 systems and make illegal profits. Further, the attacker intentionally hides the folder by appending a period at the beginning of the name of the directory.<\/p>\n<p>The file named .test-unix\/run tries to control victims\u2019 systems to mine digital currencies for the attacker\u2019s wallet.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-549 size-full\" src=\"http:\/\/www.cloudcoffer.com\/wp-content\/uploads\/2018\/02\/malware2-1.png\" alt=\"\" width=\"864\" height=\"427\" srcset=\"https:\/\/www.cloudcoffer.com\/wp-content\/uploads\/2018\/02\/malware2-1.png 864w, https:\/\/www.cloudcoffer.com\/wp-content\/uploads\/2018\/02\/malware2-1-300x148.png 300w, https:\/\/www.cloudcoffer.com\/wp-content\/uploads\/2018\/02\/malware2-1-768x380.png 768w\" sizes=\"auto, (max-width: 864px) 100vw, 864px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>The file named .test-unix\/stop sends users\u2019 system and credential information to the attacker\u2019s email address.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-550\" src=\"http:\/\/www.cloudcoffer.com\/wp-content\/uploads\/2018\/02\/malware3.png\" alt=\"\" width=\"864\" height=\"504\" srcset=\"https:\/\/www.cloudcoffer.com\/wp-content\/uploads\/2018\/02\/malware3.png 864w, https:\/\/www.cloudcoffer.com\/wp-content\/uploads\/2018\/02\/malware3-300x175.png 300w, https:\/\/www.cloudcoffer.com\/wp-content\/uploads\/2018\/02\/malware3-768x448.png 768w\" sizes=\"auto, (max-width: 864px) 100vw, 864px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>To prevent being detected by system administrators, after downloading and decompressing the package, the attackers\u2019 script runs malicious processes and deletes the above files. If victims\u2019 systems are vulnerable, this attack can be fulfilled by sending one http-post request. The attack works for all systems with OS command injection vulnerabilities.<\/p>\n<p>The best way to prevent this type of attack is to make sure that the systems are upgraded to the latest version. Further, users need to make sure that their applications are not vulnerable to OS command injection.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Date of Detection: 2018.1.30 &nbsp; Description: Cryptocurrency mining becomes more and more popular. Attackers are widely exploiting victims&#8217; systems to mine digital currencies and making profits. According to the news report on February 21st, 2018, even Tesla cloud resources are hacked to run cryptocurrency-mining malware. As CloudCoffer&#8217;s honeypots keep detecting this type of exploit and <a href=\"https:\/\/www.cloudcoffer.com\/?p=546\" rel=\"nofollow\"><span class=\"sr-only\">Read more about Honeypot Extraction &#8211; Digital Currency Mining<\/span>[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-546","post","type-post","status-publish","format-standard","hentry","category-honeypot"],"_links":{"self":[{"href":"https:\/\/www.cloudcoffer.com\/index.php?rest_route=\/wp\/v2\/posts\/546","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cloudcoffer.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cloudcoffer.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cloudcoffer.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cloudcoffer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=546"}],"version-history":[{"count":18,"href":"https:\/\/www.cloudcoffer.com\/index.php?rest_route=\/wp\/v2\/posts\/546\/revisions"}],"predecessor-version":[{"id":568,"href":"https:\/\/www.cloudcoffer.com\/index.php?rest_route=\/wp\/v2\/posts\/546\/revisions\/568"}],"wp:attachment":[{"href":"https:\/\/www.cloudcoffer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cloudcoffer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=546"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cloudcoffer.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}