Rekoobe is a Linux backdoor derived from the open-source Tiny SHell project and observed in the wild since at least 2015. Written in C, it supports x86, x64, and SPARC architectures. Its core functions are file upload, file download, and remote shell execution, enabling data theft and deployment of additional payloads. Variants either connect to an attacker-controlled server or wait for inbound connections. Rekoobe authenticates its command-and-control peer and protects communications using HMAC-SHA1-based key derivation and AES-128 encryption.
Rekoobe conceals its activity through process-name masquerading, including impersonation of shells, system services, and appliance-specific software. A BPF-enabled variant targeting South Korean systems passively inspects selected IPv4 and IPv6 traffic for authenticated activation and launches a reverse shell over the standard SMTP port. This variant impersonates SpamSniper email-security components and disables shell-history recording. Rekoobe has also been deployed alongside the Syslogk Linux kernel rootkit, which hides the user-space backdoor and can start or stop it in response to specially crafted network packets.
Rekoobe has been linked to the China-based threat group APT31 and observed in attacks against Korean Linux servers and South Korean telecommunications and email-security environments. Documented delivery chains include supply-chain compromises involving a WordPress plugin and a malicious Go cryptography module. In the Go-module campaign, separate credential-harvesting code and a shell-script stager precede installation of Rekoobe. Noodle RAT shares some Rekoobe code but is a distinct malware family.
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.
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.
“Off-the-shelf Linux backdoor: A VMProtected Rekoobe/TinySHell derived backdoor (raw-TCP + OpenSSL + PTY shell) first seen in March 2024.”
“Rekoobe is a backdoor based on Tiny SHell (aka tsh) ... It has been used for years in campaigns targeting Linux/Unix systems.”
34 distinct techniques documented for this family, organized by ATT&CK tactic.
Additionally, there have been reported cases of supply chain attacks where a threat actor targeted a popular WordPress plugin and installed Rekoobe to gain control over compromised systems.
"A malicious Go module, disguised as a legitimate crypto library... exploits namespace confusion to appear routine in dependency graphs."
“uncovered a malicious Go module, github[.]com/xinfeisoft/crypto, that imitates the legitimate golang.org/x/crypto codebase but inserts a backdoor…”
The reverse shell command also has a simple format of redirecting the standard input and output to the socket connected to the C&C server and executing /bin/sh.
912 Open an interactive shell session — up to ten concurrently.
“Any application that vendors or imports this module and invokes ReadPassword becomes a credential collection point.”
"adding a threat actor's SSH key to the 'authorized_keys' file"
BPFDoor and Rekoobe samples wait for a magic packet before opening interactive access.
First, it checks whether the packet is a TCP packet and, in that case, it also checks the source port, which is expected to be 59318. Rekobee will be executed by the rootkit if the magic packet fits the mentioned criteria.
The BPFDoor variants create a raw PF_PACKET socket, attaching a classic BPF filter.
"adding a threat actor's SSH key to the 'authorized_keys' file"
Adore-Ng is a relatively old, open-source, well-known kernel rootkit for Linux... It enables hiding processes, files, and even the kernel module... In this post, we refer to this rootkit as Syslogk rootkit.
Strings are hidden with a rotating substitution alphabet.
Rekoobe disguises itself by changing its process name to “/bin/bash”, which matches the name of a normal process.
Malware can emulate that appearance in two ways. It can overwrite its own argv[0] ... or it can call prctl(PR_SET_NAME).
The SpamSniper /var/run/spamsniper.pid mutex, together with the sample provenance, ties this build to the South Korean cluster.
“downloads additional payloads… while disguising them with the .mp5 extension”
"executes them, and deletes them from disk to reduce forensic evidence."
VIMINIT="set viminfo=", HISTFILE=/dev/null, HISTSIZE=0, and HISTFILESIZE=0.
“then deletes the dropped files to reduce on disk artifacts”
That key seeds RC4's key-scheduling algorithm, and the resulting S-box is used directly as a keystream.
BPFDoor and Rekoobe samples wait for a magic packet before opening interactive access.
First, it checks whether the packet is a TCP packet and, in that case, it also checks the source port, which is expected to be 59318. Rekobee will be executed by the rootkit if the magic packet fits the mentioned criteria.
The BPFDoor variants create a raw PF_PACKET socket, attaching a classic BPF filter.
The malicious payload is hidden from tools like Netstat; when running, it will not appear in the list of services. For this purpose, the rootkit uses the function hk_t4_seq_show.
The hk_proc_readdir function of the rootkit hides directories containing malicious files... Syslogk rootkit hooks the VFS functions for hiding the Rekoobe payload stored in the file /etc/rc-Zobk0jpi/PgSD93ql.
The malicious processes are hidden via hk_getpr – a mix of Adore-Ng functions for hiding processes... the Syslogk rootkit is prepared for hiding a process called PgSD93ql.
"loosening firewall restrictions by setting iptables policies to ACCEPT"
"injects malicious code into the 'ssh/terminal/terminal.go' file... within the 'ReadPassword()' function... capture sensitive credentials entered by users at terminal password prompts"
"...steal files..."
"injects malicious code into the 'ssh/terminal/terminal.go' file... within the 'ReadPassword()' function... capture sensitive credentials entered by users at terminal password prompts"
Based on this, a reverse shell connects to the C&C server.
“exfiltrates passwords via HTTP POST… fetches a GitHub hosted ‘update’ resource”
Depending on the value of this 1 byte, three different commands can be performed: file upload, file download, or reverse shell execution.
BPFDoor and Rekoobe samples wait for a magic packet before opening interactive access.
First, it checks whether the packet is a TCP packet and, in that case, it also checks the source port, which is expected to be 59318. Rekobee will be executed by the rootkit if the magic packet fits the mentioned criteria.
The BPFDoor variants create a raw PF_PACKET socket, attaching a classic BPF filter.
It is a compiled backdoor trojan written in C programming language... widely known as the Rekoobe malware family... embedded in a fake SMTP server, which spawns a shell when it receives a specially crafted command.
It looks like an innocent SMTP server, but there is a backdoor command on it that can be executed when handling the starttls command... For triggering the Rekoobe backdoor command (spawning a shell), the attacker must send the byte 0x03 via TLS...
Both Tiny SHell and Rekoobe utilize the HMAC SHA1 algorithm to generate an AES-128 key. This key is then used to encrypt the communication data with the C&C server.
The command interface relies on the same cryptography (HMAC-SHA1, AES-CBC) and opcodes as the standard Tinyshell/Rekoobe.
21 Download a file from the host, with resume support.
105 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
22 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.