RedTail is a multi-architecture Linux cryptocurrency-mining malware family that hijacks compromised systems’ computing resources for unauthorized mining. It incorporates XMRig code and mines Monero through operator-controlled mining proxies. Payloads support x86-64, 32-bit x86, ARM, ARM64, and RISC-V systems. Its campaigns opportunistically compromise internet-facing servers, cloud infrastructure, and network appliances rather than targeting a single industry.
RedTail spreads through SSH password guessing and exploitation of vulnerable services. Observed exploitation includes PHPUnit CVE-2017-9841, Apache HTTP Server CVE-2021-41773 and CVE-2021-42013, PHP-CGI CVE-2024-4577, and Palo Alto Networks PAN-OS CVE-2024-3400. Propagation also targets unauthenticated Docker Engine APIs. Deployment scripts identify the host architecture, select a compatible executable, locate writable and executable storage, and remove staging artifacts. Associated intrusions establish persistent SSH access by installing an attacker-controlled public key and protecting authentication configuration against modification.
The malware profiles processor, memory, virtualization, and other host characteristics to support mining and execution. It establishes reboot persistence through cron, with systemd persistence also observed. Defense-evasion behaviors include UPX packing, process masquerading, deletion of competing persistence entries, and termination of competing miners and monitoring or debugging processes. RedTail also attempts to modify host firewall rules and creates dynamically selected TCP listeners. Analyzed variants use encrypted command-and-control communications, including a custom protocol protected with ChaCha20-Poly1305, and DNS-over-TLS for infrastructure resolution. Its activity is financially motivated; no specific named threat actor is conclusively established.
7 CVEs Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
1 distinct threat actor Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
A truncated RedTail cryptominer sample pulled from MalwareBazaar led us to a full 17.6MB Go binary that revealed capabilities well beyond what prior Akamai and SANS reporting documented. This is not just an XMRig dropper. It is a multi-functional botnet framework with dual CPU/GPU mining (XMRig + NBminer), a PAM authentication backdoor that survives password changes, an SSH brute-force worm with an embedded credential dictionary, systemd persistence, and ChaCha20-encrypted C2 communications -- all compiled into a single Go binary targeting four architectures.
41 distinct techniques documented for this family, organized by ATT&CK tactic.
On October 15, 2024, at 00:47:54 UTC, a threat actor using IP address 5.182.211.148 connected to the honeypot with the credentials "root/nimda."
~40 путей RCE ... /vendor/phpunit/.../eval-stdin.php CVE-2017-9841; /cgi-bin/.%2e/.%2e/…/bin/sh CVE-2021-41773 / CVE-2021-42013; ... CVE-2024-4577.
This script appears to remove any attempt a previous threat actor has made to install cryptomining software, specifically disabling c3pool_miner, a Monero cryptomining tool, as well as any malicious cronjobs and scheduled tasks.
crontab -r; echo "@reboot {}" | crontab -
It then becomes trivial to retrieve the address of the first-stage payload, which is a .sh script.
This script appears to remove any attempt a previous threat actor has made to install cryptomining software, specifically disabling c3pool_miner, a Monero cryptomining tool, as well as any malicious cronjobs and scheduled tasks.
crontab -r; echo "@reboot {}" | crontab -
On October 15, 2024, at 00:47:54 UTC, a threat actor using IP address 5.182.211.148 connected to the honeypot with the credentials "root/nimda."
The threat actor then adds a SSH public key to the authorized_keys file by using the echo ssh-rsa ... rsa-key-20230629 command. This allowed the threat actor to gain persistent access without needing a password, establishing a backdoor.
Персистенс — сервис your-redtail.service.
RedTail's binary includes CGo bindings to the complete PAM API ... It is a full PAM module that can intercept and override the authentication process itself. Once installed, the malware can accept a hardcoded password for any user account on the system.
This script appears to remove any attempt a previous threat actor has made to install cryptomining software, specifically disabling c3pool_miner, a Monero cryptomining tool, as well as any malicious cronjobs and scheduled tasks.
crontab -r; echo "@reboot {}" | crontab -
As recently as April 2024, a new variant of redtail was documented, exploiting a critical vulnerability in Palo Alto Networks' PAN-OS (CVE-2024-3400). This vulnerability allows a threat actor to create an arbitrary file that could eventually enable command execution with root privileges on the NGFW.
On October 15, 2024, at 00:47:54 UTC, a threat actor using IP address 5.182.211.148 connected to the honeypot with the credentials "root/nimda."
The threat actor then adds a SSH public key to the authorized_keys file by using the echo ssh-rsa ... rsa-key-20230629 command. This allowed the threat actor to gain persistent access without needing a password, establishing a backdoor.
Персистенс — сервис your-redtail.service.
According to static analysis, this binary is packed using UPX.
and shows UPX packing common in other coin miners
Маскируется под что угодно живое: php-fpm: pool www; nginx: worker process; postgres...; /bin/mariadbd; systemd-worker.
After successful authentication, the binary deploys itself to the new target via SFTP, masquerading as sshd -- the legitimate SSH daemon process name.
After the script runs, the threat actor forcefully removes any evidence of the clean.sh script; this is accomplished using the rm -rf command... the threat actor follows the same steps to make setup.sh executable, runs the script, and then forcibly removes any evidence that the script was present on the system.
Static setup.sh analysis found that it deletes identifiable redtail.* architecture-specific payload files; clean.sh removes temporary-directory contents and filters persistence-related files.
On October 15, 2024, at 00:47:54 UTC, a threat actor using IP address 5.182.211.148 connected to the honeypot with the credentials "root/nimda."
The malware queried DMI identifiers and received the hypervisor CPU flag, QEMU vendor strings, SeaBIOS, and a Q35 virtual-machine identifier, but continued execution.
Static examination of setup.sh found that it copies the selected RedTail binary into a randomly generated dot-prefixed filename before execution.
Она убивает всё в своём PID-пространстве... и заодно любую отладку, потому что отладчик — это просто ещё один сосед-процесс.
The threat actor then uses the chattr (change attribute) command with -ia to remove the immutable and append only attributes for the authorized_keys file... Then the chattr +ia command is run to reestablish the immutable and append only attributes to the authorized_keys file. This makes the file more difficult to delete, aiding in maintaining persistence.
The static setup.sh analysis states that the selected RedTail binary is copied into a randomly generated dot-prefixed filename and marked executable.
RedTail's binary includes CGo bindings to the complete PAM API ... It is a full PAM module that can intercept and override the authentication process itself. Once installed, the malware can accept a hardcoded password for any user account on the system.
При старте сносит конкурентов ... и заодно любую отладку.
iptables -F ; iptables -I INPUT -p tcp --dport {} -j ACCEPT
the actor successfully logs in using the [ root/Passw0rd123 ] credentials... The IP tried to login via SSH using brute force
Docker Engine API :2375 (без auth) и SSH-брутфорс
The SSH worm component ... Brute-force with embedded dictionary ... The embedded credential dictionary is predictable but effective
RedTail's binary includes CGo bindings to the complete PAM API ... It is a full PAM module that can intercept and override the authentication process itself. Once installed, the malware can accept a hardcoded password for any user account on the system.
RedTail enumerated running processes through /proc, resolved their executable paths, and inspected command-line arguments before selectively issuing SIGKILL.
Телеметрия бэкона: модель CPU, cgroups, ProcessName, LinuxCgroup — оператор собирает «паспорт» хоста.
Search for a writable directory that is not mounted with noexec ... Later variants parse /proc/mounts directly to identify candidate directories.
The malware queried DMI identifiers and received the hypervisor CPU flag, QEMU vendor strings, SeaBIOS, and a Q35 virtual-machine identifier, but continued execution.
Телеметрия бэкона: модель CPU, cgroups, ProcessName, LinuxCgroup.
Она убивает всё в своём PID-пространстве... и заодно любую отладку, потому что отладчик — это просто ещё один сосед-процесс.
The binary embeds a full SSH client library ... and uses it for automated lateral movement.
After successful authentication, the binary deploys itself to the new target via SFTP, masquerading as sshd
Collection Data from Local System T1005 SSH key harvesting ( known_hosts , id_rsa )
Thanks to dynamic analysis, it is easy to identify the malware’s C2 server. The malware connects to this C2 server on port 43782.
The C2 channel itself uses HTTP/2 over TLS, making traffic analysis difficult
Бот резолвит свои C2 через DNS-over-TLS на порт 853, ротируя публичные резолверы.
A RedTail-backed process was observed listening on 0.0.0.0 at dynamically selected high-numbered ports 39539, 40219, and 39983.
This script is used to download, in turn, another script (named clean), which the attacker uses to remove previous malicious activity, as well as a second-stage binary for malicious purposes.
130.12.180.51 | 43782 | C2, канал dcb; ... 95.215.19.53 | 853 | C2 под DNS-over-TLS.
X25519 (ECDH) ... ChaCha20-Poly1305 (AEAD) — защита записей.
During malware execution, strace recorded: kill(1199, SIGKILL) = 0; after execution, inotifywait was no longer running.
Linux-майнер RedTail (XMRig внутри, SSH-червь вокруг)
60 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
14 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.