{"id":19596,"date":"2022-07-14T05:21:01","date_gmt":"2022-07-14T13:21:01","guid":{"rendered":"http:\/\/www.palada.net\/index.php\/2022\/07\/14\/news-13329\/"},"modified":"2022-07-14T05:21:01","modified_gmt":"2022-07-14T13:21:01","slug":"news-13329","status":"publish","type":"post","link":"http:\/\/www.palada.net\/index.php\/2022\/07\/14\/news-13329\/","title":{"rendered":"BlackCat ransomware attacks not merely a byproduct of bad luck"},"content":{"rendered":"<p><strong>Credit to Author: Andrew Brandt| Date: Thu, 14 Jul 2022 11:05:03 +0000<\/strong><\/p>\n<div class=\"entry-content lg:prose-lg mx-auto prose max-w-4xl\">\n<p>A ransomware group attacking large organizations with malware called BlackCat has followed a consistent pattern over the past several months: The threat actors break in to enterprise networks by exploiting vulnerabilities in unpatched or outdated firewall\/VPN devices, then pivot to internal systems after establishing a foothold from the firewall.<\/p>\n<p>Since December 2021, Sophos has been called in to investigate at least five attacks involving this ransomware. In two of the cases, the attackers made their initial access to the target\u2019s network by exploiting a vulnerability that was first disclosed in 2018 and affected a particular firewall vendor\u2019s product. In two others, the attackers targeted a different firewall vendor\u2019s product with a vulnerability that was disclosed last year.<\/p>\n<p>In all but one of the incidents we investigated, the vulnerabilities permitted the attackers to obtain VPN credentials from memory on the firewall devices, which they could then use to log in to the VPN as if they were an authorized user. None of the targets used multifactor authentication for these VPNs. The one outlier appears to have been a spearphishing attack that revealed an internal user&#8217;s VPN login credentials to the attackers.<\/p>\n<p>Once inside the network, the attackers predominantly used RDP to move laterally between computers, conducting brute-force attacks over the VPN connection against the Administrator account on machines inside the network. The ransomware executable has functionality to spread itself laterally to Windows machines, as well as specific capabilities designed to target VMware ESXi hypervisor servers.<\/p>\n<figure id=\"attachment_85591\" aria-describedby=\"caption-attachment-85591\" style=\"width: 640px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-helpfile-text.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-85591\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-helpfile-text.png\" alt=\"\" width=\"640\" height=\"326\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-helpfile-text.png 1045w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-helpfile-text.png?resize=300,153 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-helpfile-text.png?resize=768,392 768w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-helpfile-text.png?resize=1024,522 1024w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-85591\" class=\"wp-caption-text\">The command flags that can be used with BlackCat<\/figcaption><\/figure>\n<p>In one case, when Sophos incident responders removed the compromised VPN accounts from the firewall and created new username\/password combinations, the attacker just ran the same exploit a second time and was able to extract newly created passwords that were being used in the incident response, and carry on attempting to encrypt machines.<\/p>\n<h3>Wide Range of Remote Access Tools<\/h3>\n<p>Once they had gained a foothold on an internal computer, the attackers installed various remote access utilities to give themselves backup methods of remotely connecting to the targets\u2019 networks. Attackers used the commercial tools <strong>AnyDesk<\/strong> and <strong>TeamViewer<\/strong>, and also installed an open-source remote access tool called <strong>nGrok<\/strong>.<\/p>\n<figure id=\"attachment_85592\" aria-describedby=\"caption-attachment-85592\" style=\"width: 781px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-anydesk-installation-powershell.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-85592\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-anydesk-installation-powershell.png\" alt=\"\" width=\"781\" height=\"210\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-anydesk-installation-powershell.png 808w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-anydesk-installation-powershell.png?resize=300,81 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-anydesk-installation-powershell.png?resize=768,206 768w\" sizes=\"auto, (max-width: 781px) 100vw, 781px\" \/><\/a><figcaption id=\"caption-attachment-85592\" class=\"wp-caption-text\">A portion of the PowerShell script used by threat actors to install commercial remote access tool AnyDesk on targeted systems, and assign a password of <strong>Password123X**<\/strong> to the client<\/figcaption><\/figure>\n<p>The attackers also used PowerShell commands to download and execute<strong> Cobalt Strike<\/strong> beacons on some machines, and a tool called <strong>Brute Ratel<\/strong>, which is a more recent pentesting suite with Cobalt Strike-like remote access features. The attackers had installed the Brute Ratel binary as a Windows service named <strong>wewe<\/strong> on at least one affected machine.<\/p>\n<figure id=\"attachment_85593\" aria-describedby=\"caption-attachment-85593\" style=\"width: 640px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-bruteratel-config.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-85593\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-bruteratel-config.png\" alt=\"\" width=\"640\" height=\"212\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-bruteratel-config.png 1189w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-bruteratel-config.png?resize=300,99 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-bruteratel-config.png?resize=768,254 768w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-bruteratel-config.png?resize=1024,339 1024w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-85593\" class=\"wp-caption-text\">The Brute Ratel configuration file, decrypted<\/figcaption><\/figure>\n<p>Investigating the ransomware cases were complicated by the fact that some of the targeted organizations were running servers that had previously been compromised using the Log4j vulnerability; Some servers were discovered to have been running a variety of cryptominers and other nuisance malware that were unrelated to the ransomware incident.<\/p>\n<p>Complicating the analysis, the ransomware binary itself requires that whoever deploys it adds an &#8220;access token&#8221; (a 64-byte hexadecimal string) to the command line that launches the executable, or else it won&#8217;t run. During test executions of the ransomware, it engages in an attempt to discover Windows network shares and copy itself to those locations. When run in a Windows virtual machine, the ransomware mounted several shares as new drive letters and duplicated itself to the root of those drives.<\/p>\n<p>In addition to ransoming computers on the network, the threat actors spent some time searching around for, collecting, and then exfiltrating large volumes of sensitive data from the targets, uploading them to the cloud storage provider Mega. The attackers used a third-party tool called <strong>DirLister<\/strong> to create a list of accessible directories and files, or in some cases used a PowerShell script from a pentester toolkit, called <strong>PowerView.ps1,<\/strong> to enumerate the machines on the network, and in some cases they used a tool called <strong>LaZagne<\/strong> to extract passwords saved on various devices.<\/p>\n<p>Once the attackers had collected the files they planned to exfiltrate, they used the WinRAR compression utility to compress the files into .rar archives. They used a tool called <strong>rsync<\/strong> to upload the stolen data from some networks, but also used Mega\u2019s own <strong>MEGASync<\/strong> software, or in some cases, just the Chrome browser.<\/p>\n<p>During the data collection process, the attackers ran various PowerShell scripts that could find and extract saved credentials. For instance, an attacker in the February attack left behind a file named <strong>Veeam-Get-Creds.ps1<\/strong>, which can extract saved passwords used by Veeam software to connect to remote hosts.<\/p>\n<p>Aside from the abuse of vulnerable firewalls as a point of entry, and the fact the targets had lots of vulnerable machines inside their network, there weren\u2019t any consistent characteristics of the victims who were attacked. Two of the targeted companies are based in Asia, one in Europe. The industry segment in which each of the targets do business is distinct from the others.<\/p>\n<h3>Getting Inside Was the Easy Part<\/h3>\n<p>The initial break-ins in each case took place before the target engaged Sophos for incident response. In the earliest case, where we began working with the target in early December, we found evidence that the attackers had penetrated the network as much as a month prior to when we began the investigation and had installed cryptominer software on 16 servers inside the company network in early November.<\/p>\n<figure id=\"attachment_85594\" aria-describedby=\"caption-attachment-85594\" style=\"width: 640px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-ransom-note.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-85594\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-ransom-note.png\" alt=\"\" width=\"640\" height=\"431\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-ransom-note.png 945w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-ransom-note.png?resize=300,202 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-ransom-note.png?resize=768,518 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-85594\" class=\"wp-caption-text\">The BlackCat ransom note<\/figcaption><\/figure>\n<p>The attackers in this incident (and in several others as well) dumped the LSASS password store to obtain valid credentials on a domain controller, then used those to create a new account with administrative privileges. The attackers ran a tool called <strong>netscan_portable.exe<\/strong> to find additional targets, then used that newly created account to RDP from machine to machine within the network.<\/p>\n<p>In an attack that took place in February, the attackers had previously exploited the VPN vulnerability to obtain valid credentials, then used them to log in to the enterprise network. Five days after obtaining the VPN credentials, the attackers connected to the VPN and conducted a brute-force password spray attack against a domain controller. They then created a new domain admin account, installed AnyDesk on the DC (presumably as a backup), and used RDP to pivot from machine to machine.<\/p>\n<p>The attackers also installed a tool called <strong>rclone<\/strong>, which Sophos has observed other threat actors using to upload data to cloud storage providers. Two weeks after that initial flurry of activity, the attacker installed a second data uploading tool, <strong>MEGASync<\/strong>, from another user\u2019s compromised account, and began to exfiltrate sensitive data. This suggests that the attacker uploaded data more than once, from two or more servers, using at least these two methods.<\/p>\n<p>In an attack that took place in March, our analysts discovered that the BlackCat attackers had run through a similar game plan to the prior attacks: They exploited a firewall vulnerability, gained remote access through the VPN, and then pivoted internally to target domain controllers and other servers. The team found evidence of Cobalt Strike beacons\/Brute Ratel executables, scripts for performing reconnaissance, and evidence of staging data for exfiltration, but no evidence that it had been uploaded anywhere.<\/p>\n<h2>Custom Malware for Each Target<\/h2>\n<p>As seems to be commonplace in ransomware attacks in 2022, the attackers crafted a custom ransomware binary for each target. The executable contained the ransom note customized to each targeted organization with a link to the BlackCat TOR server where the threat actors would publish examples of stolen data.<\/p>\n<p>The ransomware, when executed, appended a seven-letter file suffix to every encrypted file. The suffix was unique to each targeted organization, applied consistently wherever the attackers could opportunistically launch it.<\/p>\n<p>The attack in December 2021 mainly targeted ESXi servers and encrypted the virtual hard disks for VMs hosted in the hypervisor, rendering those machines inaccessible. During the investigation, Sophos found that more than half the organization\u2019s computers were running Windows 7, for which Microsoft ended support in January 2020.<\/p>\n<figure id=\"attachment_85595\" aria-describedby=\"caption-attachment-85595\" style=\"width: 612px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-iisreset.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-85595\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-iisreset.png\" alt=\"\" width=\"612\" height=\"181\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-iisreset.png 612w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/BlackCat-iisreset.png?resize=300,89 300w\" sizes=\"auto, (max-width: 612px) 100vw, 612px\" \/><\/a><figcaption id=\"caption-attachment-85595\" class=\"wp-caption-text\">BlackCat attempts to stop a wide range of programs and services before encrypting, such as IIS, Microsoft&#8217;s web service<\/figcaption><\/figure>\n<p>As in the December attack, the attack that took place in March also involved hypervisors: The attackers targeted a Hyper-V server and encrypted the virtual disk files for VMs running on that server. But that attack also targeted desktops and laptops as widely as possible on the enterprise network. The attack in February targeted both servers and other endpoints. An attack that took place in May involved a Citrix server.<\/p>\n<h2>Security Failures Sink the Ship<\/h2>\n<p>While the attackers ultimately are to blame for the harm they caused, the targets didn\u2019t do themselves any favors.<\/p>\n<p>We found significant numbers of machines that were so out-of-date it wasn\u2019t even possible to update them anymore. The networks at each target were flat, with every machine able to see every other machine in the network \u2013 something that made it extremely easy for the attackers to scan for and identify targets of greatest value. Segregating portions of the network from one another using VLANs would have helped.<\/p>\n<p>The firewall bugs were ancient, and there was evidence that VPN credentials for one of the firewalls had been leaked in a public distribution of VPN username\/password combinations several years ago. Had the target applied the available patches to those firewalls in a more timely manner, things would have been much more complicated for the attackers.<\/p>\n<p>None of the targets were using multifactor authentication for their VPN logins, which would have stopped the attackers cold.<\/p>\n<p>Firewall and user account permissions that provide the least-possible access would also have gone a long way to limiting the damage from the attackers.<\/p>\n<p>The presence of ngrok, a legitimate remote-access tool often abused by attackers, could also have provided an alert to watchful sysadmins. Sophos has an incident response playbook available for those looking to understand how ngrok is abused in cases such as this and how ngrok misuse can be investigated and mitigated on the network.<\/p>\n<h3>Acknowledgments<\/h3>\n<p>SophosLabs wishes to acknowledge the contributions of Andy French, Bill Kearney, Lee Kirkpatrick, and Peter Mackenzie for their help with this report. IOCs relating to the tools used in this attack are posted to the SophosLabs Github, with the exception of the file hashes of the ransomware itself, which could identify the targets.<\/p>\n<p>&nbsp;<\/p>\n<\/p><\/div>\n<p><a href=\"https:\/\/news.sophos.com\/en-us\/2022\/07\/14\/blackcat-ransomware-attacks-not-merely-a-byproduct-of-bad-luck\/\" target=\"bwo\" >http:\/\/feeds.feedburner.com\/sophos\/dgdY<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/07\/maine-coon-gac951282b_1920.jpg\"\/><\/p>\n<p><strong>Credit to Author: Andrew Brandt| Date: Thu, 14 Jul 2022 11:05:03 +0000<\/strong><\/p>\n<p>Older hardware and outdated operating systems contribute to attacks<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[10378,10377],"tags":[25303,20352,26503,129,18513,16771,14138,10863],"class_list":["post-19596","post","type-post","status-publish","format-standard","hentry","category-security","category-sophos","tag-blackcat","tag-citrix","tag-esxi","tag-featured","tag-sophoslabs-uncut","tag-threat-research","tag-vmware","tag-vpn"],"_links":{"self":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/19596","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/comments?post=19596"}],"version-history":[{"count":0,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/19596\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/media?parent=19596"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/categories?post=19596"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/tags?post=19596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}