Honeypot capture
mirai
Static analysis of a 118,368-byte big-endian MIPS ELF sample that a honeypot sensor network captured recovered two command-and-control hostnames on a dynamic-DNS service and eight hardcoded bootstrap resolvers; the eight were labelled C2 on the first automated pass and reclassified as resolvers by the consensus round. The run counts ten statically recovered C2 endpoints across ten hosts, and a second, independent decompiler backend returned an agreement verdict on all ten. C2 is the channel an infected machine uses to reach its operator for instructions. Binary Ninja decompiled the sample headless, strings and rabin2 pulled its strings and structure, and every indicator is anchored to a file offset and corroborated across both tools. The consensus round returned 45/45 AGREE verdicts across 31 distinct claims, and the run records its overall confidence as medium, alongside per-claim confidences that run from 0.60 for the process-name indicator to 0.95 for the RC4 config table.
The sample was loaded as data and never executed, and no recovered endpoint was contacted or resolved. The analysis does not settle the per-opcode packet-shaping arguments for the fifteen flood handlers, the two uninterpreted config records, or the 12-entry 0xfffaXXXX table at 0x41aed4.
The sample’s startup path resolves its C2 addresses out of data it carries in the file, where they are named in its own strings and code. On start the sample RC4-decrypts an embedded configuration table and recovers two hostnames on a dynamic-DNS service — a free mapping from a chosen name to whatever address its owner currently has, which can change at any time. It then asks eight hardcoded public resolvers over UDP/53, using a hand-rolled DNS query builder, and opens a raw TCP connection on a pseudo-random port between 38242 and 46812. attack_init at 0x4008e8 registers fifteen DDoS flood handlers, and type-3 commands parsed at 0x40045c task them.
The sample carries the string signature of the mirai family (/bin/busybox, assword, ncorrect), and the analysis classifies the lineage as mirai because the recovered pieces fit together as an RC4-obfuscated config table, a method registrar, random-port raw-TCP C2 to dynamic-DNS names, and the TSource Engine Query/busybox/securelevel string set.
It builds for one architecture, MIPS. The analysis treats that as the signature of a campaign aimed at routers, cameras and other embedded devices rather than at servers, hardware that is rarely patched, rarely monitored and permanently online.
The RC4 config table
The table initialiser sub_411f20 at 0x411f20 decrypts the configuration strings — the C2 hostnames and protocol markers — at startup, calling the cipher sub_411c44 at 0x411c44 once per record. The run assesses that capability at confidence 0.95 and maps it to ATT&CK T1027. The decompiler annotates the first record, labelling the cipher call table_init:
RC4 record id 0 at 0x41af20 (table_init sub_411c44(0, 0x41af20, 8)) decrypts to ‘lkol.dyn’
The encrypted bytes of record id 0 sit at 0x41af20, and the annotation above is attached to the call site at 0x411f70. Record id 1, with its bytes at 0x41af14 and its annotation at 0x411f54, decrypts the same way to bigr[.]dyn; both records are eight bytes.
The key occupies 256 bytes at 0x41af60, the PRGA sits at 0x411e9c, and the code implements the S[i]↔S[j] swap as an in-place triple XOR, which zeroes S[i] whenever i equals j. The keystream therefore diverges from standard RC4 from KSA i==17 onward, and any decoder has to replicate the quirk to reproduce lkol[.]dyn from record id 0 and bigr[.]dyn from record id 1.
| Value | Role | Decrypt call site VA | Confidence (run range 0.60–0.95) | Second backend |
|---|---|---|---|---|
lkol[.]dyn | primary | 0x411f70 | 0.90 | agrees |
bigr[.]dyn | fallback | 0x411f54 | 0.90 | agrees |
Reading named host and port fields in the decrypted configuration rather than loose strings, the structured configuration extractor emitted one further parsed host/port record, 8m[.]In.
The eight bootstrap resolvers
The first automated pass labelled the eight :53 addresses at 0x41a540 as C2, among them 103.1.184.110, 152.53.15.127, 168.138.12.137 and 194.36.144.87. The consensus verifier traced their only cross-reference to the DNS client at 0x40e1a0. Re-reading the bytes confirmed a hostname-to-DNS-query builder, and the verifier reclassified the eight as bootstrap public resolvers used to reach the real C2. The resolver table is bounded in the decompilation:
resolver table 0x41a540..0x41a560 (loop bound $s4_1 == 0x41a560 at 0x40e4cc); 8 hardcoded big-endian IPv4 DNS servers
The DNS client feeds the connect path directly, and rand() picks which A-record the host uses:
*(arg1 + 4) = *((($v0_10 u% $a0_2) << 2) + $s0_2) /* rand() picks one A-record for the host */
The decompiler annotates the connect path itself at 0x40b12c and 0x40b1b0:
sub_40a194(0x45c430, 0) — slot 0 resolved and connected via the DNS client at 0x40e1a0
sub_40a194(0x45c430, 1) — candidate rotation (x+1)%3 at 0x40b18c selects slot 1 on failure
This analysis never contacted or resolved a recovered endpoint, so it leaves open what addresses the hostnames currently return and whether the port band still answers.
The wire protocol
The sample talks over raw TCP, opening a socket with socket(AF_INET, SOCK_STREAM, 0) at 0x40b054 and calling connect() at 0x40b270, and it chooses the destination port as ports[rand() % 121] from the 121-entry table at 0x41a21c (confidence 0.90, ATT&CK T1571, MBC B0030). sub_40d7d0 builds messages and its mirror sub_40d33c parses them, and the run documents two message types. The 16-byte header carries, in order:
| Bytes | Field |
|---|---|
| 0–3 | session magic token |
| 4 | version byte 0x03 |
| 5 | opcode / flags |
| — | a 32-bit field, whose position the run does not record |
| 12–13 | body length, big-endian u16 (store at 0x40d988) |
| 14–15 | 16-bit checksum |
The body is obfuscated separately, with a 4-byte rolling XOR at 0x40d8c0 on send and 0x40d78c on receive, keyed by state[0..3] indexed as (state[8]+k)&3 and derived from the xorshift128 PRNG at 0x40db44 (confidence 0.85, ATT&CK T1573.001). sub_40d23c generates that key and its counter client-side, and neither travels on the wire, so a passive capture yields the full header and framing plus a body that stays obfuscated until an analyst recovers the per-session key from the endpoint or intercepts the session actively.
One derived test vector replays through the dissector, and the report notes that the executable half of the release touches the network only when given an explicit target and should be run only in an isolated lane.
The sample beacons through a 30-second keepalive gate at 0x40cc6c with no jitter, and after a failed connection it waits rand()%10 + 1 seconds at 0x40ce0c before retrying.
The fifteen flood handlers
attack_init at 0x4008e8 populates a 15-entry table of opcode-to-handler pairs, and the verifier re-derived all fifteen from the GOT slots the registrar fills (confidence 0.90, ATT&CK T1498). The opcodes are 0, 1, 3–7, 9–13 and 18–20. Two are application-layer: opcode 18 at 0x404790 builds a TLS ClientHello flood from a template at 0x45c318, and opcode 19 at 0x40402c is an HTTP-style flood. The run assesses the application-layer roll-up at confidence 0.75 and maps it to T1499; the handlers are confirmed, while the per-opcode packet-shaping arguments were not fully traced.
Host and network indicators
The beacon needs only user privilege, while the anti-reboot behaviour at 0x41a3f4, which disables the kernel watchdog and lowers KERN_SECURELEVEL, needs root. The binary is statically linked, stripped and unpacked, with no dynamic import table. On the network it needs outbound TCP to the C2 on the random high port above and outbound UDP/53 to the eight resolvers.
Four host-side artifacts show up when the sample runs. main at 0x40cd2c compares a single-instance takeover magic BOT\x01TAKE (the eight bytes 424f540154414b45) against a received handshake, the process-killer and scanner logic use /bin/busybox at 0x41a8dc, the bot enumerates /proc/net/tcp at 0x41a1dc to find and kill competing connections, and it scans process names against a blacklist that includes bash at 0x41a368. The first three are assessed at 0.80, the process name at 0.60.
The primary host lkol[.]dyn also appears in one other analysed capture. The findings attribute that reuse to one operator’s infrastructure and place this sample in a wider campaign rather than a one-off.
The sample itself is 1ae26cf33fd6ad18aaae01ce8badf6d52782c9153167c37c2ec831723a314354 (MD5 11d07bdcbdc37081c33bdb6b84b2c123, SHA1 31803789e9de33859448ef58a3d3bd45eac32715), and the published artifacts are the C2 profile, the IOC table, a blocklist, the protocol specification, the per-phase JSON for enrichment, deep static analysis, correlation, emulation, consensus, packer, config and YARA output, and sample_lines_by_offset.txt.
The flood payloads and the unread config records
The next step traces the per-method payload semantics of the fifteen handlers through the 0x400778-based builders. Two uninterpreted config records also remain unread — table id 2, The Peoples Bank of China., and id 3, TSource Engine Query — as does the 12-entry table of 0xfffaXXXX entries at 0x41aed4, referenced from 0x40fd90 and 0x40fda4.
- Family
- mirai
- First seen
- November 26, 2026
- Vector
- Runs as a ddos-bot; the entry vector is not established by static analysis
- Format
- 116 KB mips ELF 32-bit MSB executable
- VirusTotal
- 39/75 engines: trojan.mirai/r002c0djn26
- Tags
- ddos-bot · elf · mips · raw_tcp
- Sample
- By request. Email [email protected]
SHA-256
-
1ae26cf33fd6ad18aaae01ce8badf6d52782c9153167c37c2ec831723a314354as captured
Analysis performed using an automatic malware analysis pipeline using Binary Ninja