Honeypot capture
mirai
The pipeline recovered three command-and-control endpoints from a 145,760-byte ARM ELF — the resolver 8.8.8.8 on udp/53, the command host cmd.5gf7jtfk0y.st on tcp/9999, and the loader and credential-report host fb.5gf7jtfk0y.st on tcp/6636. A second, independent decompiler backend resolved the same three addresses, and the method note below gives the scope of that agreement round. The addresses are named in the sample’s own strings and code.
The sample is one of three builds — arm, armv7 and armv5 — aimed at routers, cameras and other embedded hardware rather than at servers, and a honeypot sensor network captured it as a statically linked, stripped ELF for 32-bit ARM (EABI4, no hardware-float requirement). It is a telnet worm as well as a DDoS bot: it spreads without user action, through an exposed service it brute-forces itself.
The pipeline loaded the sample as data, never executed it, and contacted or resolved none of the recovered endpoints. Strings and structure came from strings and rabin2, with every indicator anchored to a file offset and corroborated across both; the executable sections were disassembled and decompiled headless with Binary Ninja. The agreement round against a second, independent decompiler backend covered one claim set — the C2 endpoints, transport, framing, crypto and commands — and all three endpoints carry that backend’s verdict, while the host artefacts and the other recovered behaviours rest on a single backend. The pipeline runs without an analyst in the loop, so the confidence figures below are its own assessments, running from 0.70 to 0.95 across the recovered behaviours.
Mirai lineage
The pipeline classifies the sample as Mirai lineage because four independent structural fingerprints match and the strings diagnostic of the family (/bin/busybox, assword, ncorrect) are present:
- The string table at
0xbb54(decode) and0xbc38(init) holds entries of the form{char* val; u16 len; u8 locked}and hides their contents under a 32-bit key applied as four successive byte XORs. - The single-instance lock on TCP 48101 at
0xac28, which finds and kills the previous holder by way of/proc/net/tcp. - The registration sequence at
0xb318: a 4-byte00 00 00 01hello followed by a length-prefixed bot id, with 2-byte big-endian framing thereafter, assembled at0xb414. - An attack registry at
0x85c4, keyed by the canonical Mirai opcodes 3, 4, 5 and 9.
The command host cmd.5gf7jtfk0y.st also appears in one other analysed capture. On that basis the correlation output places the sample in a wider campaign rather than treating it as a one-off.
The XOR string table
The only cryptographic transform in the sample is a bytewise XOR over three string-table entries. The 32-bit key 0xdeadbeef is stored little-endian at 0x236c8 and applied one byte at a time in four passes, which nets to a single XOR by 0x22; an entry ends at the byte that decodes to NUL. The decoder sits at 0xbb54, and the routine at 0xbc38 populates the table with a copy of the obfuscated bytes:
sub_bd44(r0_1, 0x179fc, 0x12) /* table_init: copy 18 obfuscated bytes into table entry id 3 */— binja @0xbc80
(XOR 0xdeadbeef four-pass -> 'cmd.5gf7jtfk0y.st\x00')— binja @0x179fc
The same treatment at 0x17a10 yields the loader host:
(XOR 0xdeadbeef four-pass -> 'fb.5gf7jtfk0y.st\x00')— binja @0x17a10
The third hidden entry is id 2, the banner listening tun0. The sample deobfuscates it, writes it to stdout at startup, and also matches it against telnet session output. Everything else in the binary is plaintext, including the whole credential dictionary.
The routine at 0xbc38 never initialises two slots in that table — ids 0 and 1, at table base 0x37294 and 0x3729c — and both stay NULL.
The C2 channel
The sample resolves the command host before it connects, and it does not consult the victim’s configured resolver. It carries its own DNS client, queries the hardcoded public resolver over UDP from 0xb73c, and picks one A record at random from the answer set. The call chain is visible in one line of decompilation:
int32_t* r0_40 = sub_b64c(sub_bb54(3, nullptr)) /* resolve(table_retrieve(3)) */— binja @0xb1dc
Two instructions assemble the port, and the sample then connects the socket:
0x0000b210 f23ea0e3 mov r3, 0xf20 0x0000b214 073083e2 add r3, r3, 7 0x0000b218 b230c8e1 strh r3, [r8, 2] ; sin_port = 0x0f27 network order = 9999— binja @
0xb218
0x0000b228 28129fe5 ldr r1, [0x0000b458] ; = 0x37284 (sockaddr_in) 0x0000b22c 1020a0e3 mov r2, 0x10 0x0000b234 6d1200eb bl 0xfbf0 ; connect(fd, &sockaddr, 16)— binja @
0xb234
The sample carries the whole command protocol itself, from registration through framing, keepalives and retry. It opens the socket with socket(AF_INET, SOCK_STREAM, 0) at 0xb1a0 for raw TCP. The wire-format document reads 0xb318 as plaintext, with no TLS or HTTP in the binary; the C2 profile records the traffic as obfuscated with XOR, and the two do not agree. Registration is the 4-byte hello followed by a one-byte length and the bot id taken from argv[1]. Inbound commands arrive behind a 2-byte big-endian length prefix, assembled at 0xb414, and the sample rejects frames longer than 0x400 bytes; the endianness was read from the explicit byteswap idiom in the disassembly. A 2-byte zero-length keepalive goes out after roughly 60 seconds of silence; that interval comes from a 10-second select() timeout and a mod-6 counter at 0xafc4 and 0xb014. The sample retries a dropped connection after rand()%10 + 1 seconds, and it has no kill switch.
A single opcode byte selects one of four DDoS vectors.
| Opcode | Handler | Behaviour |
|---|---|---|
| 9 | 0x9c78 | plain UDP flood (SOCK_DGRAM) |
| 3 | 0x95cc | raw TCP SYN flood (IP_HDRINCL) |
| 4 | 0x8ed4 | raw TCP ACK flood |
| 5 | 0x8720 | connection-oriented ACK+PSH flood |
The pipeline read opcodes, handler addresses and behaviours from the attack registry at 0x85c4 and its four handlers, assessed them at confidence 0.85, above the 0.70 given to the worker-pool sizing and below the 0.95 given to the hDvrHelper process name, and mapped them to ATT&CK T1498 and T1499. Each attack runs for a command-supplied duration in a forked child that SIGKILLs itself when the timer expires; the three raw-socket vectors need root, while the UDP flood, the scanner and the C2 channel itself run unprivileged.
The telnet worm
The scanner at 0xcfe4 scans TCP port 23 for telnet across many concurrent sockets without blocking, checks completion with SO_ERROR and multiplexes with select(). Separately, at 0x1b43c, the sample reads /proc/stat, /proc/cpuinfo and /sys/devices/system/cpu to size its worker pool to the victim’s CPU count, assessed at confidence 0.70.
On telnet port 23 the sample guesses credentials from roughly 2,300 pairs. The guessing code at 0x236cc draws on one generic table of 1,594 pairs plus 44 banner-specific tables, selected by matching the victim’s login banner against literal strings and regular expressions. On a successful login, the sample types a download-and-execute command directly into the victim’s telnet session, trying wget, then tftp, then ftpget in turn with a five-second pause between attempts; TFTP is a minimal file-transfer protocol over UDP with no authentication, common on embedded devices and often reachable where HTTP is not. The host substituted into each template is the resolved address of fb.5gf7jtfk0y.st. The three attempts drop w, t and f respectively on the victim; the wget path chmods w to 777, executes it, then unlinks it. The sample also reports each success to fb.5gf7jtfk0y.st as a fixed binary record at 0xc9bc, holding a zero byte, the victim IPv4 address, the port, then length-prefixed username and password.
Ten telnet session-state handlers between 0xd44c and 0xdebc have zero static callers and are reached through a per-connection state field.
Host artefacts
The sample daemonises at 0xae98 with fork, setsid and stdio redirected to /dev/null.
| Kind | Value | Context | VA | Conf |
|---|---|---|---|---|
| process_name | hDvrHelper | prctl(PR_SET_NAME) + argv[0] overwrite | 0xae00 | 0.95 |
| mutex | tcp/48101 listener, local address | single-instance lock; on bind failure it connects to the port, maps the listener to its owning PID through /proc/net/tcp and kills it | 0xac28 | 0.90 |
| filepath | /proc/net/tcp | read to map ports to PIDs for the lock | 0xa0bc | 0.90 |
| process_name | listening tun0 | written to stdout at startup, also a telnet match token | 0xae20 | 0.85 |
| filepath | w, t, f | second-stage files dropped on victims | 0xdc48 / 0xdd24 / 0xdd04 | 0.85 |
The static phase read these rows directly from the binary, outside the agreement round described above.
The sample has no persistence mechanism: no init script, cron entry, systemd unit or autostart. It is memory-resident and dies on reboot, and a cleaned device can be reinfected through the same telnet weakness.
The anti-forensics routine at 0xaad8 calls sub_a950, whose behaviour is not recovered, and syscall 54 (ioctl) has a second call site outside the 31 functions reviewed, so the sample’s remaining ioctl use is not identified.
What a live C2 would answer
A live or emulated C2 would show which addresses the command host currently resolves to, whether it still answers on tcp/9999, what runtime timing, retry and post-execution behaviour the sample has, and the live tasking and real victim list.
- Family
- mirai
- First seen
- November 11, 2026
- Vector
- Runs as a ddos-bot/worm; the entry vector is not established by static analysis
- Format
- 142 KB arm ELF 32-bit LSB executable
- VirusTotal
- 40/75 engines: trojan.mirai/cling
- Tags
- arm · ddos-bot · elf · raw_tcp · scanner · worm
- Sample
- By request. Email [email protected]
SHA-256
-
751cb22b7c7211ff40dfbd0a66b17e07a958bbbbe03ad2fa5406a1478e84a9eaas captured
Analysis performed using an automatic malware analysis pipeline using Binary Ninja