SEASPY
- Type
- Backdoor
- Capabilities
- PersistencePost exploitationDefense evasion
- Delivery
- Phishing
- Platforms
- LinuxNetwork device
SEASPY is a persistent, passive Linux backdoor targeting Barracuda Networks Email Security Gateway (ESG) appliances. Associated with the China-linked espionage group UNC4841, it provides arbitrary command execution and maintains access to compromised appliances. Analyzed samples are statically linked x86-64 ELF executables based on the open-source cd00r backdoor.
SEASPY masquerades as a legitimate Barracuda service and uses libpcap to passively inspect TCP traffic on SMTP ports 25 and 587. A specially crafted packet sequence activates a TCP reverse shell to attacker-controlled infrastructure. Variants use different embedded trigger values, and some require attacker authentication before opening the shell. Persistence is established through system initialization mechanisms and modifications to appliance maintenance scripts, allowing execution after reboot.
UNC4841 deployed SEASPY alongside SALTWATER and SEASIDE after exploiting CVE-2023-2868, a command-injection vulnerability in ESG attachment processing. Exploitation began no later than October 2022 and used malicious email attachments to execute an initial reverse-shell payload that subsequently downloaded SEASPY. Updated SEASPY variants were also deployed through exploitation of CVE-2023-7102 using specially crafted Excel attachments. These operations targeted public- and private-sector organizations worldwide, including government agencies, and supported long-term espionage and email theft. UNC4841 modified SEASPY components following remediation attempts to retain access.
Associated vulnerabilities
2 CVEs Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
Associated threat actors
1 distinct threat actor Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
The company later revealed that the flaw had been exploited as a zero-day for at least seven months, since at least October 2022, to drop previously unknown SeaSpy and Saltwater malware and steal data from compromised devices.
Techniques & procedures
23 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
2 techniques
Initial Access
In real-world attacks, unidentified threat actors exploited the vulnerability for initial access into victim organizations.
...pourrait permettre à un attaquant distant de déployer des logiciels malveillants notamment (SEASPY et SALTWATER) via des pièces jointes d'email au format Excel spécialement conçues.
Execution
4 techniques
Execution
“execution of their initial reverse shell via hourly and daily cron jobs… /etc/cron.hourly/… /etc/cron.daily/…”
A remote and unauthenticated threat actor may exploit the vulnerability to execute code on vulnerable assets... A remote attacker may format file names in a specific way to enable the remote execution of system commands via Perl's qx operator.
a remote attacker can construct these file names specially in a way that will enable remote system command execution using Perl's qx operator with the privileges of the Email Security Gateway product.
This can be exploited by an email attachment that results in execution of a reverse shell payload into the affected product.
Persistence
6 techniques
Persistence
“persistently executed SEASPY on appliance reboot through…addition to /etc/init.d/rc…”
“execution of their initial reverse shell via hourly and daily cron jobs… /etc/cron.hourly/… /etc/cron.daily/…”
SEASPY prend également en charge une fonctionnalité de backdoor activé par un "magic packet"
SEASPY is a persistent and passive backdoor that masquerades as a legitimate Barracuda service.
This artifact is a 64-bit ELF file that has been identified as a "SEASPY" malware variant installed as a system service.
“maintained persistent execution…by inserting…into the update_version Perl script… system('<PATH_TO_SEASPY> eth0')”
Privilege Escalation
4 techniques
Privilege Escalation
“persistently executed SEASPY on appliance reboot through…addition to /etc/init.d/rc…”
“execution of their initial reverse shell via hourly and daily cron jobs… /etc/cron.hourly/… /etc/cron.daily/…”
This artifact is a 64-bit ELF file that has been identified as a "SEASPY" malware variant installed as a system service.
“maintained persistent execution…by inserting…into the update_version Perl script… system('<PATH_TO_SEASPY> eth0')”
Stealth
4 techniques
Stealth
SEASPY, a second backdoor malware that impersonates Barracuda Network service
“UNC4841 has repeatedly utilized time-stomping to further hide their malicious activity.”
SEASPY prend également en charge une fonctionnalité de backdoor activé par un "magic packet"
“SANDBAR…contains hooks to hide processes…hides the process ID from being displayed when the /proc filesystem is queried.”
Defense Impairment
1 technique
Defense Impairment
“UNC4841 quickly made modifications to both SEASPY and SALTWATER related components in order to prevent effective patching.”
Credential Access
2 techniques
Credential Access
SEASPY, a second backdoor malware that impersonates Barracuda Network service and “establishes itself as a PCAP filter, specifically monitoring traffic on port 25”
It is noticeable that victim SSL certificates also been exfiltrated then were used on malware command and control (C2) servers.
Discovery
1 technique
Discovery
SEASPY, a second backdoor malware that impersonates Barracuda Network service and “establishes itself as a PCAP filter, specifically monitoring traffic on port 25”
Command and Control
6 techniques
Command and Control
SALTWATER is a backdoor that can perform DNS resolution and establish communications, over the network, using a TLS version 1 connection.
“SALTWATER (a trojanized SMTP module enabling command execution and tunneling)… SEASIDE… turns SMTP HELO/EHLO data into reverse shells”
These backdoors functioned by capturing the SMTP traffic, proxying into victim environments and maintaining persistence.
Once access was achieved, both novel and known customized malware were deployed to victim organizations. Observed malware includes: SALTWATER... capable of file upload/download
SEASPY prend également en charge une fonctionnalité de backdoor activé par un "magic packet"
The reverse shell establishes communication with the threat actor’s command and control (C2) server...
Exfiltration
1 technique
Exfiltration
The exfiltration of the email data happen from the Barracuda ESG mstore.
Observables
51 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
18 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.