A newly identified macOS backdoor written in Rust appears linked to the prominent ransomware families Black Basta and Alphv/BlackCat, cybersecurity firm Bitdefender reports.
The malware, dubbed RustDoor, impersonates Visual Studio, supports both Intel and Arm architectures, and appears to have been circulating since November 2023, remaining undetected for roughly three months.
Bitdefender has identified several variants of the malware, all sharing the same backdoor functionality, albeit with minor variations.
All analyzed samples support multiple commands to harvest and exfiltrate files and to gather details about the infected machine. The information is sent to a command-and-control (C&C) server to generate a victim ID that is used in subsequent communication.
The first variant of the backdoor, which appeared in November 2023, was likely a test version that lacked a complete persistence mechanism and also contained a plist file named ‘test’.
First seen at the end of November, the second variant had larger files and contained a complex JSON configuration and an Apple script for the exfiltration of specific documents from the Documents and Desktop folders, along with the user’s notes.
The malware copies the documents to a hidden folder and compresses them to a ZIP archive before sending them to the C&C server.
Bitdefender discovered that RustDoor’s configuration file contains options to impersonate different applications, with options to customize a spoofed administrator password dialog.
“Some configurations also include specific instructions about what data to collect, such as the maximum size and maximum number of files, as well as lists of targeted extensions and directories, or directories to exclude,” Bitdefender explains.
The JSON configuration also references four persistence mechanisms, using cronjobs, using the LaunchAgents (resulting in execution at login), by modifying a file to ensure execution when a new ZSH session is opened, and by adding the binary to the dock.
Bitdefender also identified a third variant of the backdoor, which appears to be the original one. First seen on November 2, it lacks complexity, the Apple script, and the embedded configuration.
RustDoor, Bitdefender says, uses three C&C servers previously associated with Black Basta and Alphv/BlackCat ransomware campaigns. First seen in November 2021, BlackCat is the first file-encrypting ransomware written in the Rust programming language. It was taken down in December 2023.