Honeypot capture

mirai

C2 verifiedProtocol documented

An automatic pipeline recovered eight command-and-control endpoints from a 130,772-byte ELF that it never ran. The endpoints, the port range they are reached on and the recovered wire format support defenders building blocklists and detection. The sample is a big-endian MIPS-I binary, statically linked and stripped, captured by a honeypot sensor network and loaded only as data, with no recovered endpoint contacted or resolved. The eight endpoints span six distinct hosts, and all eight carry an agreement verdict from a second, independent decompiler backend that resolved the same addresses. The C2 hosts, loader URLs and paths are stored in a string table encrypted with RC4 under a 256-byte key hardcoded at 0x41db70, so a strings pass over the raw file returns no endpoint in plaintext.

This build is a Mirai-lineage DDoS bot compiled for MIPS alone, so its targets are routers, cameras and other embedded devices rather than servers. Those devices are rarely patched, rarely monitored and permanently online. The sample is also a worm, brute-forcing telnet and copying itself to further machines with no user action. The pipeline based that classification on an obfuscated config table, a 121-entry randomised C2 port table, a single-instance lock, a telnet credential scanner paired with a wget/tftp loader, a 15-handler attack dispatcher, and a custom magic-framed rolling-XOR C2 protocol. Family strings carried in the build (/bin/busybox, ncorrect) are diagnostic of Mirai. The file is SHA-256 26344f698ff13d039c539e9f67225eb51ee94b557be5db0ba765c84ee38d110f, MD5 5ddf02aabefa7611b936de990704b2a2, SHA-1 d5cd4b541a30f7bd3ecdb9e261e2191a25f2c7ec.

Decrypting the string table

The pipeline found no anti-debug, sandbox checks, packing or control-flow flattening layered over the string table, so the binary reads straight through once the decoder is reproduced. The decoder is sub_412388, an RC4 implementation the pipeline identified from its two halves, the S-box identity initialisation and the PRGA keystream XOR:

sub_412388 RC4: S-box identity init sb $v1,0($v0) at 0x41244c; PRGA keystream xor $a0,$a0,$v1; sb $a0,0($a3) at 0x4125e8 — binja @ 0x00412388

The pipeline ran the reproduced decoder over the table at 0x41dad0 and read the host list entry by entry (RC4-decoded entry 0 -> 'slursbeback.ru'), and it read the three C2 domains in the index host list at 0x0040a194 the same way, each marked source decrypted: slursbeback.ru, seris.gd and slursontel.ru.

Recovered endpoints Values are defanged and confidence is the pipeline’s per-claim assessment.

ValuePortProtoRoleOffsetConf
slursbeback[.]ru38242–46812tcpprimary C20x41dad00.90
seris[.]gd38242–46812tcpfallback C20x41dad00.90
slursontel[.]ru38242–46812tcpfallback C20x41dad00.90
myrepis[.]gd80httploader host0x41db000.85
hxxp[://]myrepis[.]gd/dlr.mips80httploader URL0x40ee800.75
hxxp[://]myrepis[.]gd/b280httploader URL0x40f3c40.75
8[.]8[.]8[.]853dnsresolver0x41d5480.90
1[.]1[.]1[.]153dnsresolver0x41d5480.90

The connect routine picks the destination port for each connection as port_table[rand() % 121] from the 121-entry table at 0x41d25c and writes it straight into the sockaddr:

lhu $a3,0($v0) port table @0x41d25c; sh $a3,6($s2) (sockaddr sin_port) — binja @ 0x0040b284

The port therefore differs from connection to connection, and a defender hunting for it has to cover the whole range tcp/38242–46812.

The structured config extractor, which parses named host/port fields out of the decrypted configuration, recovered one endpoint, 8m[.]In, and none of the three C2 domains. one endpoint out of eight reads as the extractor parsing only part of the decrypted buffer, so the endpoint list above rests on the string-table decode and its consensus verdicts.

What a single captured frame yields

The pipeline recovered the frame codec from the send and recv wrappers at sub_40d888 and sub_40d3f4. Each frame opens with a fixed 16-byte header: a per-session magic (4 bytes), version 0x03, opcode ^ key[0], flags, a reserved byte, a big-endian sequence number (4 bytes), a big-endian length at offset 12 capped at 0x400, and a 16-bit additive checksum. The payload that follows is XOR-encrypted with a per-session 4-byte rolling key, key[(counter+i)&3], generated from four rand() bytes at sub_40d2f4. The session connects, generates the key and magic, beacons opcode 1 approximately every 30 seconds with no jitter, and dispatches inbound frames to their handlers. The magic is present in every header, and the key is never transmitted.

From any single frame, the dissector recovers the magic, version, flags, sequence, length and a verified checksum, plus opcode ^ key[0]. Because the beacon opcode is the constant 1, key[0] follows from that byte. Both test vectors replay through the dissector, and the wire format is documented well enough to decode live traffic. Full payload plaintext from a purely passive capture, including tasking and target lists, needs the remaining three key bytes, and recovering those needs known-plaintext on a short frame. A fake C2 that knows only key[0] can read bot beacons and forge zero-payload commands, because key[0] suffices for the header, while forging a payload-bearing command to a specific bot requires that bot’s full session key.

The command table carries per-opcode confidences running from 0.80 down to 0.50. Opcode 3 launches an attack via sub_40aea0 → sub_40045c, forking per attack and acking if flags bit 0 is set (0.80, agreed); opcode 2 is scanner control, forking the telnet scanner (0.70, corrected during consensus); and opcode 7 is a control opcode with a length ≥ 4 guard whose exact action is unresolved (0.50).

The attack dispatcher and the flood handlers

sub_40ad3c branches on the frame opcode and routes an attack command into sub_40045c, which indexes the 15 flood handlers registered in attack_init at 0x4008e8 — SYN, ACK, UDP, TCP, GRE, HTTP and Valve-Source floods. The mapping from attack-vector id to individual handler stops there, so a capture showing a tasking frame identifies an attack command and leaves the flood type open.

The HTTP material in the binary belongs to the flood handlers. The in-binary HTTP request templates and the TLS ClientHello at 0x45f2f8 are cross-referenced only from the 15 flood handlers registered in attack_init at 0x4008e8, which rules out a second, HTTP-based C2 channel and leaves raw TCP as the only channel to detect.

Capabilities

These capabilities were not individually submitted to the consensus round, though the endpoints, crypto, framing and beacon they rest on were.

CapabilityATT&CKMBCEvidenceConf
Config string obfuscation (RC4)T1027C0031sub_4123880.92
Encrypted channel (rolling-XOR payload)T1573.001C0027/C00310x40d9540.90
Network denial of service (15 flood handlers)T1498, T1499B0030attack_init 0x4008e80.85
Telnet propagation scanner / brute forceT1046, T1110.001—sub_4101740.85
Ingress tool transfer (loader)T1105—sub_40ee800.80
Process-name masquerade (prctl)T1036.004—0x40df400.70

The sample propagates with a telnet scanner at sub_410174 that tries an embedded credential wordlist on tcp/23, and the loader at sub_40ee80 fetches an architecture-specific second stage over wget or tftp from hxxp[://]myrepis[.]gd/dlr.mips. Which /dlr.[arch] a given victim pulls is selected at runtime, so the MIPS URL recovered here is one branch of several.

Privilege and network paths

The sample runs with user privilege only and needs outbound tcp/38242–46812 to the C2, udp/53 to the two hardcoded resolvers, inbound tcp/39148 for the single-instance lock, outbound tcp/80 for the loader fetch, and outbound tcp/23 for telnet scanning, none of which needs root. A defender who denies any one of these paths blocks the sample.

Host artifacts

A defender can observe two artifacts on the host, the lock magic BOT\x01TAKE that the sample sends to an incumbent instance over tcp/39148 (0x41d250, confidence 0.85) and the single-space process name it sets through prctl(PR_SET_NAME) (0x40df40, confidence 0.60). Both sit under the 0.9 threshold and consensus verified neither, and the renderer emitted no host-indicator Sigma rule because it had no verified indicator to key on. This family is memory-resident, so a reboot clears the process, but a host that beaconed should still be treated as compromised and as a flood source.

Correlation across captures

The pipeline correlated the analysed captures and found one shared host, 8[.]8[.]8[.]8, present in five other captures. Taken at face value that places the sample in a wider campaign, but the same address is one of the bot’s two hardcoded DNS resolvers, used to resolve the C2 domains, and every host that resolves a name through a public resolver contacts the same address. A stronger overlap would be one of the three C2 domains or the loader host appearing in another capture, and the findings report no such overlap. The two resolvers were left off the blocklist.

The three key bytes that have not been recovered

The pipeline has not recovered the three remaining key bytes, which would make payloads from passive captures readable. The inbound semantics of opcode 3 and opcode 7, and the attack-vector id to handler mapping for the 15 flood handlers, are also still to be reversed. Because the pipeline only read the file and never ran it, the sample’s runtime timing, retry and post-execution behaviour stay open too, as does whether the C2 hosts still resolve and still answer on the recovered port.

Family
mirai
First seen
November 14, 2026
Vector
Runs as a ddos-bot/worm; the entry vector is not established by static analysis
Format
128 KB mips ELF 32-bit MSB executable
VirusTotal
42/75 engines: trojan.mirai/usblf826
Tags
ddos-bot · elf · mips · raw_tcp · worm
Sample
By request. Email security@kinryu.sh

SHA-256

  • 26344f698ff13d039c539e9f67225eb51ee94b557be5db0ba765c84ee38d110f as captured

Analysis performed using an automatic malware analysis pipeline using Binary Ninja

← All captures