{"id":137,"date":"2022-07-01T16:36:50","date_gmt":"2022-07-01T16:36:50","guid":{"rendered":"https:\/\/blog.scilabs.mx\/en\/?p=137"},"modified":"2022-07-01T16:36:50","modified_gmt":"2022-07-01T16:36:50","slug":"blackparty-trojan","status":"publish","type":"post","link":"https:\/\/blog.scilabs.mx\/en\/2022\/07\/01\/blackparty-trojan\/","title":{"rendered":"BlackParty Trojan"},"content":{"rendered":"<h1><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-282 aligncenter\" src=\"https:\/\/blog.scilabs.mx\/en2\/wp-content\/uploads\/sites\/3\/2022\/07\/logo-blackParty.png\" alt=\"\" width=\"274\" height=\"275\" \/><\/h1>\n<h1>Overview<\/h1>\n<p>The following post provides TTPs and IoCs identified by SCILabs related to a campaign detected in Mexico delivering a new trojan named by SCILabs as <strong>BlackParty<\/strong>. Our team discovered high activity for this threat as part of security monitoring in the region using our telemetry. The main goal of the trojan is to add infected devices to a botnet and then carry out malicious activities such as information theft and full control of the infected computer.<\/p>\n<p>By analyzing the artifacts and TTPs used by the threat, such as the use of the Mexican government&#8217;s page of the &#8220;<em>Servicio de Administraci\u00f3n Tributaria (SAT)<\/em>&#8220;, SCILabs considers with high confidence that this campaign is directed at users from Mexico. It should be noted that according to the geopolitical context of the country, in the last days of April this government webpage is quite used by taxpayers, so it is very common to see SAT impersonation sites. On the other hand, we are not sure if the URL is being distributed through phishing emails, however, most similar threats in LATAM are distributed in this way, so it is highly likely that this is their distribution vector.<\/p>\n<p>It is worth mentioning that when we hunt for more artifacts like this threat, we observe in <a href=\"https:\/\/www.virustotal.com\/gui\/file\/1890873cfde0c3ab8655d0c0355d2da4fabd821d5d0aec0250dcea4faa0fd694\">VirusTotal<\/a> that it has been present in the wild for several months, and detection is very low by most security solutions, and some artifacts are not detected as malicious. For this reason, it is very important for SCILabs to alert about this threat to prevent organizations from being victims.<\/p>\n<h1>How could it affect an organization?<\/h1>\n<p>The main objective of this campaign is the theft of information and total control of the infected computer; If the attack is successful, the confidentiality, integrity and availability of the organizations&#8217; information could be affected. Furthermore, as we have seen with similar trojans such as BlackMarley, the device can be used to perform lateral movements in the network and carry out a more dangerous attack.<\/p>\n<h1>Analysis<\/h1>\n<h2>Threat Context<\/h2>\n<p>In the security monitoring in the region, we observed an apocryphal website which was supplanting the Mexican SAT through the url <strong>hxxps[:]\/\/elindio[.]com[.]mx\/sat<\/strong> whose interface is identical to the legitimate site of the &#8220;<em>Servicio de Administraci\u00f3n Tributaria\u201c<\/em>, for this reason, we carried out a detailed analysis and investigation and observed that it was a new malware campaign. SCILabs is not sure how the link to this website is being distributed, however, it is possible that it is distributed through emails as has happened with similar threats.<\/p>\n<p>When analyzing the code of the site, we observe that it performs a verification of the country from which it is being visited, if it had previously been visited and the details of the device. After doing the verification process, it will show the apocryphal SAT site if it passes the verification tests and if not, it will show the legitimate SAT site.<\/p>\n<figure id=\"attachment_139\" aria-describedby=\"caption-attachment-139\" style=\"width: 1090px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-139\" title=\"Figure 1 Main page of the apocryphal site\" src=\"https:\/\/blog.scilabs.mx\/en2\/wp-content\/uploads\/sites\/3\/2022\/07\/bp1.png\" alt=\"Figure 1 Main page of the apocryphal site\" width=\"1090\" height=\"494\" \/><figcaption id=\"caption-attachment-139\" class=\"wp-caption-text\">Figure 1 Main page of the apocryphal site<\/figcaption><\/figure>\n<p>After a few seconds, the site will display a pop-up in which it will ask the victim to enter a captcha and then download the so-called user manual on how to use the website.<\/p>\n<figure id=\"attachment_140\" aria-describedby=\"caption-attachment-140\" style=\"width: 1068px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-140\" src=\"https:\/\/blog.scilabs.mx\/en2\/wp-content\/uploads\/sites\/3\/2022\/07\/bp2.png\" alt=\"Figure 2 Pop-up requesting to download the malware\" width=\"1068\" height=\"480\" \/><figcaption id=\"caption-attachment-140\" class=\"wp-caption-text\">Figure 2 Pop-up requesting to download the malware<\/figcaption><\/figure>\n<h1>Technical Summary<\/h1>\n<p>The downloaded artifact is compressed and is named &#8220;Sat.zip&#8221;. When decompressing it, there is a file in batch file format called &#8220;Sat.bat&#8221; whose objective is to download, decompress and execute the file from the URL <strong>hxxps[:]\/\/elindio[.]com[.]mx\/sat\/redir[.]php<\/strong> through of a PowerShell command.<\/p>\n<figure id=\"attachment_141\" aria-describedby=\"caption-attachment-141\" style=\"width: 1066px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-141\" src=\"https:\/\/blog.scilabs.mx\/en2\/wp-content\/uploads\/sites\/3\/2022\/07\/bp3.png\" alt=\"Figure 3 Obfuscated dropper code\" width=\"1066\" height=\"310\" \/><figcaption id=\"caption-attachment-141\" class=\"wp-caption-text\">Figure 3 Obfuscated dropper code<\/figcaption><\/figure>\n<figure id=\"attachment_147\" aria-describedby=\"caption-attachment-147\" style=\"width: 1061px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-147\" src=\"https:\/\/blog.scilabs.mx\/en2\/wp-content\/uploads\/sites\/3\/2022\/07\/bpf.png\" alt=\"Figure 4 Deobfuscated dropper code\" width=\"1061\" height=\"76\" \/><figcaption id=\"caption-attachment-147\" class=\"wp-caption-text\">Figure 4 Deobfuscated dropper code<\/figcaption><\/figure>\n<p>It is important to mention that the downloaded executable is digitally signed by the company <strong>HB Sistemas 2012<\/strong> C.A with the email <strong>totalsoftware.lzarate[@]gmail.com<\/strong><\/p>\n<figure id=\"attachment_142\" aria-describedby=\"caption-attachment-142\" style=\"width: 509px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-142\" src=\"https:\/\/blog.scilabs.mx\/en2\/wp-content\/uploads\/sites\/3\/2022\/07\/bp4.png\" alt=\"Figure 5 Malicious artifact certificate\" width=\"509\" height=\"661\" \/><figcaption id=\"caption-attachment-142\" class=\"wp-caption-text\">Figure 5 Malicious artifact certificate<\/figcaption><\/figure>\n<p>Once the compressed artifact is executed, it will generate a file called <strong>bs_gu.d<\/strong> with malicious code, verify the architecture of the operating system and abuse the Windows complement called <strong>LaunchWinApp.exe<\/strong> to load this malicious code. Additionally, it will generate persistence in the path <strong>%AppData%\\Local\\Microsoft\\Windows\\Explorer<\/strong> and in the path <strong>%AppData%\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup.<\/strong><\/p>\n<figure id=\"attachment_148\" aria-describedby=\"caption-attachment-148\" style=\"width: 1133px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-148\" src=\"https:\/\/blog.scilabs.mx\/en2\/wp-content\/uploads\/sites\/3\/2022\/07\/bpp.png\" alt=\"Figure 6 Persistence process in the infected operating system\" width=\"1133\" height=\"134\" \/><figcaption id=\"caption-attachment-148\" class=\"wp-caption-text\">Figure 6 Persistence process in the infected operating system<\/figcaption><\/figure>\n<p>Finally, the artifact collects information from the infected device. The data collected includes the following:<\/p>\n<ul>\n<li>Unique identifier of the victim<\/li>\n<li>Operating system<\/li>\n<li>Antivirus installed on the device<\/li>\n<li>Operating system architecture<\/li>\n<li>Validation of user permissions<\/li>\n<\/ul>\n<p>The information collected is sent to the command-and-control site <strong>fiestadrops[.]cc\/chanclas\/upload[.]php<\/strong><\/p>\n<figure id=\"attachment_144\" aria-describedby=\"caption-attachment-144\" style=\"width: 1071px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-144\" src=\"https:\/\/blog.scilabs.mx\/en2\/wp-content\/uploads\/sites\/3\/2022\/07\/bp6.png\" alt=\"Figure 7 Packets obtained from communication with command and control\" width=\"1071\" height=\"390\" \/><figcaption id=\"caption-attachment-144\" class=\"wp-caption-text\">Figure 7 Packets obtained from communication with command and control<\/figcaption><\/figure>\n<p>Some features observed in the <strong>BlackParty<\/strong> trojan are the following:<\/p>\n<ul>\n<li>A part of the artifact is programmed in the RUST programming language and the loader is programmed in the C++ language.<\/li>\n<li>The malware uses highly encrypted communication (<a href=\"https:\/\/docs.rs\/chacha20\/latest\/chacha20\/\">ChaCha20<\/a>) channels to receive the instructions and commands to be executed from the C2.<\/li>\n<li>The malware contains multiple anti-sandbox and anti-debugging protections, and its modules are highly obfuscated.<\/li>\n<li>The malware has full remote-control capabilities of compromised computers, information theft, and algorithms optimized for two-way communication.<\/li>\n<li>Additionally, the device can steal information related to business services such as Office365, Outlook, OneDrive, etc.<\/li>\n<\/ul>\n<h1>Attack Flow<\/h1>\n<figure id=\"attachment_149\" aria-describedby=\"caption-attachment-149\" style=\"width: 1181px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-149\" src=\"https:\/\/blog.scilabs.mx\/en2\/wp-content\/uploads\/sites\/3\/2022\/07\/bpd.png\" alt=\"Figure 5 - BlackParty trojan infection flow\" width=\"1181\" height=\"488\" \/><figcaption id=\"caption-attachment-149\" class=\"wp-caption-text\">Figure 8 &#8211; BlackParty trojan infection flow<\/figcaption><\/figure>\n<h1><strong>TTPs observed aligned to MITRE\u2019s ATT&amp;CK framework<\/strong><\/h1>\n<figure id=\"attachment_146\" aria-describedby=\"caption-attachment-146\" style=\"width: 1082px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-146\" src=\"https:\/\/blog.scilabs.mx\/en2\/wp-content\/uploads\/sites\/3\/2022\/07\/bp8.png\" alt=\"Table 2 - TTPs observed aligned to MITRE\u2019s ATT&amp;CK framework\" width=\"1082\" height=\"651\" \/><figcaption id=\"caption-attachment-146\" class=\"wp-caption-text\">Table 1 &#8211; TTPs observed aligned to MITRE\u2019s ATT&amp;CK framework<\/figcaption><\/figure>\n<h1>Assessment<\/h1>\n<p>Something that makes this threat special is the low detection it has by security solutions, the programming language used (RUST) and the techniques for downloading and executing in memory. In LATAM it is unusual to see malware that uses <strong>LaunchWinApp<\/strong>, which could be the key to avoid heuristic detection by security solutions such as antivirus. On the other hand, we believe that this threat will continue to be active in Mexico over the next few months, possibly changing its infrastructure and distribution methods, however, when we make the comparison with old <a href=\"https:\/\/www.virustotal.com\/gui\/file\/1890873cfde0c3ab8655d0c0355d2da4fabd821d5d0aec0250dcea4faa0fd694\">samples<\/a>, we do not observe significant changes in the code, so that a detection based on patterns could be effective.<\/p>\n<p>Additionally, any user who is not aware of the social engineering techniques used by cybercriminals and does not have constantly updated security solutions could be a victim of BlackParty, as we have seen with other similar threats. It should be remembered that most of these trojans generally impersonate government websites and use pretexts such as invoices, payment receipts and electronic transfers to distribute malware.<\/p>\n<p>For this reason, at SCILabs we recommend blocking the IOCs provided and making the users of the organizations aware of the techniques used by cybercriminals. On the other hand, we also recommend threat hunting suspicious PowerShell processes, executing obfuscated console commands, and actively searching for processes that abuse legitimate tools like <a href=\"http:\/\/processchecker.com\/file\/LaunchWinApp.exe.html\">LaunchWinApp<\/a> for malicious code injections.<\/p>\n<p><a href=\"#_ftnref1\" name=\"_ftn1\"><\/a><\/p>\n<h1>IOCs<\/h1>\n<p>CE345A1F48896E166FF7D0E7583BC643<br \/>\n38DA67239145DF492415AFDAACF8B8CC<br \/>\nA0EA876FD3EB41EE5F80D3A2DD349F6F<br \/>\nA41D1649A524DFD0E7A256D98D32366E<br \/>\n20DD296E9CABA9A86B9E1D5578B3075F<br \/>\n9CEB35DB24F1514D95C6AC75D1A6BC39<br \/>\n1D57FC403FCE72C9A2ED73E178585C77<br \/>\n640D5A5FE954C4EFDD4AEECE468E99FB<br \/>\nFIESTADROPS[.]CC<br \/>\nELINDIO[.]COM[.]MX\/SAT<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview The following post provides TTPs and IoCs identified by SCILabs related to a campaign detected in Mexico delivering a<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[14,15,18],"class_list":["post-137","post","type-post","status-publish","format-standard","hentry","category-malware","tag-latam","tag-malware","tag-trojan"],"_links":{"self":[{"href":"https:\/\/blog.scilabs.mx\/en\/wp-json\/wp\/v2\/posts\/137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.scilabs.mx\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.scilabs.mx\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.scilabs.mx\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.scilabs.mx\/en\/wp-json\/wp\/v2\/comments?post=137"}],"version-history":[{"count":0,"href":"https:\/\/blog.scilabs.mx\/en\/wp-json\/wp\/v2\/posts\/137\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.scilabs.mx\/en\/wp-json\/wp\/v2\/media?parent=137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.scilabs.mx\/en\/wp-json\/wp\/v2\/categories?post=137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.scilabs.mx\/en\/wp-json\/wp\/v2\/tags?post=137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}