The US Cybersecurity and Infrastructure Security Agency (CISA) has published analysis reports on three malware families deployed in an attack exploiting a recent remote command injection vulnerability in Barracuda Email Security Gateway (ESG).
Tracked as CVE-2023-2868 and affecting versions 5.1.3.001 to 9.2.0.006 of the appliance, the flaw was exploited as a zero-day starting at least October 2022. Barracuda released patches for the bug in late May 2023.
A Chinese state-sponsored cyberespionage group tracked as UNC4841 was seen exploiting the vulnerability to gain access to victim networks, execute a reverse shell, and then download custom backdoors for persistence.
Identified malware families include the SeaSpy, SaltWater, and SeaSide custom backdoors, the SandBar rootkit, and SeaSpray and SkipJack, which are trojanized versions of legitimate Barracuda Lua modules.
The observed attacks targeted victims in at least 16 different countries, including government officials and high-profile academics. More than half of the impacted organizations are in the Americas.
On Friday, CISA published malware analysis reports detailing an exploit payload and backdoor, the SeaSpy backdoor, and Submarine, a persistent backdoor executed with root privileges, which have been used in at least one attack that exploited the Barracuda appliance.
The agency says it has obtained 14 malware samples representing “Barracuda exploit payloads and reverse shell backdoors”.
Delivered via a phishing email containing a malicious attachment, the payload triggers the command injection (CVE-2023-2868) to deploy and execute a reverse shell that establishes command-and-control (C&C) communication via OpenSSL and fetches the SeaSpy backdoor, CISA explains.
The SeaSpy backdoor, which masquerades as a legitimate Barracuda service, monitors traffic from the C&C for a command to establish a TCP reverse shell that provides the attackers with command execution capabilities.
Submarine, CISA says, is a novel persistent backdoor “that lives in a Structured Query Language (SQL) database on the ESG appliance”, providing attackers with lateral movement capabilities.
“Submarine comprises multiple artifacts—including a SQL trigger, shell scripts, and a loaded library for a Linux daemon—that together enable execution with root privileges, persistence, command-and-control, and cleanup,” the agency notes.
In addition to technical information on the identified samples, CISA’s malware analysis reports include indicators of compromise (IoCs) and YARA rules for detection.