Dark-Mirai Targets TP-Link Router
FortiGuard Labs discovered a malware sample that’s currently being distributed in the wild targeting TP-link wireless routers. It leverages a recently post-authenticated RCE vulnerability released recently. The campaign originally piqued our interest due to the continuous updating of its list of target vulnerabilities.TP-Link has already released an updated firmware for this affected hardware version and users are strongly encouraged to update their devices.
This Mirai-based botnet campaign is referred to as MANGA because of the token string it used to include in its SSH/telnet commands. It is also referred to as Dark due to the filenames used for its binaries (e.g., Dark.arm, dark.mips, etc.).
By exploiting recently published vulnerabilities tracked as CVE-2021-41653, this malware campaign capitalizes on the gap between the time of disclosure of a vulnerability and the application of a patch to compromise IoT devices. This gives it a higher potential of spreading, making it more prolific than similar botnets. The latest addition to its constantly growing list of targeted vulnerabilities is TP-Link Home Wireless Routers, particularly the TL-WR840N EU (V5) model.
The vulnerability being exploited to force vulnerable devices to download and execute a malicious script, tshit.sh, which then downloads the main binary payloads, as discussed in the next section.
To accomplish this, the following requests are sent to the device:
It is important to emphasize that this exploitation requires authentication to succeed. Therefore, it is crucial for users to change their default credentials.As with Mirai’s normal infection routine, the executed shell script downloads the main payload binaries for different architectures and platforms and executes them blindly in the victim’s system. In addition, it prevents other botnets from taking over the device by blocking connections to commonly targeted ports.
The malware then waits for a command from its Command-and-Control (C2) server to perform different variations of a Denial-Of-Service (DOS) attack.
Fortinet customers are protected by the following:
- The following generic FortiGuard IPS signatures were able to detect this attack before this vulnerability was disclosed:
- The FortiGuard Web Filtering Service blocks downloaded URLs and identified C2s.
- The FortiGuard Anti-Virus service detects and blocks this threat as Linux/Mirai and ELF/Mirai
Indicators of Compromise
2 thoughts on “Dark-Mirai Targets TP-Link Router”
The CVE ID is not good, the correct one is CVE-2021-41653. (I found the original vulnerability for the TP-Link TL-WR840N EU V5 device, so I am sure. You can find more details on my home page: https://k4m1ll0.com)
Thanks for an update , Kamilo. Will update accordingly.