Honeypot capture
mirai
Static analysis of a 740,240-byte ARM ELF that a honeypot sensor network captured recovered five command-and-control endpoints across three hosts — 115[.]11[.]111[.]11, wer-ldr[.]duckdns[.]org and wereng[.]duckdns[.]org — along with the 32-byte key that decrypts the control channel. C2 is the channel an infected machine uses to reach its operator for instructions. The control channel is ChaCha20-Poly1305 AEAD and the key sits in the sample’s own RC4-obfuscated config table, so traffic recorded off the wire decrypts offline. The addresses are named in the sample’s own strings and code — a loader has to carry them in resolvable form. Four of the five also carry an agreement verdict from the second backend, an independent decompiler that resolved the same addresses, which raises confidence they are real.
The build targets 32-bit ARM, the architecture of the routers, cameras and other embedded devices this campaign aims at, which are rarely patched, rarely monitored and permanently online. Its primary C2 is a free dynamic-DNS hostname, a service that maps a chosen name to whatever address its owner currently has, so the address behind wereng[.]duckdns[.]org is operator-controlled and can change within minutes.
Static-only analysis
The pipeline loaded the sample as data and never executed it, and it contacted or resolved no recovered endpoint. Strings and structure came from strings and rabin2, every indicator anchored to a file offset and corroborated across both, and binja, run headless, disassembled and decompiled the executable sections.
Anti-analysis before the C2 connect
The sample runs the ptrace check at 0x117e0 and the /proc/cpuinfo and DMI vendor-string VM check at 0x1cbcc before the C2 connect, so a dynamic run would need a bare-metal-looking ARM environment with nothing attached.
Mirai layout and four departures from it
The source layout is Mirai’s: table, scanner, killer, attack, resolv and util, with main holding the C2 loop. The sample carries the /bin/busybox liveness probe, the SCAN| report prefix, twelve main_[arch] loader payloads and the telnet/SSH credential scanner.
The sample departs from stock Mirai in four ways. Its attack registry holds 26 methods: TCP (syn/ack/sack/stomp/stream), UDP floods, GRE, QUIC, OpenVPN, RakNet, TLS, an HTTP flood that rotates six user-agent strings, and UDP amplification against TS3, memcached, CLDAP, NTP, DNS, SSDP and VSE. The config table is RC4-obfuscated through toggle_obf in place of Mirai’s XOR table_lock_val. The C2 channel is AEAD-encrypted where stock Mirai is plaintext. A Poly1305-authenticated DNS-TXT rendezvous serves as an out-of-band fallback.
The loader host
A gafgyt string and two unlisted indicators
A deep-static pass found the string signature of the gafgyt family (TSource Engine Query) in a binary whose structure is otherwise Mirai’s. The byte sweep also surfaced two network indicators the curated profile does not list, 239[.]255[.]255[.]250 and a Launchpad glibc bug-tracker URL; both appear in the bytes, which makes them unconfirmed leads rather than verified C2.
Recovered capabilities
The analysis pipeline assessed the confidence values, and “Agreed” marks the capabilities the second backend confirmed in the consensus round.
| Capability | ATT&CK | File offset | Conf. (0–1 extraction confidence, pipeline) | Agreed |
|---|---|---|---|---|
| Raw-TCP C2 | T1095 | 0x10d60 | 0.95 | yes |
| ChaCha20-Poly1305 channel | T1573.001 | 0x11510 | 0.95 | yes |
| RC4 config obfuscation | T1027 | 0x1d0e4 | 0.95 | yes |
| DNS-TXT fallback C2 | T1071.004 | 0x10e2c | 0.85 | yes |
| Network DoS | T1498 / T1498.002 | 0x11818 | 0.90 | yes |
Shell execution via popen | T1059.004 | 0x112fc | 0.90 | yes |
| Self-update | T1105 | 0x1127c | 0.90 | yes |
Telnet/SSH scanner + /device.rsp exploit | T1110.001 / T1210 | 0x1b880 | 0.85 | — |
| Host fingerprint / VM discovery | T1082 | 0x1cbcc | 0.80 | — |
| Cron + init persistence | T1053.003 | 0x1cf2c | 0.80 | — |
The C2 wire format
Transport is a raw TCP socket, non-blocking and select()-driven with a five-second timeout. The resolver sets the port as an immediate at 0x19ddc:
movw r3, #0x3905 ; strh r3, [r5, #0x2] {srv_addr+2} /* sin_port net-order 0x3905 = 1337 */— binja @0x19ddc
The protocol frames each message with a 2-byte big-endian length header, which the bot byte-swaps at 0x10aac. Payloads of 0x1c bytes or more carry a sealed body laid out as nonce[12] | ciphertext | tag[16]; payloads of 0x1b bytes or fewer travel in the clear, and the opcode dispatch reads the first plaintext byte. A session opens with a plaintext registration preamble — arch tag 0x00000002 plus the victim’s local IP — then beacons.
The opcode dispatch runs five commands off that first byte. '0' (0x30) runs a shell command via popen and returns the output; 'P' (0x50) and 'Q' (0x51) start and stop the rival-process killer; '`' (0x60) fetches a new binary with wget or curl and execs it; anything else falls through to attack_parse at 0x12090, which forks one of the 26 methods against a target list.
The bot authenticates the rendezvous fallback before it parses anything from it. After roughly nine idle select cycles with no primary connection, the bot queries a TXT record on the same dynamic-DNS name and checks its tag before parsing a new IPv4:port:
resolv_lookup_txt(table_retrieve_val(5, ...)) /* TXT rendezvous, domain = table entry 5 = 'wereng.duckdns.org' */— binja @0x10e2c
poly1305_auth(&var_aac, &var_42c, r1_40, r0_69) /* TXT record authenticated with table entry 4 as the Poly1305 key before the IPv4:port is parsed */— binja @0x10ff8
Decoding a single beacon recovers the operator’s tasking in cleartext — shell commands, the self-update URL, DDoS orders with target CIDRs — and the bot’s reports back, including the victim’s own IP and every SCAN|host:port|user:pass record of credentials harvested from neighbouring devices. protocol_spec.md documents four protocol messages, and all five test vectors replay through the recovered dissector c2_dissect.py. The reproduction does not pin down live beacon cadence; the keepalive and select timing are governed by a randomised gate in main at 0x10904 driven by rand_next/rand_cmwc state, so the emulator and client reproduce the protocol but not the precise cadence, and that gap leaves decoding and tasking unaffected.
Key material
The sample protects its key material in two layers, and the second backend confirmed both. The config at rest is RC4 with a 16-byte key that toggle_obf at 0x1d0e4 derives from a 4-byte seed in .data at 0xa6360. That key decodes the table into readable infrastructure:
(RC4 key 5a3c9e11f0724b8d27e61ac36f94bd08 -> 'wereng.duckdns.org')— binja @0x8a044
Inside that table, entry 6 decodes to the channel key bce99623e8f4fe3f2c5c81520efbd784aaff84671cfbb9e370b27335f8936ee5, loaded at enc_key 0x132330 and consumed by a 20-round ChaCha20 (chacha20_block at 0x18f64, with the expand 32-byte k sigma visible as immediates) and Poly1305 at 0x1a194. Entry 4 is the separate MAC key for the DNS-TXT record. A standalone extractor reproduces both keys from the raw file independently of the decompiler.
Network and privilege requirements
The sample needs only user privilege to beacon; root improves persistence and enables the raw-socket attack modules. Outbound tcp/1337 goes to wereng[.]duckdns[.]org, udp/53 carries the TXT rendezvous, the attack modules need raw sockets, and outbound http/80 goes to wer-ldr[.]duckdns[.]org for the payload. Denying any one of them blocks the sample.
Host artifacts
| Kind | Value | Context | File offset | Conf. |
|---|---|---|---|---|
| process | httpd | prctl(PR_SET_NAME) and argv[0] masquerade | 0x10754 | 0.90 |
| file | /tmp/.x | loader-dropped second stage (scanner payload) | 0x1b540 | 0.85 |
| file | /tmp/.upd | self-update download target | 0x1127c | 0.90 |
| file | /var/tmp/.hama | single-instance / variant marker | 0x89e68 | 0.70 |
| cron | @reboot plus */5 * * * * on the bot’s own path | persistence watchdog | 0x89e90 | 0.80 |
| file | /etc/init.d/rcS | SysV-init persistence on embedded targets | 0x89e78 | 0.70 |
Each of these carries an extraction confidence of 0.70 to 0.90, but none was part of the phase-9 C2 claim set, so the table marks each unverified.
Corrected and ruled-out claims
A consensus round put the draft claims to the second backend, and two were refuted and corrected. The draft listed the loader bare host at 0x89c84 as http/80; the second backend showed the sample uses it only in the tftp and ftp legs of the download chain, so the correction records the protocol as other and drops the port. The reconnect backoff had been drafted as a fixed five seconds; the second backend read sleep(rand()%10 + 1) at 0x109d4, a uniform one-to-ten-second backoff, and the five turned out to be a confusion with the separate select() timeout. Both corrected claims were left marked unverified.
Two drafted findings were ruled out: defend_binary at 0x19de8 installs a signal handler despite its name, and the 32-character table at 0x89be8 is the alphabet for rand_alphastr at 0x1a76c, its only reader.
Where the artifacts are
The dynamic run that has not happened
A dynamic run would settle which addresses wereng[.]duckdns[.]org currently resolves to, whether it still answers on the recovered port, and what timing, retry and post-execution behaviour the sample shows. The reversing stops short in three places: the per-method packet builders for the attack_* functions (0x124c8–0x189c8), the attack option TLV key meanings (attack_get_opt_* at 0x1236c, 0x123ac, 0x12438) and the exploit module around /device.rsp at 0x89d2c in scanner_thread.
- Family
- mirai
- First seen
- November 11, 2026
- Vector
- Runs as a ddos-bot/worm; the entry vector is not established by static analysis
- Format
- 723 KB arm ELF 32-bit LSB executable
- VirusTotal
- 39/74 engines: trojan.mirai/gafgyt
- Tags
- arm · ddos-bot · elf · raw_tcp · worm
- Sample
- By request. Email [email protected]
SHA-256
-
1876e0248493824810dc22bd4fd143cc59a58d599d31162164738a32f0ca5542as captured
Analysis performed using an automatic malware analysis pipeline using Binary Ninja