Story

Who killed Mozi? Finally putting the IoT zombie botnet in its grave

How ESET Research found a kill switch that had been used to take down one of the most prolific botnets out there

In August 2023, the notorious Mozi botnet, infamous for exploiting vulnerabilities in hundreds of thousands of IoT devices each year, experienced a sudden and unanticipated nosedive in activity. First observed in India on August 8th, 2023 and a week later in China on August 16th, this mysterious disappearance stripped Mozi bots of most of their functionality.

Figure 1. Sudden drop in Mozi activity globally (top), in India (middle), and in China (bottom)

Our investigation into this event led us to the discovery of a kill switch on September 27th, 2023. We spotted the control payload (configuration file) inside a user datagram protocol (UDP) message that was missing the typical encapsulation of BitTorrent’s distributed sloppy hash table (BT-DHT) protocol. The person behind the takedown sent the control payload eight times, each time instructing the bot to download and install an update of itself via HTTP.

The kill switch demonstrated several functionalities, including:

  • killing the parent process, i.e., the original Mozi malware,
  • disabling some system services such as sshd and dropbear,
  • replacing the original Mozi file with itself,
  • executing some router/device configuration commands,
  • disabling access to various ports (iptables -j DROP), and
  • establishing the same foothold as the replaced original Mozi file

We identified two versions of the control payload, with the latest one functioning as an envelope containing the first one with minor modifications, such as adding a function to ping a remote server, probably meant for statistical purposes.

Despite the drastic reduction in functionality, Mozi bots have maintained persistence, indicating a deliberate and calculated takedown. Our analysis of the kill switch shows a strong connection between the botnet’s original source code and recently used binaries, and also the use of the correct private keys to sign the control payload (see Figure 2).

Figure 2 Code snippets of the original Mozi sample (left) vs kill switch sample seen in 2023 (right)

 

 

Figure 3. Control flow diagram of the original Mozi sample (left) vs kill switch sample seen in 2023 (right)

This leads us to the hypothesis suggesting two potential originators of this takedown: the Mozi botnet creators, or Chinese law enforcement forcing the cooperation of the creators. The sequential targeting of bots in India and then in China suggests that the takedown was carried out deliberately, with one country targeted first and the other a week later.

The demise of one of the most prolific IoT botnets is a fascinating case of cyberforensics, providing us with intriguing technical information on how such botnets in the wild are created, operated, and dismantled. We are continuing to investigate this case and will publish a detailed analysis in the coming months. But for now, the question remains: Who killed Mozi?

IoCs

Files

SHA-1FilenameDetectionDescription
758BA1AB22DD37F0F9D6FD09419BFEF44F810345mozi.mLinux/Mozi.AOriginal Mozi bot.
9DEF707F156DD4B0147FF3F5D1065AA7D9F058AAud.7Linux/Mozi.CMozi bot kill switch.

 

 

Network

IPDomainHosting providerFirst seenDetails
157.119.75[.]16N/AAS135373 EFLYPRO-AS-AP EFLY NETWORK LIMITED2023-09-20Kill switch hosting server.

MITRE ATT&CK techniques

This table was built using version 13 of the MITRE ATT&CK framework.

TacticIDNameDescription
Resource DevelopmentT1583.003Acquire Infrastructure: Virtual Private ServerThe Mozi kill switch operators rented a server at eflycloud.com to host the update files.

The Mozi kill switch operators rented multiple servers that send payloads on BT-DHT networks.

Initial AccessT1190Exploit Public-Facing ApplicationThe Mozi kill switch operators sent an update command to Mozi clients on a BT-DHT network.
PersistenceT1037.004Boot or Logon Initialization Scripts: RC ScriptsThe kill switch creates multiple scripts, such as /etc/rc.d/rc.local, to establish persistence.
ExfiltrationT1048.003Exfiltration Over Alternative Protocol: Exfiltration Over Unencrypted Non-C2 ProtocolThe kill switch sends an ICMP ping to the operator perhaps for the purpose of monitoring.
ImpactT1489Service StopThe kill switch stops the SSH service and blocks access to it with iptables.

 

Source: PR Agency

Leave a Response