Back to Research LabMalware Behavior & Analysis
Published: 2025-05-20(Updated: 2025-12-15)11 min readHarsh (SecWithHarsh)

From Mirai to Modern Botnets: Evolution of Telnet Brute-Forcing and IoT Exploit Delivery

A technical investigation into the operational architecture of IoT botnets, examining how modern malware families evolved from simple Telnet dictionary attacks to weaponized 1-day CVE exploitation.

Analytical confidence score: Confirmed / High Confidence

From Mirai to Modern Botnets: Evolution of Telnet Brute-Forcing and IoT Exploit Delivery

Introduction

The 2016 Mirai botnet was a watershed moment in internet security. By automating the scanning of commodity internet-connected cameras, DVRs, and home routers, Mirai marshaled hundreds of thousands of concurrent devices to launch volumetric DDoS attacks exceeding 1 Tbps.

While the original Mirai relied on a rudimentary dictionary of 62 hardcoded Telnet credentials, modern derivatives (Mozi, Gafgyt, Dark.IoT) have evolved into modular exploit frameworks.

text
Phase 1 (Original Mirai - 2016):
  TCP SYN Scanner ──> Ports 23 / 2323 ──> Telnet Dictionary Brute Force ──> Echo Dropper ──> Bot Active

Phase 2 (Modern IoT Malware - Present):
  SYN Scanner ──> Ports 80 / 443 / 8080 ──> Multi-CVE Remote Code Execution (RCE)
                                                 │
                                                 ├── Realtek SDK RCE (CVE-2021-35395)
                                                 ├── D-Link HNAP / Unauthenticated CGI
                                                 └── TP-Link Command Injection

1. Anatomical Dissection of the Scanner Routine

Original Mirai binaries achieved staggering scan rates through raw socket implementation:

  • Scanning routines generate pseudo-random IPv4 destination addresses while excluding reserved ranges (military, government, IANA loopbacks).
  • Rather than initiating full TCP three-way handshakes, custom SYN packets are emitted asynchronously.
  • When an ACK/SYN is received on port 23, the bot passes the target socket descriptor to the worker login thread.
c
// Simplified excerpt of traditional SYN scan loop
uint32_t get_random_ip(void) {
    uint32_t ip;
    do {
        ip = rand_next();
    } while (
        (ip & 0xFF) == 127 ||           // 127.0.0.0/8 (Loopback)
        (ip & 0xFF) == 10  ||           // 10.0.0.0/8 (RFC 1918)
        (ip & 0xFF) == 0                // 0.0.0.0/8
    );
    return ip;
}

2. Shift to Weaponized 1-Day Exploitation

As consumer ISPs and hardware manufacturers closed default Telnet access, botnet authors pivoted toward unauthenticated HTTP/CGI remote code execution vulnerabilities in embedded router firmware.

Key exploit vectors include:

  1. Command Injection in Web Interfaces: Routers frequently concatenate HTTP POST parameters directly into shell commands without sanitization.
  2. UPnP SOAP Exploits: Abusing unauthenticated SOAP endpoints on WAN interfaces.
  3. Memory Corruption in Legacy Daemons: Exploiting stack buffer overflows in obsolete busybox binaries.

3. Defense & Telemetry Extraction

For threat intelligence researchers, monitoring IoT botnet infrastructure requires:

  • Distributed Honeypots: Running medium-interaction Cowrie and Dionaea daemons to capture binary drops and payload URLs.
  • Binary Architecture Analysis: Using radare2 and Ghidra to inspect cross-compiled ELF binaries (ARM, MIPS, SuperH, PowerPC) and extract hardcoded C2 IP addresses.
Source register and authoritative citations
SourcePublisherDateReference
Understanding the Mirai BotnetUSENIX Security Symposium2017-08-16Ref
CISA Alert: Defending Against IoT Distributed Denial-of-Service AttacksCybersecurity and Infrastructure Security Agency2023-04-10Ref
Integrity notice: Findings presented in this publication synthesize observable network telemetry with publicly available vendor reports (including Check Point Research and Mandiant Intelligence). Attribution assessments represent analytical confidence scores based on corroborated technical indicators.