update (6/16/2023):
In May 2023, Avertium reported on a critical zero-day vulnerability (CVE-2023-2868) found in physical Barracuda Email Security Gateway (ESG) devices. At the time, the vulnerability allowed for remote command injection on versions 5.1.3.001 - 9.2.0.006, and was being exploited by attackers.
Instead of providing a patch for the vulnerability, Barracuda advised that all users replace their ESG appliances – their only remediation and their only recommendation. The company also advised that users contact Barracuda’s customer support via email to replace their devices.
This week, users are discovering a new issue linked to CVE-2023-2868. CISA identified backdoors, named Whirlpool and SeaSpy, used in attacks on Barracuda ESG devices. According to CISA, CVE-2023-2868 was used to inject SeaSpy and Whirlpool backdoor malware payloads onto compromised devices.
While SeaSpy (a known and persistent Barracuda offender) masquerades as a legitimate Barracuda service called "BarracudaMailService," it enables threat actors to execute arbitrary commands on ESG appliances. In contrast, the Whirlpool backdoor is a new offensive tactic, with attackers establishing a TLS reverse shell to the Command-and-Control (C2) server. In June 2023, Mandiant published a report attributing Whirlpool to the Chinese threat actor UNC48
overview
A critical zero-day vulnerability tracked as CVE-2023-2868 was found in physical Barracuda Email Security Gateway appliances and is being exploited by attackers. The vulnerability allows for remote command injection and affects versions 5.1.3.001 - 9.2.0.006.
According to the official CVE listing, the vulnerability occurs due to a failure to completely sanitize the processing of .tar file or tape archives. CVE-2023-2868 stems from insufficient validation of user-supplied file names within the archive. The flaw allows remote attackers to execute system commands using Perl's qx operator with the privileges of the Email Security Gateway product.
Barracuda’s advisory stated that they discovered the vulnerability on May 19, 2023, and immediately applied a patch to all ESG appliances worldwide on May 20, 2023. It's important to note that this vulnerability only affects the module responsible for screening attachments in incoming emails.
Upon investigation, the company identified that the vulnerability resulted in unauthorized access to a subset of email gateway appliances, therefore, all ESG appliances received a second patch on May 21, 2023. Barracuda stated that users whose appliances were impacted have been notified via the ESG user interface and have received instructions on actions to take. Other Barracuda products, including SaaS email security services, were not impacted by this vulnerability.
INDICATORS OF COMPROMISE (IoCs)
FileHash-MD5
FileHash-SHA1
FileHash-SHA256
IP Addresses
YARA
Detection Rules
SUPPORTING DOCUMENTATION
Barracuda Email Security Gateway Appliance (ESG) Vulnerability
Imgur: The magic of the Internet
Barracuda warns of email gateways breached via zero-day flaw (bleepingcomputer.com)
MAR-10454006.r4.v2 SEASPY and WHIRLPOOL Backdoors | CISA
Whirlpool malware rips open old Barracuda wounds | CSO Online
MAR-10454006.r4.v2.CLEAR_.pdf (cisa.gov)
Barracuda Email Security Gateway Appliance (ESG) Vulnerability