The Black Basta ransomware operators have been observed exploiting the Microsoft PrintNightmare vulnerability after gaining initial access in a recent attack in order to perform privileged file operations.
Black Basta has tallied up a total of 50 victims as of June 24 since its operations started in April. The ransomware has targeted a wide range of industries in the U.S. Canada, UK and Australia, including manufacturing, transportation, telecommunications and pharmaceuticals. The ransomware, which also has a Linux variant that has targeted VMware ESXi virtual machines, is known for double-extortion attacks, where data is first exfiltrated before the ransomware is deployed.
In a recent attack, researchers with Trend Micro found evidence that pointed to the ransomware group exploiting the PrintNightmare vulnerability (CVE-2021-34527), a remote code execution flaw in the Windows print spooler service that Microsoft issued patches for in July 2021. Other ransomware groups, such as Vice Society, have previously targeted unpatched instances of the vulnerability as part of their attacks.
“Exploiting this vulnerability, Black Basta abused the Windows Print Spooler Service or spoolsv.exe to drop its payload, spider.dll, and perform privileged file operations,” said Trend Micro researchers in a Thursday analysis. “It also exploited the vulnerability to execute another file in the affected system, but samples of this file were no longer available in the system.”
The recent Black Basta ransomware attack started with spear-phishing emails containing Excel files with Excel 4.0 macros. These macros, once enabled, deployed the Qakbot banking trojan. The use of Qakbot is a known method for Black Basta operators to maintain persistence on the network. The trojan, which was uncovered in 2007, has previously been used to deploy several other high-profile ransomware families like REvil and Egregor. In addition to saving time for ransomware operators, Qakbot also has several capabilities that can be used for lateral movement, data collection and reconnaissance.
Once deployed, Qakbot started to download several components used in its infection chain. One of these components is the Cobeacon backdoor, which was executed using a fileless PowerShell script with multiple obfuscation layers.
“The Base64-encoded shellcode of the installed Cobeacon establishes and names a pipe for communication that is possibly used for exfiltration purposes once information has been collected from a targeted system,” said researchers. “The Black Basta ransomware group posts this information on its leak sites if the victim does not pay the ransom.”
Another backdoor called Coroxy was also downloaded, which is known to give attackers unauthorized access and control to infected systems. In this specific incident, attackers used Coroxy while also abusing the Netcat networking utility tool to move laterally across the network. After gaining a foothold on the network, attackers then executed the Black Basta ransomware. In previous attacks an encoded PowerShell command has been leveraged to use WMI and push out the ransomware binary, according to Cybereason researchers. Once deployed, the ransomware encrypted the files on the target’s machine and left a ransom note for the user.
Researchers said there are several measures users can take to mitigate against Black Basta ransomware attacks. Black Basta has typically used phishing emails for initial access, so organizations should adhere to email security best practices, including making sure that end users are wary of various emails and verify email senders and content before opening or downloading any attachments. In addition, organizations should ensure that they have stayed up to date with security fixes, including ones that have been available for CVE-2021-34527 since last year.