Enemybot
- Type
- Botnet
- Capabilities
- DDOSScanningBrute forceInitial accessPersistenceDefense evasionReconnaissancePost exploitation
- Delivery
- USB
- Platforms
- LinuxAndroidmacOSNetwork deviceIOT
EnemyBot is a multi-architecture DDoS botnet first identified in 2022 and attributed to the Keksec cybercrime group, also known as Kek Security. It primarily targets Linux servers, routers, and other IoT devices, with additional infection functionality for Android devices. Its codebase draws extensively from Gafgyt and Mirai, incorporates components from other botnets, and includes custom functionality. Its publicly released source code enables reuse by other operators.
EnemyBot self-propagates by scanning pseudorandom IP addresses, attempting hardcoded default credentials, and exploiting vulnerabilities in internet-facing services. Targets include routers, web servers, content management systems, and enterprise applications. Its exploit repertoire includes Log4Shell, Spring Cloud Gateway CVE-2022-22947, VMware Workspace ONE CVE-2022-22954, and D-Link CVE-2015-2051. EnemyBot has been deployed through exploitation of CVE-2022-22954 and embeds that exploit for subsequent propagation. It also attempts infection through exposed Android Debug Bridge services and USB-connected Android devices. Successful compromise typically triggers a shell-based downloader that retrieves and executes an architecture-specific payload.
EnemyBot supports multiple DDoS methods, including TCP, UDP, HTTP, TLS, DNS, SSDP, and ICMP flooding. Operators can execute shell commands, establish reverse shells, control scanning and packet-sniffing functions, and download additional payloads. Infected systems continue scanning while awaiting commands. Observed variants establish persistence through cron scheduling, randomize process names, remove downloaded installation artifacts, and use string encoding or XOR obfuscation to hinder analysis. Tor-based command-and-control conceals operator infrastructure. Development during 2022 included frequent revisions and rapid incorporation of newly disclosed exploits, expanding its reach beyond embedded devices to vulnerable server applications.
Associated vulnerabilities
23 CVEs Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
11 more CVEs associated with this family tracked in Mallory.
Associated threat actors
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.
EnemyBot is mainly built on Gafgyt’s source code, with several modules from the original Mirai source code, and other botnets.
Techniques & procedures
24 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
3 techniques
Initial Access
It uses a list of hardcoded username/password combinations to login into devices in the attempt to access systems using weak or default credentials.
The bot also tries to run shell commands to infect misconfigured Android devices that expose Android Debug Bridge port (5555).
EnemyBot is selfpropagating by scanning pseudo-random IP ranges for known vulnerabilities.
Execution
2 techniques
Execution
Once exploited one of the above flaws, the bot runs a shell command to download a shell script from a URL that is dynamically updated by the C2 using the command LDSERVER.
CVE-2022-22954, a remote code execution (RCE) vulnerability due to server-side template injection in VMware Workspace ONE Access and Identity Manager, is trivial to exploit with a single HTTP request to a vulnerable device.
Persistence
2 techniques
Persistence
It uses a list of hardcoded username/password combinations to login into devices in the attempt to access systems using weak or default credentials.
The bot also tries to run shell commands to infect misconfigured Android devices that expose Android Debug Bridge port (5555).
Privilege Escalation
1 technique
Privilege Escalation
It uses a list of hardcoded username/password combinations to login into devices in the attempt to access systems using weak or default credentials.
Stealth
5 techniques
Stealth
The message was stored as cleartext in earlier samples, new samples were released with the message encoded with an XOR operation using a multiple-byte key.
Each line of the script attempts to download (again using various methods), set permissions to execute (777), execute from /tmp/ and then delete the original ELF binary.
It uses a list of hardcoded username/password combinations to login into devices in the attempt to access systems using weak or default credentials.
Dynamic Analysis of the EnemyBot malware did not provide anything useful as the malware seems to have killed itself soon after execution. There appear to be some baked-in counter forensics that kill the application based on certain detected process names.
The malware also initiates system checks to determine whether or not the malware is already running. After the instance starts there are two possible outputs: “Determined we already have a instance running…” “Binded and listen on address %d.%d.%d.%d.\n”
Defense Impairment
1 technique
Defense Impairment
At the same time, Mirai killed other processes running at TCP ports 23 and 2323 together with any possible competing Mirai variants.
Credential Access
1 technique
Credential Access
Mirai attempted a brute-force attack with a pre-configured list of known factory defaults and most commonly used credentials.
Discovery
4 techniques
Discovery
“Stateless” TCP SYN probes to pseudorandom IPs on Telnet ports 23 and 2323 Once targets were identified, Mirai attempted a brute-force attack...
Scrubbing the file in a decompile, it appears to feature a host of networking options such as port scanners, TCP/UDP flood options and general system enumeration.
Dynamic Analysis of the EnemyBot malware did not provide anything useful as the malware seems to have killed itself soon after execution. There appear to be some baked-in counter forensics that kill the application based on certain detected process names.
The malware also initiates system checks to determine whether or not the malware is already running. After the instance starts there are two possible outputs: “Determined we already have a instance running…” “Binded and listen on address %d.%d.%d.%d.\n”
Lateral Movement
2 techniques
Lateral Movement
Mapped to MITRE ATT&CK The findings of this report are mapped to the following MITRE ATT&CK Matrix techniques: TA0008: Lateral Movement: T1210: Exploitation of Remote Services T1021: Remote Services
Mapped to MITRE ATT&CK The findings of this report are mapped to the following MITRE ATT&CK Matrix techniques: TA0008: Lateral Movement: T1210: Exploitation of Remote Services
Command and Control
6 techniques
Command and Control
Mapped to MITRE ATT&CK The findings of this report are mapped to the following MITRE ATT&CK Matrix techniques: TA0011: Command and Control T1132: Data Encoding T1001: Data Obfuscation
Once the bot has been installed on a device, it connects to its C2 server and waits for further commands
it connects to a command-and-control (C2) server that is hidden in the Tor network, making its takedown more complicated.
Then the script downloads the actual Enemybot binary which is compiled for the target device’s architecture.
Mapped to MITRE ATT&CK The findings of this report are mapped to the following MITRE ATT&CK Matrix techniques: TA0011: Command and Control T1132: Data Encoding
Once established and having removed all possible interference, it was ready to wait for C2 commands, while constantly scanning for new victims...
Exfiltration
2 techniques
Exfiltration
T1030: Proxy: 003: Multi-hop Proxy
The EnemyBot malware also appears to have the ability to steal data via HTTP POST, which in our case, the malware was sending the data back to the original IP address.
Impact
1 technique
Impact
Mirai managed to keep 200,000 – 300,000 enslaved devices and peaked at an unbelievable 600,000... FBI special agents compared Mirai’s 1+ Tbps (1,000 Gbps)... The first Mirai incident was reported after the 18th Sep 2016 attack against popular Minecraft servers hosted on French service OVH.
Observables
36 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
11 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.