{"id":818,"date":"2017-05-15T21:20:47","date_gmt":"2017-05-15T20:20:47","guid":{"rendered":"http:\/\/www.herbiez.com\/?p=818"},"modified":"2017-05-17T09:49:10","modified_gmt":"2017-05-17T08:49:10","slug":"2017-05-15-adwindjrat-rat-from-malspam","status":"publish","type":"post","link":"https:\/\/www.herbiez.com\/?p=818","title":{"rendered":"2017-05-15 Adwind\/JRAT RAT from MalSpam"},"content":{"rendered":"<p>Trolling through the email filters today I came across this nugget. From what I can tell this looks to be related to the Adwind\/JRat family of malware. This particular RAT was found in an email that is in Turkish. Kaspersky has a quick write-up about this RAT which you can find <a href=\"http:\/\/securelist.com\/blog\/research\/73660\/adwind-faq\/\" target=\"_blank\">here<\/a>. As usual, you can find the artifacts from this investigation over in the Github repo <a href=\"http:\/\/github.com\/bloomer1016\/2017-05-15-Adwind-Java-RAT\" target=\"_blank\">here<\/a>.<\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2017\/05\/email-1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2017\/05\/email-1.png\" alt=\"\" width=\"483\" height=\"229\" class=\"aligncenter size-full wp-image-820\" \/><\/a><\/p>\n<p>The Google translation of the email states the following:  <\/p>\n<p>Subject:<br \/>\nCould you take a look at all your orders?<\/p>\n<p>Body of email:<br \/>\nCould you take a look at all your orders? Hello, our orders are enclosed, please check.<\/p>\n<p>Indicators of Compromise:<br \/>\n=========================<br \/>\nguvencingiller[.]com \/ 188[.]165.206[.]163 (DNS)<br \/>\n188[.]165.206[.]163 (TCP &#8211; 54264)<\/p>\n<p>Artifacts:<br \/>\n==========<br \/>\nFilename: siparis.pub<br \/>\nFile size: 169KB<br \/>\nMD5: 22f89a3c797d070bff3c5d89553d3e5e<br \/>\nVirustoal:<br \/>\nDetection ratio: 19 \/ 56<br \/>\nFirst submission: 2017-05-14 01:03:08 UTC<br \/>\nHybrid Analysis: <a href=\"http:\/\/www.hybrid-analysis.com\/sample\/1d205d034a5132b367e4fca0b3e67506c5c3952c7c3034c2a882e2b6be7b9d56?environmentId=100\" target=\"_blank\">http:\/\/www.hybrid-analysis.com\/sample\/1d205d034a5132b367e4fca0b3e67506c5c3952c7c3034c2a882e2b6be7b9d56?environmentId=100<\/a><\/p>\n<p>Filename: 1.jar<br \/>\nFile size: 63KB<br \/>\nFile path: C:\\Users\\%username%\\AppData\\Local\\Temp<br \/>\nMD5: fd0fdf29739daca8b186c9300507c035<br \/>\nVirustoal: NA<br \/>\nMalwr: NA<br \/>\nHybrid Analysis: NA<\/p>\n<p>Filename: Viw.jar<br \/>\nFile size: 63KB<br \/>\nFile path: C:\\Users\\Bill\\AppData\\Roaming\\One<br \/>\nMD5: fd0fdf29739daca8b186c9300507c035<br \/>\nVirustoal: NA<br \/>\nMalwr: NA<br \/>\nHybrid Analysis: NA<\/p>\n<p>Analysis of Malware:<br \/>\n====================<br \/>\nThis is a pretty simple infection chain. Once the user downloads and runs the Microsoft Publisher file called &#8220;siparis.pub,&#8221; they are greeted with the following screen:<\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2017\/05\/Pub-opened.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2017\/05\/Pub-opened.png\" alt=\"\" width=\"1919\" height=\"996\" class=\"aligncenter size-full wp-image-823\" \/><\/a><\/p>\n<p>which translated means &#8220;File can not be opened.&#8221; In the back ground we can see that the Publisher file runs the macro which has the JAR file embedded in it, and proceeds, with the help of a CMD.exe process, to create the file called &#8220;1.jar&#8221; located in the &#8220;C:\\Users\\Bill\\AppData\\Local\\Temp&#8221; directory. We then see CMD.exe calling the Java executable (javaw.exe) so it can launch the malicious JAR file that was just written above (the 1.jar file). From there we can see that a couple of other events occur from this javaw.exe\/1.jar process (PID 2756):<\/p>\n<p>\t&#8211; An attempt to add a new registry key pointing to a new file called &#8220;Viw.jar&#8221; which ends up being denied: reg add HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run \/v Gbd \/t REG_SZ \/d &#8220;\\&#8221;C:\\Program Files\\Java\\jre6\\bin\\javaw.exe\\&#8221; -jar \\&#8221;C:\\Users\\Bill\\AppData\\Roaming\\One\\Viw.jar\\&#8221;&#8221; \/f<br \/>\n\t&#8211; Attrib.exe is used to modify attributes of some newly created files\/directories:<br \/>\n\t\t&#8212; attrib +s +h +r &#8220;C:\\Users\\Bill\\AppData\\Roaming\\One\\*.*&#8221;<br \/>\n\t\t&#8212; attrib +s +h +r &#8220;C:\\Users\\Bill\\AppData\\Roaming\\One&#8221; <\/p>\n<p>***One thing to note here &#8211; since the java\/1.jar process has modified the file attributes of the directory &#8220;C:\\Users\\Bill\\AppData\\Roaming\\One\\*.*&#8221; and made this a system folder, the icon that shows up is of the Recycle Bin which also does not show  any other files outside of what is in the Recycle Bin.<\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2017\/05\/One-folder.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2017\/05\/One-folder.png\" alt=\"\" width=\"731\" height=\"775\" class=\"aligncenter size-full wp-image-822\" \/><\/a><\/p>\n<p>Once the attributes are undone, the files in the &#8220;One&#8221; folder are visible and no longer the Recycle Bin.<\/p>\n<p>We also see a new instance of javaw.exe\/Viw.jar spin up as a child (PID 2804) to the above javaw.exe \/1.jar process (PID 2756) and proceed to run the same kind of activity as mentioned above:<\/p>\n<p>\t&#8211; Another attempt to add a registry key via reg.exe that gets denied: reg add HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run \/v Gbd \/t REG_SZ \/d &#8220;\\&#8221;C:\\Program Files\\Java\\jre6\\bin\\javaw.exe\\&#8221; -jar \\&#8221;C:\\Users\\Bill\\AppData\\Roaming\\One\\Viw.jar\\&#8221;&#8221; \/f<br \/>\n\t&#8211; Last attempt to create persistence on the machine, this time using a different registry location which is successful: reg add HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run \/v Gbd \/t REG_SZ \/d &#8220;\\&#8221;C:\\Program Files\\Java\\jre6\\bin\\javaw.exe\\&#8221; -jar \\&#8221;C:\\Users\\Bill\\AppData\\Roaming\\One\\Viw.jar\\&#8221;&#8221; \/f<br \/>\n\t&#8211; Attrib.exe used to modify a folder that is also a hidden, system folder:<br \/>\n\t\t&#8212; attrib +H C:\\Users\\Bill\\.Kvq<\/p>\n<p>From the network perspective, once the system is infected, and the javaw.exe\/Viw.jar process is up and running, the only malicious traffic that I was able to find is a DNS request to the domain guvencingiller[.]com, and then nothing but SYN\/SYN-RST packets from various ports incrementing by 1 from the infected system to the 188.165.206.163 (what guvencingiller[.]com resolves to) on port 54264 as seen below.<\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2017\/05\/Java.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2017\/05\/Java.png\" alt=\"\" width=\"438\" height=\"205\" class=\"aligncenter size-full wp-image-821\" \/><\/a><\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2017\/05\/Connection.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2017\/05\/Connection.png\" alt=\"\" width=\"2546\" height=\"1586\" class=\"aligncenter size-full wp-image-819\" \/><\/a><\/p>\n<p>Considering that the connection to that IP\/port pair was reset every time, I am thinking that this C2 has been killed off and this RAT is not fully functional at this time.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Trolling through the email filters today I came across this nugget. From what I can tell this looks to be related to the Adwind\/JRat family of malware. This particular RAT was found in an email that is in Turkish. Kaspersky has a quick write-up about this RAT which you can find here. As usual, you can find the artifacts from this investigation over in the Github repo here. The Google translation of the email states the following: Subject: Could you take a look at all your orders? Body of email: Could you take a look at all your orders? Hello,&#8230;<\/p>\n<p> <a class=\"continue-reading-link\" href=\"https:\/\/www.herbiez.com\/?p=818\"><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-818","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\/818","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=818"}],"version-history":[{"count":6,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=\/wp\/v2\/posts\/818\/revisions"}],"predecessor-version":[{"id":829,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=\/wp\/v2\/posts\/818\/revisions\/829"}],"wp:attachment":[{"href":"https:\/\/www.herbiez.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=818"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=818"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=818"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}