XorDDoS is a Linux botnet malware family first identified in September 2014 that recruits compromised systems for distributed denial-of-service attacks. It targets Linux endpoints and servers, including cloud-hosted systems and Docker environments, with variants supporting x86, x64, and ARM architectures. Its name reflects its DDoS functionality and use of XOR-based encryption for command-and-control communications and configuration data. Observed operators include Chinese-speaking individuals, and infections have been documented globally.
The primary infection vector is brute-forcing SSH credentials, particularly root accounts, followed by execution of shell scripts that download and install the malware. Docker-targeting campaigns also exploit exposed, unauthenticated Docker APIs to enumerate existing containers and execute installation commands inside them. Under remote control, XorDDoS performs SYN floods, ACK floods, and DNS-based attacks. It also collects operating-system, kernel, processor, memory, network, and process information; downloads and executes additional payloads; updates itself; and terminates competing malware using remotely supplied configuration.
XorDDoS maintains persistence through initialization scripts, System V runlevel entries, cron jobs, and multiple copies of its executable. Evasion techniques include process-name masquerading, string obfuscation, deletion of installation artifacts, clearing logs and shell history, and appending random data to copied binaries to change their hashes. Some variants deploy a loadable kernel module rootkit that can grant root access and hide the module, processes, network connections, and ports. Installation workflows can obtain a rootkit matched to the victim’s kernel or upload kernel headers for remote compilation; the bot can operate without the rootkit if installation fails.
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.
We uncovered key similarities between RedXOR and previously reported malware associated with Winnti umbrella threat group. These malware are PWNLNX backdoor and XOR.DDOS and Groundhog, two botnets attributed to Winnti by BlackBerry.
45 distinct techniques documented for this family, organized by ATT&CK tactic.
Once XorDdos identifies valid SSH credentials, it uses root privileges to run a script that downloads and installs XorDdos on the target device.
Another, but less common possibility, is exploiting a vulnerable service that you have running (Apache for example).
The malware also tries to persist itself using cron... Recent variants have created two shell script files, "/etc/cron.hourly/cqqbnzzu.sh" and "/etc/cron.hourly/obidhyb.sh", which are executed every hour.
Its infection vector starts with SSH brute force attacks for the sake of running an installation script under the root user.
The malware writes the shell script files to disk, which it uses to execute its various attack phases.
There is a list of C&C commands, for which the bot listens to: To start flooding, to stop flooding, to download-and-execute, to self-update...
This is done by creating symbolic links or executable scripts in the following directories: • (AS1) /etc/init.d/ ... • (AS2) /etc/cron.<S>/ ... • (AS3) /etc/rc<N>.d/
The malware creates a symlink for the init script dropped at the location /etc/init.d/<base_file_name> with the directories associated with runlevels 1 through 5 at /etc/rc<run_level>.d/S90<base_file_name>.
The malware also tries to persist itself using cron... Recent variants have created two shell script files, "/etc/cron.hourly/cqqbnzzu.sh" and "/etc/cron.hourly/obidhyb.sh", which are executed every hour.
Once XorDdos identifies valid SSH credentials, it uses root privileges to run a script that downloads and installs XorDdos on the target device.
The malware first attempts to persist itself using the System V runlevels... This ensures that the malware is automatically started during the boot process.
The commands chkconfig –add <service_name> and update-rc.d then add a service that starts the daemon process at boot.
give_root Provides a root privilege by setting a new set of credentials and assigning its UID, GID to “0”
This is done by creating symbolic links or executable scripts in the following directories: • (AS1) /etc/init.d/ ... • (AS2) /etc/cron.<S>/ ... • (AS3) /etc/rc<N>.d/
The malware creates a symlink for the init script dropped at the location /etc/init.d/<base_file_name> with the directories associated with runlevels 1 through 5 at /etc/rc<run_level>.d/S90<base_file_name>.
The malware also tries to persist itself using cron... Recent variants have created two shell script files, "/etc/cron.hourly/cqqbnzzu.sh" and "/etc/cron.hourly/obidhyb.sh", which are executed every hour.
The central controller can generate a controller binder that will inject a DLL file to the XorDDoS controller to bind network connection and command operation to the sub-controller... allowing the central controller to fully remote control the sub-controllers.
Once XorDdos identifies valid SSH credentials, it uses root privileges to run a script that downloads and installs XorDdos on the target device.
The malware first attempts to persist itself using the System V runlevels... This ensures that the malware is automatically started during the boot process.
The commands chkconfig –add <service_name> and update-rc.d then add a service that starts the daemon process at boot.
The rootkit component with a complicated server-assisted installation is where Xorddos differs from all the other Linux trojans.
In order to obfuscate its malicious code, the malware encodes its data using XOR. It encrypts its data using RC4 PRGA... The malware contains obfuscated stackstrings.
A bot running this type of execution is called as the /usr/bin/bsd-port/getty file.
The central controller can generate a controller binder that will inject a DLL file to the XorDDoS controller to bind network connection and command operation to the sub-controller... allowing the central controller to fully remote control the sub-controllers.
The installation process can consist of several steps: • killing competing time-consuming processes
To avoid detection, the malware deletes its installer scripting and files after completing its attack phases.
Once XorDdos identifies valid SSH credentials, it uses root privileges to run a script that downloads and installs XorDdos on the target device.
cp /lib/libudev4.so /lib/libudev4.so.6 /lib/libudev4.so.6
The malware may attempt to detect it is running on a VM; where artifact strings found in memory can reveal that the system is virtual.
The first method involves copying a malicious ELF file to temporary file storage /dev/shm and then running it. Files written at /dev/shm are deleted during system restart, thus concealing the source of infection during forensic analysis.
The malware calls the subroutine daemon(__nochdir, __noclose) to set itself as a background daemon process... It then calls setsid() to detach itself from the controlling terminal.
Below is an example of how the Trojan hides the TCP port (notice the task value 3):
give_root Provides a root privilege by setting a new set of credentials and assigning its UID, GID to “0”
Distribution starts with either an automated SSH brute-forcing of various Windows and Linux servers or vulnerability scanning and exploiting using the hacking tools and password lists mentioned below.
Figure 4 shows an SSH brute-forcer, where attackers can enter a list of IP addresses and a password list, as well as specifying other parameters of the attack.
give_root Provides a root privilege by setting a new set of credentials and assigning its UID, GID to “0”
ifconfig eth0 ifconfig route -n
The fake commands can include: whoami id ... who
netstat -an netstat -antop
The malware enumerates processes within the "proc" file system to gather information about the system.
The malware reads system information from the proc file system to determine the system's kernel version. It uses the "uname" system call to query kernel version information. It queries for a number of processors.
Iterates the following folders to find a writable directory: /bin /home /root /tmp /usr /etc
The malware may attempt to detect it is running on a VM; where artifact strings found in memory can reveal that the system is virtual.
They then sent a command that listed the containers hosted on the Docker server.
The malware primarily targets Linux-based systems, infiltrating them through brute-force attacks on SSH services.
There is a list of C&C commands, for which the bot listens to: To start flooding, to stop flooding, to download-and-execute, to self-update...
If not, the script locates the kernel headers in /lib/modules/%s/build/ directory... then packs all files and uploads them to the C&C server using a custom uploader called mini .
The C&C messages data section is encrypted using a simple XOR cipher
The bot then establishes communication with its C&C server. The initial packet contains the memory and CPU statistics of the compromised machine.
The malware downloads files from webservers via HTTP.
the hosts issuing the attack were themselves compromised and unwillingly recruited to conduct a DDoS campaign.
The C&C communication occurs via a custom binary protocol.
The malware downloads files from webservers via HTTP to continue the installation of malicious files and launch further installation steps.
The communication is encrypted in both directions with the same hard-coded XOR key (BB2FA36AAA9541F0) as the configuration file.
This binary uses an HTTP POST request to upload the archived kernel headers to the attacker’s server.
Once the information is retrieved, these processes are killed by the malware.
XorDDOS uses infected x86, x64, and ARM systems to launch wide-scale Distributed Denial of Service attacks against other victims.
Any of these methods can be used: SYN Flood, ACK Flood and DNS amplification attacks.
Any of these methods can be used: SYN Flood, ACK Flood and DNS amplification attacks.
114 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
28 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.