{"id":21024,"date":"2017-03-02T23:37:13","date_gmt":"2017-03-03T06:37:13","guid":{"rendered":"https://www.webroot.com/blog/?p=21024"},"modified":"2018-01-30T11:11:53","modified_gmt":"2018-01-30T18:11:53","slug":"behind-the-scenes-ransomware","status":"publish","type":"post","link":"https://www.webroot.com/blog/2017\/03\/02\/behind-the-scenes-ransomware\/","title":{"rendered":"Behind the Scenes with Ransomware"},"content":{"rendered":"<h5><strong>Locky (.osiris)<\/strong><\/h5>\n<p>O Locky, Locky! Wherefore art thou, Locky?<\/p>\n<p>Alas, could Locky be no more? At the beginning of 2017, data from the field suggested potential Locky infections had decreased dramatically, so we were hoping it was on its way out. Unfortunately, Locky returned with a vengeance, though it had changed its methods somewhat. Upon further investigation, we located a number of binaries in %temp%, \u201ca1.exe\u201d and \u201ca2.exe \u201c, instantly seeing a connection to Nemucod; a name given to a family of Javascript droppers.<\/p>\n<p>After additional research and decompiling several scripts, we\u2019ve come to the conclusion that the same scripts used in previous months to distribute the .crypted \u201cNemucod\u201d ransomware were suddenly downloading Locky and Kovter instead. Why the change?<\/p>\n<p>Various online reports suggest that Necurs\u2014a set of rootkit\/botnet control servers\u2014had gone offline. These were the same servers that sent out massive amounts of spam containing Locky droppers. Based on the information available, we think the bad guys changed their delivery method when these servers fell out of commission. (Incidentally, blocking the %temp% files blocks the infection, so we\u2019re in a good position here!)<\/p>\n<h5><strong>Nemucod<\/strong><\/h5>\n<p>The Nemucod script developer used a simple script that runs another script which is then hosted on a compromised website. Those websites then randomize the contents of the script every few minutes. This means that security solutions that still use static signatures are often laughably ineffective at stopping these threats. The randomized website script is not part of the initial script, and is only readable via attachment to the WSCRIPT.exe process.<\/p>\n<p><em>Initial script received via email:<\/em><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-21044\" src=\"https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/ransomware1.png\" alt=\"ransomware1\" width=\"1274\" height=\"62\" srcset=\"https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/ransomware1.png 1274w, https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/ransomware1-768x37.png 768w\" sizes=\"(max-width: 1274px) 100vw, 1274px\" \/><\/p>\n<p>As you can see, the script above uses \u201cGET\u201d to grab the response text from 1 of 5 compromised websites (var x) and evals that response text.<\/p>\n<p><em>Sample response text from a compromised site:<\/em><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-21026\" src=\"https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/Ransomware2.png\" alt=\"Ransomware2\" width=\"1422\" height=\"175\" srcset=\"https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/Ransomware2.png 1422w, https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/Ransomware2-768x94.png 768w\" sizes=\"(max-width: 1422px) 100vw, 1422px\" \/><\/p>\n<p>When de-obfuscating scripts, I find it simpler to reverse the function used to evaluate the obfuscated content. I de-obfuscated this response script by using the initial script above with the previous function for the variable z2, which is actually eval, as follows:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-21028 alignleft\" src=\"https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/Ransomware3.png\" alt=\"Ransomware3\" width=\"309\" height=\"18\" srcset=\"https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/Ransomware3.png 309w, https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/Ransomware3-768x44.png 768w\" sizes=\"(max-width: 309px) 100vw, 309px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>was modified to<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-21030 alignleft\" src=\"https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/Ransomware4.png\" alt=\"Ransomware4\" width=\"391\" height=\"19\" srcset=\"https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/Ransomware4.png 391w, https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/Ransomware4-768x37.png 768w\" sizes=\"(max-width: 391px) 100vw, 391px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Here\u2019s the final script, which downloads and runs the files (a1.exe and a2.exe).<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-21032 alignleft\" src=\"https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/Ransomware5.png\" alt=\"Ransomware5\" width=\"1754\" height=\"86\" srcset=\"https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/Ransomware5.png 1754w, https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/Ransomware5-768x37.png 768w\" sizes=\"(max-width: 1754px) 100vw, 1754px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Below is an example of the network traffic from this script, where the &amp;r parameter is the downloaded payload.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignleft size-full wp-image-21034\" src=\"https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/Ransomware6.jpg\" alt=\"Ransomware6\" width=\"557\" height=\"179\" srcset=\"https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/Ransomware6.jpg 557w, https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/Ransomware6-768x246.jpg 768w\" sizes=\"(max-width: 557px) 100vw, 557px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><u><br \/>\n<\/u><\/p>\n<p><u>\u00a0<\/u><\/p>\n<h5><strong>CRYSIS<\/strong><\/h5>\n<p>This ransomware is still only being distributed via compromised user accounts on RDP enabled machines. The most recently used extension is \u201c.wallet\u201d and it\u2019s very common to see the ransom note email as <a href=\"mailto:*@india.com\">*@india.com<\/a>.<\/p>\n<p>Below is a ransom note example:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignleft size-full wp-image-21036\" src=\"https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/Ransomware7.png\" alt=\"Ransomware7\" width=\"743\" height=\"391\" srcset=\"https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/Ransomware7.png 743w, https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/Ransomware7-768x404.png 768w\" sizes=\"(max-width: 743px) 100vw, 743px\" \/><\/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>&nbsp;<\/p>\n<p>Samples:<\/p>\n<p><a href=\"https:\/\/www.virustotal.com\/en\/file\/31fc83f5e70515777fb4919cf249e3d2208895b96060f68a270f97377944b362\/analysis\/\">https:\/\/www.virustotal.com\/en\/file\/31fc83f5e70515777fb4919cf249e3d2208895b96060f68a270f97377944b362\/analysis\/<br \/>\n<\/a><a href=\"https:\/\/virustotal.com\/en\/file\/79b08105bbe4b7b407be42656f43c1533c725f951bc4f73c3aa9f3e68d2b3a15\/analysis\/\">https:\/\/virustotal.com\/en\/file\/79b08105bbe4b7b407be42656f43c1533c725f951bc4f73c3aa9f3e68d2b3a15\/analysis\/<\/a><\/p>\n<h5><strong>Spora<\/strong><\/h5>\n<p>We discovered Spora last month, but data from the field suggests it isn\u2019t too prevalent. The most common infection vector for Spora is Google Installer messages, which are displayed from third party advertisers while browsing the web. The total cost of all services is $120, which is significantly less costly than other ransomware variants, many of which demand at least 2 Bitcoins.<\/p>\n<p>The image below illustrates the different prices for various services.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignleft size-full wp-image-21038\" src=\"https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/Ransomware8.jpg\" alt=\"Ransomware8\" width=\"499\" height=\"187\" srcset=\"https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/Ransomware8.jpg 499w, https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/Ransomware8-768x287.jpg 768w\" sizes=\"(max-width: 499px) 100vw, 499px\" \/><\/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>It also attempts to clear shadow copies via vssadmin.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignleft size-full wp-image-21054\" src=\"https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/Ransomware11.png\" alt=\"Ransomware11\" width=\"861\" height=\"35\" srcset=\"https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/Ransomware11.png 861w, https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/Ransomware11-768x31.png 768w\" sizes=\"(max-width: 861px) 100vw, 861px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h5><strong>SAMAS<\/strong><\/h5>\n<p>This ransomware is distributed via compromised JBOSS servers and usually propagates to every system on a network. The most recently used extension is an ironic \u201c.weareyourfriends\u201d. It usually installs in %System32%, since it is typically runs with administrative rights.<\/p>\n<h5><strong>Ransomware Staging Tool<\/strong><\/h5>\n<p>Script kiddies looking to make some money need look no further. This ransomware staging tool is exactly what it sounds like: a utility where you just enter your information, browse the folders you want to encrypt, and wait for the money to roll in! We\u2019ve seen a number of variants similar to the binary below. This is so new that it doesn\u2019t yet have its own name, but all variants have been found on compromised RDP systems.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignleft size-full wp-image-21040\" src=\"https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/ransomware9.png\" alt=\"ransomware9\" width=\"566\" height=\"518\" srcset=\"https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/ransomware9.png 566w, https:\/\/blog-en.webroot.com\/wp-content\/uploads\/2017\/03\/ransomware9-768x702.png 768w\" sizes=\"(max-width: 566px) 100vw, 566px\" \/><\/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>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h5><strong>Statistics<\/strong><\/h5>\n<p>Over the last couple of months, the data we\u2019ve seen underscores how important it is for system admins to secure RDP. Unsecured RDP essentially leaves the front door open for cybercriminals. And since modern criminals can just encrypt your data, instead of having to go through the trouble of stealing it, we shouldn\u2019t make it any easier for them to get what they want.<\/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","protected":false},"excerpt":{"rendered":"<p>Locky (.osiris) O Locky, Locky! Wherefore art thou, Locky? Alas, could Locky be no more? At the beginning of 2017, data from the field suggested potential Locky infections had decreased dramatically, so we were hoping it was on its way out. Unfortunately, Locky returned with a vengeance, though it had changed its methods somewhat. Upon [&hellip;]<\/p>\n","protected":false},"author":65,"featured_media":21104,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3005],"tags":[],"yst_prominent_words":[20629,10621,3769,20623,20631,20625,6329,20637,19929,3937,20633,20621,20197,19145,20627,3895,5953,4417,20635,3471],"acf":[],"_links":{"self":[{"href":"https://www.webroot.com/blog/wp-json\/wp\/v2\/posts\/21024"}],"collection":[{"href":"https://www.webroot.com/blog/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https://www.webroot.com/blog/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https://www.webroot.com/blog/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https://www.webroot.com/blog/wp-json\/wp\/v2\/comments?post=21024"}],"version-history":[{"count":18,"href":"https://www.webroot.com/blog/wp-json\/wp\/v2\/posts\/21024\/revisions"}],"predecessor-version":[{"id":21142,"href":"https://www.webroot.com/blog/wp-json\/wp\/v2\/posts\/21024\/revisions\/21142"}],"wp:featuredmedia":[{"embeddable":true,"href":"https://www.webroot.com/blog/wp-json\/wp\/v2\/media\/21104"}],"wp:attachment":[{"href":"https://www.webroot.com/blog/wp-json\/wp\/v2\/media?parent=21024"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https://www.webroot.com/blog/wp-json\/wp\/v2\/categories?post=21024"},{"taxonomy":"post_tag","embeddable":true,"href":"https://www.webroot.com/blog/wp-json\/wp\/v2\/tags?post=21024"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https://www.webroot.com/blog/wp-json\/wp\/v2\/yst_prominent_words?post=21024"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}