{"id":1419,"date":"2020-11-04T17:19:28","date_gmt":"2020-11-04T17:19:28","guid":{"rendered":"http:\/\/www.herbiez.com\/?p=1419"},"modified":"2020-11-04T17:19:28","modified_gmt":"2020-11-04T17:19:28","slug":"2020-11-03-node-js-qrat","status":"publish","type":"post","link":"https:\/\/www.herbiez.com\/?p=1419","title":{"rendered":"2020-11-03 Node.JS QRAT"},"content":{"rendered":"<p>Summary<br \/>\n========<br \/>\nLooking through some of the email filters today looking for anything interesting, I ran into some emails that all had the same characteristics. All the emails were Fedex themed and had an attachment named &#8220;IMG-10227821963777100026367819.zip.&#8221; Once the file had been unzipped, it was actually a JAR file (IMG-10227821963777100026367819.jar). <\/p>\n<p>Also, since I had not seen any kind of malware like this before, I came across some interesting posts about this that you can review. <a href=\"http:\/\/www.trustwave.com\/en-us\/resources\/blogs\/spiderlabs-blog\/rats-and-spam-the-nodejs-qrat\/\" rel=\"noopener noreferrer\" target=\"_blank\">Trustwave<\/a> did a great write up about this, along with <a href=\"http:\/\/blog.trendmicro.com\/trendlabs-security-intelligence\/qnodeservice-node-js-trojan-spread-via-covid-19-lure\/\" rel=\"noopener noreferrer\" target=\"_blank\">TrendMicro<\/a>. <\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2020\/11\/email.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2020\/11\/email.png\" alt=\"\" width=\"1365\" height=\"822\" class=\"aligncenter size-full wp-image-1423\" \/><\/a><\/p>\n<p>For the PCAPs, ProcMon, and strings2 artifacts from this, please see the Github repo located <a href=\"http:\/\/github.com\/bloomer1016\/2020-11-03-Node.JS-QRAT\" rel=\"noopener noreferrer\" target=\"_blank\">here<\/a>. For the actual files that were dropped on the host, please go <a href=\"http:\/\/s3.amazonaws.com\/2020-11-03-node.js-qrat-artifacts\/2020-11-03-Node.JS-QRAT.zip\" rel=\"noopener noreferrer\" target=\"_blank\">here<\/a>. **Note: The reason for 2 PCAP files and 2 ProcMon files is because of running things, and then pausing the Java process to run Strings2 and then starting the process back up again.<\/p>\n<p>Analysis<br \/>\n========<br \/>\nOnce I had unzipped the file, I did try to see if I could figure out what was going on using a couple of Java tools to see if it could de-obfuscate it. While there are a few Allatori tools\/plugins out there for this, I decided to just run it in my VM to see what happened since I am horrible with Java. Once the JAR file had been run, the initial JAVE.exe process(PID 3012) wrote a file called &#8220;6df8c6dc.tmp&#8221; to the &#8220;C:\\Users\\%Username%\\AppData\\Local\\Temp&#8221; directory. Shortly thereafter, that process spun up another Java.exe process (PID 1564) and started to create what would be several different Node.JS folders (node-v14.12.0-win-x64, node-v14.12.0-win-x64.tmp3688241074700, node-v14.12.0-win-x64.tmp3635979968400, node-v14.12.0-win-x64.tmp3728784032900, and node-v14.12.0-win-x64.tmp3794067098400) under the path of &#8220;C:\\Users\\%Username%\\.&#8221; This took some time to be honest since it was pulling these down as well based on what I was seeing in the PCAP.<\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2020\/11\/pcap1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2020\/11\/pcap1.png\" alt=\"\" width=\"1857\" height=\"967\" class=\"aligncenter size-full wp-image-1422\" \/><\/a><\/p>\n<p>While the Java.exe (PID 1564) process was downloading different Node.JS packages and running them, I paused the process to run <a href=\"http:\/\/split-code.com\/strings2.html\" rel=\"noopener noreferrer\" target=\"_blank\">strings2<\/a> against the Java process to see if I could find anything. Once I had created the log file from that process I started it back up and that is when I noticed that it had finally started the node.exe process (PID 3752) and that it had tried to reach out to the dynamic DNS of &#8220;topguns.ddns.net&#8221; (193.228.91.12) which was already taken down or cleaned up.<\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2020\/11\/procmon.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2020\/11\/procmon.png\" alt=\"\" width=\"1201\" height=\"569\" class=\"aligncenter size-full wp-image-1421\" \/><\/a><\/p>\n<p><a href=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2020\/11\/wireshark.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.herbiez.com\/wp-content\/uploads\/2020\/11\/wireshark.png\" alt=\"\" width=\"1855\" height=\"858\" class=\"aligncenter size-full wp-image-1420\" \/><\/a><\/p>\n<p>Looking at the strings2 output, I could see things like the firewall settings configured on the VM, and what appeared to be local GPO settings as well. I also did see what <a href=\"http:\/\/twitter.com\/reecdeep\" rel=\"noopener noreferrer\" target=\"_blank\">@reecdeep<\/a> found in the attached images from the Tweet but nothing else that stood out to me.<\/p>\n<p>For this sample, I did not see any level of persistence setup or created like what was reported in the Trustwave or TrendMicro articles.<\/p>\n<p>Artifacts<br \/>\n==========<\/p>\n<p>IOCs<br \/>\n\u2014\u2013&#8212;<br \/>\ntopguns.ddns.net  \/ 193.228.91.12 (TCP\/443)<\/p>\n<p>OSINT<br \/>\n\u2014\u2014&#8212;-<br \/>\n<a href=\"http:\/\/twitter.com\/reecdeep\/status\/1315560451099504640\" rel=\"noopener noreferrer\" target=\"_blank\">http:\/\/twitter.com\/reecdeep\/status\/1315560451099504640<\/a><br \/>\n<a href=\"http:\/\/www.joesandbox.com\/analysis\/302849\/0\/html\" rel=\"noopener noreferrer\" target=\"_blank\">http:\/\/www.joesandbox.com\/analysis\/302849\/0\/html<\/a><\/p>\n<p>File hashes<br \/>\n\u2014\u2014\u2014\u2014&#8212;&#8212;&#8211;<br \/>\n303c5311de9c5dd4bb49cac5d1efdb4c5cccf03c8bf058d8c87055568712467d &#8211; IMG-10227821963777100026367819.jar \/ 6df8c6dc.tmp<br \/>\n5d96a9a18cbaf65b8b7036d578e0db0fc22314669cb060fc255874bdfc402d18 &#8211; IMG-10227821963777100026367819.zip<\/p>\n<p>Machinae results<br \/>\n\u2014\u2014\u2014\u2014\u2014\u2013&#8212;&#8212;&#8212;&#8211;<br \/>\n********************************************************************************<br \/>\n* Information for topguns.ddns.net<br \/>\n* Observable type: fqdn (Auto-detected: True)<br \/>\n********************************************************************************<br \/>\nNot seeing what you expect? Likely not a valid site. Try running with &#8211;list-sites<\/p>\n<p>[-] No URLVoid Results<br \/>\n[-] No URL Unshorten Results<br \/>\n[-] No Malc0de Results<br \/>\n[+] Fortinet Category Results<br \/>\n    [-] Fortinet URL Category: Dynamic DNS<br \/>\n[+] VirusTotal pDNS Results<br \/>\n    [-] pDNS data from VirusTotal: (&#8216;2020-10-23&#8217;, &#8216;193[.]228.91.12&#8217;)<br \/>\n    [-] pDNS data from VirusTotal: (&#8216;2020-10-22&#8217;, &#8216;194[.]180.224.161&#8217;)<br \/>\n[+] McAfee Threat Results<br \/>\n    [-] McAfee Web Risk: Minimal<br \/>\n    [-] McAfee Last Seen: 2020-11-04<\/p>\n<p>********************************************************************************<br \/>\n* Information for 193.228.91.12<br \/>\n* Observable type: ipv4 (Auto-detected: True)<br \/>\n********************************************************************************<br \/>\nNot seeing what you expect? Likely not a valid site. Try running with &#8211;list-sites<\/p>\n<p>[-] No IPVoid Results<br \/>\n[-] No Malc0de Results<br \/>\n[+] AbuseIPDB Results<br \/>\n    [-] AbuseIPDB reports: 3<br \/>\n[-] No RansomwareTracker Results<br \/>\n[-] No SANS Results<br \/>\n[+] Fortinet Category Results<br \/>\n    [-] Fortinet URL Category: Malicious Websites<br \/>\n[+] VirusTotal pDNS Results<br \/>\n    [-] pDNS data from VirusTotal: (&#8216;2020-10-15&#8217;, &#8216;severdops[.]ddns[.]net&#8217;)<br \/>\n    [-] pDNS data from VirusTotal: (&#8216;2020-10-23&#8217;, &#8216;topguns[.]ddns[.]net&#8217;)<br \/>\n    [-] pDNS malicious URLs from VirusTotal: (&#8216;2020-11-02&#8217;, &#8216;(hXXp):\/\/topguns[.]ddns[.]net\/&#8217;)<br \/>\n    [-] pDNS malicious URLs from VirusTotal: (&#8216;2020-10-31&#8217;, &#8216;hXXp:\/\/ndroga[.]xyz\/&#8217;)<br \/>\n[-] No McAfee Threat Results<br \/>\n[-] No ThreatCrowd IP Report Results<\/p>\n<p>********************************************************************************<br \/>\n* Information for 303c5311de9c5dd4bb49cac5d1efdb4c5cccf03c8bf058d8c87055568712467d<br \/>\n* Observable type: hash.sha256 (Auto-detected: True)<br \/>\n********************************************************************************<br \/>\nNot seeing what you expect? Likely not a valid site. Try running with &#8211;list-sites<\/p>\n<p>[+] VirusTotal File Report Results<br \/>\n    [-] Date submitted: 2020-11-02 12:36:02<br \/>\n    [-] Detected engines: 0<br \/>\n    [-] Total engines: 63<\/p>\n<p>********************************************************************************<br \/>\n* Information for 5d96a9a18cbaf65b8b7036d578e0db0fc22314669cb060fc255874bdfc402d18<br \/>\n* Observable type: hash.sha256 (Auto-detected: True)<br \/>\n********************************************************************************<br \/>\nNot seeing what you expect? Likely not a valid site. Try running with &#8211;list-sites<\/p>\n<p>[+] VirusTotal File Report Results<br \/>\n    [-] Date submitted: 2020-11-02 15:53:17<br \/>\n    [-] Detected engines: 2<br \/>\n    [-] Total engines: 63<br \/>\n    [-] Scans: (&#8216;Invincea&#8217;, &#8216;Mal\/DrodZp-A&#8217;)<br \/>\n    [-] Scans: (&#8216;Sophos&#8217;, &#8216;Mal\/DrodZp-A&#8217;)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary ======== Looking through some of the email filters today looking for anything interesting, I ran into some emails that all had the same characteristics. All the emails were Fedex themed and had an attachment named &#8220;IMG-10227821963777100026367819.zip.&#8221; Once the file had been unzipped, it was actually a JAR file (IMG-10227821963777100026367819.jar). Also, since I had not seen any kind of malware like this before, I came across some interesting posts about this that you can review. Trustwave did a great write up about this, along with TrendMicro. For the PCAPs, ProcMon, and strings2 artifacts from this, please see the Github repo&#8230;<\/p>\n<p> <a class=\"continue-reading-link\" href=\"https:\/\/www.herbiez.com\/?p=1419\"><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-1419","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\/1419","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=1419"}],"version-history":[{"count":2,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=\/wp\/v2\/posts\/1419\/revisions"}],"predecessor-version":[{"id":1425,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=\/wp\/v2\/posts\/1419\/revisions\/1425"}],"wp:attachment":[{"href":"https:\/\/www.herbiez.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.herbiez.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}