Hajime
- Type
- Worm
- Capabilities
- ScanningBrute forceDefense evasionPersistence
- Platforms
- LinuxIOTNetwork device
Hajime is a self-propagating Linux IoT worm first observed in 2016 that recruits routers, digital video recorders, and cameras into a decentralized botnet. It supports multiple ARM and MIPS architectures and compromises devices worldwide through default-credential brute forcing and exploitation of exposed management services. Its propagation methods include Telnet credential attacks, TR-064 command injection, the Chimay-Red exploit against MikroTik routers, and exploitation of GPON router vulnerabilities CVE-2018-10561 and CVE-2018-10562.
Hajime separates peer-to-peer communications and update management from scanning and propagation through a modular architecture. It uses BitTorrent’s public Kademlia distributed hash table for peer discovery and decentralized command and control, transferring architecture-specific components through a custom protocol layered over uTP. Signed configuration updates identify current binaries, enabling rapid distribution of new exploits and core functionality without a conventional centralized command server.
Following infection, Hajime modifies firewall rules to block services commonly targeted by competing IoT malware. Observed implementations also terminate selected processes, disable hardware watchdogs, masquerade as a legitimate Telnet service, and use packed payloads. A big-endian MIPS core update introduced reboot persistence in March 2018.
Hajime is distinguished from many IoT botnets by the absence of observed DDoS or other disruptive attack modules in published analyses. Operator messages and its blocking of competing infection vectors have prompted descriptions of it as a vigilante botnet, but it nevertheless accesses and modifies devices without authorization. Its operators and their affiliation have not been reliably established.
Associated vulnerabilities
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.
Techniques & procedures
15 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
2 techniques
Initial Access
IoT malware scans the Internet for IoT devices that use default or weak usernames and passwords.
Multiple botnets exploited GPON CVE-2018-10561 (authentication bypass) and CVE-2018-10562 (command execution) to expand infections. Muhstik also added exploits for JBoss CVE-2007-1036.
Execution
2 techniques
Execution
echo -ne “ DOWNLOADER_HEX_BYTES ” >> .s ... ./.s>.i; chmod +x .i; ./.i; rm .s; exit
“Check the version number of the device and send the Exploit which carried the Shellcode. Once the vulnerability is successfully exploited, Hajime will be downloaded and executed.”
Persistence
1 technique
Persistence
IoT malware scans the Internet for IoT devices that use default or weak usernames and passwords.
Privilege Escalation
1 technique
Privilege Escalation
IoT malware scans the Internet for IoT devices that use default or weak usernames and passwords.
Stealth
2 techniques
Stealth
IoT malware scans the Internet for IoT devices that use default or weak usernames and passwords.
Once the attack successfully passes the authentication stage, the first 52 bytes of the victim’s echo binary are read... The victim’s echo ELF header is then compared against a predefined array, containing the Hajime stub downloader binaries for different architectures.
Credential Access
1 technique
Credential Access
This honeypot was designed to be vulnerable to telnet credential brute force attacks... IoT malware scans the Internet for IoT devices that use default or weak usernames and passwords.
Discovery
2 techniques
Discovery
“Find a MikroTik device by checking if the target port is open on port 8291, if this port is open,the other common web ports (80,81,82,8080,8081,8082,8089,8181,8880) will be probed next.”
Once the attack successfully passes the authentication stage, the first 52 bytes of the victim’s echo binary are read... The victim’s echo ELF header is then compared against a predefined array, containing the Hajime stub downloader binaries for different architectures.
Lateral Movement
2 techniques
Lateral Movement
This honeypot was designed to be vulnerable to telnet credential brute force attacks... nearly 4700 telnet connections in just three weeks.
Originally,Hajime propagated mainly thought TR_069 vulnerability and weak telnet account, as time goes by, more vulnerabilities have been added
Command and Control
6 techniques
Command and Control
researchers identified more than 1,350 command-and-control servers spread across 98 providers in 14 countries.
The sample represents a brand new P2P botnet implemented based on the DHT protocol... join the Mozi P2P network to become the new Mozi Bot node
Hajime utilizes a decentralized peer-to-peer network to issue commands to its bots. This makes it much harder to locate the Command-and-Control (C2) server for a takedown.
“Once the vulnerability is successfully exploited, Hajime will be downloaded and executed.”
This worm builds a huge P2P botnet... By announcing on the DHT network with a peer id similar to that day’s identifier of the configuration file we were able to be the “nearest” node and collected requests from almost every infected device... All of them were requesting Hajime config.
On the channel provided by uTP, Hajime made the RC4 communication encryption for each session to ensure that others could not restore the content by packet capture. Besides, Hajime uses a key negotiation algorithm to ensure that the RC4 key is not stealable.
Observables
53 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
42 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.