Kaiji, a new Linux malware targets IoT devices in the wild

Pierluigi Paganini May 05, 2020

Security researchers spotted a new piece of DDoS bot dubbed Kaiji that is targeting IoT devices via SSH brute-force attacks.

Last week, the popular security researcher MalwareMustDie and the experts at Intezer Labs spotted a new piece of malware dubbed Kaiji, that is targeting IoT devices via SSH brute-force attacks.

The malicious code was designed to target Linux-based servers and Internet of Things (IoT) devices and use them as part of a DDoS botnet.

The Kaiji malware is different from other IoT ELF malware, it is written from scratch in the Go programming language, and its detection rate at the time of discovery was only 1.

“In late April we identified a new botnet campaign with definitive Chinese origins,targeting servers and IoT devices via SSH brute forcing. While most attackers derive their implants from popular and well-tested sources such as open source (e.g., Mirai) or blackmarket toolsets (e.g., BillGates), this botnet utilizes its own custom implant, which MalwareMustDie named Kaiji based on one of the function names.” reads the analysis published by Intezer. “The botnet was built from scratch using the Golang programming language, which is rare in the IoT botnet landscape.”

The Kaiji botnet doesn’t leverage exploits to spread, instead, it carries out brute-force attacks against the root of IoT devices and Linux servers that have left their SSH port exposed online.

Once the malware gains access to a root account of the device, a bash script is executed to sets up the environment for the malicious code.

“A /usr/bin/lib directory is created and then Kaiji is installed under the filename ‘netstat’, ‘ps’, ‘ls’, or some other system tool name.” continues the analysis.

“Kaiji has simple features. It consists of an arsenal of multiple DDoS attacks such as ipspoof and synack attacks, an ssh bruteforcer module to continue the spread, and another ssh spreader which relies on hijacking local SSH keys to infect known hosts which the server has connected to in the past.”

The malware is quite simple, it implements multiple DDoS attacks, it includes a module to conduct SSH brute-force attacks and steal SSH keys used to spreads to other devices to infect hosts that the server has connected to in the past.

The Kaiji botnet is clearly a work-in-progress, the source code includes “demo” strings and the rootkit module would often call itself too many times and exhaust the device’s memory, resulting in the crash of the devices.

Experts also noticed some functions named in an English representation of Chinese words, a circumstance that suggests it was developed by a Chinese developer.

The binary contained four command server hostnames, two of which were resolved to localhost since they were registered. The only hostname which worked was operational for two weeks before failing to respond.

I reached MalwareMustDie for a comment:

“Well I think I was the first who analyzed it (and other may has seen it too,) after an on-going threat detected in cyber intelligence during this covid19 (can not reveal due to OPSEC), to find this bot ddos’er sample that has been coded with a lot of functionalities that covered many botnet aspects already. That was a new stage on its propagation progress and I named it as Linux/Kaiji since it is a hardcoded routine and looks easy to remember. The coding in Go is making the coder can have luxury to focus to code many malicious operations for the botnet purpose since they don’t have to work that hard on providing them self encryption, networking communicating activities libraries, it is coded “ala” previous complex DDoS bot made by China origin attacker and they are aiming some platforms that are having a serious vulnerability now. So after reversed it, I don’t have much time to write the whole aspect of this malware in details, yet I figured it was 0 (zero) detection the day it was found (became 1 detection a day after), so I summarized and take screenshots and I was just sharing it quickly as awareness and posted the basic information for this new threat on VirusTotal, for other IR and security entities starting their process to mitigate this threat. The functions of this bot are completed made, in aspect from rootkit, persisting function that supported new Linux systems, some secure protocol propagation tool and it is a variation on local executable bot commands with command execution capability which is there too. What I can say is, be aware of this kit, it is newly developed (since the implementation and code in here and there doesn’t look “mature” nor “final” yet) and aiming vulnerability in this first infection. I am still working with others to tame for mitigation for its initial propagation while sharing this bot for awareness.”

The Kaiji command and control servers are not stable, they would often go offline, anyway, experts warn that the capabilities of this botnet could make it a dangerous actor in the threat landscape.

Intezer has published Indicators of Compromise (IoCs) for the Kaiji bot.

Recently other IoT botnets made the headlines, such as including Hoaxcalls, Mukashi, and dark_nexus.

Please vote Security Affairs for European Cybersecurity Blogger Awards – VOTE FOR YOUR WINNERS
https://docs.google.com/forms/d/e/1FAIpQLSe8AkYMfAAwJ4JZzYRm8GfsJCDON8q83C9_wu5u10sNAt_CcA/viewform

[adrotate banner=”9″][adrotate banner=”12″]

Pierluigi Paganini

(SecurityAffairs – Kaiji malware, hacking)

[adrotate banner=”5″]

[adrotate banner=”13″]



you might also like

leave a comment