Honeypot capture
mozi
This 2,500-byte (0x9c4) statically linked MIPS-I ELF is a loader, captured by a honeypot sensor network and analysed for defenders without ever being run. The pipeline statically recovered one command-and-control endpoint from the sample. The caller supplies that endpoint on the command line as a host named by ${argv1}.${argv2}.${argv3}.${argv4}, with ${argv5} for the port and /Mozi.l for the path. No IPv4 literal, hostname, URL or port constant exists anywhere in the image.
A loader is the disposable first stage of an intrusion, a small program that works out what kind of machine it landed on, fetches the payload built for it, starts it and exits. It carries none of the capability the operator wants. That capability lives in the second stage it downloads. The findings state that a loader has to name the infrastructure it fetches from in a form the device can resolve. Recovering one loader therefore recovers the delivery infrastructure the operator used for that wave.
The campaign builds for two architectures, mipsel and mips, which the findings describe as the signature of a campaign aimed at routers, cameras and other embedded devices rather than at servers.
| SHA-256 | ba0bbb8b6b7f0ad91a176b1297713abae278ddafa83b833fe6bd54267a3c89b3 |
| MD5 | 2e9f2a6787e3e6f1633d0250016c8080 |
| SHA-1 | 7e12cebab3bfd13fc18283552c06621b0b319aa5 |
| File type | ELF 32-bit LSB executable, MIPS, MIPS-I, statically linked, stripped |
| Size | 2,500 bytes |
| Entropy | 4.84, a measure of how random the file’s bytes are; the value is low enough that the image is not packed |
The pipeline analysed the sample statically, loading the file as data, never executing it, and contacting or resolving none of the recovered endpoints. Coverage was 12 of 12 functions and the full 84-byte (0x54) .rodata. The pipeline recovered structure and strings with strings and rabin2, anchored every indicator to a file offset and corroborated it across both tools, then disassembled and decompiled the executable sections headlessly in Binary Ninja. No individual analyst performed the work; the pipeline is automated and the findings are attributable to Kinryu Labs.
One linear path from stdout to disk
The sample follows one linear control path and has no dispatcher. Of the 2,500-byte file, .text accounts for 0x6f0 bytes and .rodata for 84 bytes, and Binary Ninja reports 12 functions because it absorbs main at 0x400274 into _start at 0x400670. The path is to write a five-byte watermark to stdout, read /proc/self/cmdline, split it on NUL, assemble the destination, create ./Runn, open a socket, connect, send one fixed 24-byte (0x18) request, skip to the header terminator, relay the response body into the file, and exit.
The deep static pass recorded a valid ELF magic at offset 0x99c, which commonly marks a bundled second stage. That offset is 2,460 bytes into a 2,500-byte file.
The sample creates the drop before it begins the fetch. At 0x400458 it creates ./Runn with O_WRONLY|O_CREAT|O_TRUNC (0x301) and mode 0777 (0x1ff), and the run aborts if the creation fails. A host that ran this sample therefore probably carries Runn whether or not the fetch succeeded. "Runn" is a bare relative name and there is no chdir syscall in the image. The absolute location of the drop is whatever working directory the parent supplies, and the findings list that absolute path as an open question.
The sample does not execute the file it writes. The 112 distinct immediates in .text include none of the execve, fork, clone, nanosleep, time or ptrace syscall numbers. Whatever executes ./Runn must be a separate stage, and which stage that is remains open.
The second host artifact is a five-byte watermark. The sample writes the bytes Mozi\n to fd 1 at 0x4002d8 before any network activity, which the findings record as its first action. The text is attacker-controlled, and the findings list it as a console and log artifact with no weight as family evidence.
All four recovered capabilities sit on that single download path. The confidence values are the pipeline’s per-claim scores, and none of the four carries a verification flag. The consensus round covered only the endpoint, transport and framing claims, which the findings record separately.
| Capability | ATT&CK | MBC | Offset | Conf. |
|---|---|---|---|---|
| Hand-rolled HTTP/1.0 over a raw TCP socket, one fixed 24-byte request line | T1071.001 | B0030 | 0x400534 | 0.95 |
| Downloads a second stage over the TCP channel | T1105 | B0030 | 0x4005e0 | 0.95 |
Creates ./Runn (0x301, mode 0777) before connecting | — | — | 0x400458 | 0.95 |
| Takes the C2 destination entirely from its own command line | — | — | 0x400354 | 0.92 |
The address arrives on the command line
At 0x400354 the sample opens /proc/self/cmdline, reads 128 bytes (0x80), splits on NUL into at most six tokens, and builds its sockaddr_in from tokens 1 through 5: four dotted-quad octets through atoi and an inline byte-pair assembler, and a port through atoi and an inline htons. In the decompilation, the call that opens the file sits next to the call that reads it.
0x4002f4 int32_t $v0_1 = sub_400164(0x40079c, 0, 0x1ed)
0x400314 int32_t $v0_2 = sub_400200($v0_1, &var_98, 0x80)
The octet assembly is visible as byte masking straight into the call:
0x00400410 3c00a48f lw a0, 0x3c(sp)
0x0040041c 09f82003 jalr t9
0x00400420 21804000 move s0, v0
0x00400428 ff004730 andi a3, v0, 0xff
0x0040042c 5480998f lw t9, -0x7fac(gp) ; [0x440834:4]=0x4000e0
0x00400430 ff004432 andi a0, s2, 0xff
0x00400434 ff002532 andi a1, s1, 0xff
0x00400438 09f82003 jalr t9
0x0040043c ff000632 andi a2, s0, 0xff
Every input to sin_addr (stack slot sp+0x20) and sin_port (sp+0x1e) traces to an atoi over a stack token, and the findings record that no immediate feeds either field. The sample therefore requires the invocation shape [argv0] [octet1] [octet2] [octet3] [octet4] [port]. Launched with fewer arguments, the sample assembles its sockaddr_in from uninitialised stack slots.
One of the six atoi call sites is redundant. At 0x400394 the sample throws the result away, because the delay slot stores the constant 2 into sin_family instead.
0x400384 lw $s1, 0x40($sp)
0x400388 lw $t9, -0x7fc8($gp)
0x40038c addiu $v0, $zero, 2
0x400390 move $a0, $s1
0x400394 jalr $t9
0x400398 sh $v0, 0x1c($sp)
The consensus round returned DISAGREE on the endpoint claim, and the findings record that claim as unverified and disputed for that reason. The primary backend logged the endpoint as a URL template anchored at 0x4007c0, reconstructed from the request literal plus the five argv tokens. The verifier read the same address and found only the 24 literal bytes GET /Mozi.l HTTP/1.0\r\n\r\n there, with no scheme text and no argv1..argv5 template text in that string, and placed the target assembly around 0x400388–0x400440. The pipeline re-read the bytes during the consensus round and confirmed that the verifier reads them correctly. The two readings differ over how the claim should be stated, and the findings record that the sample assembles no URL string anywhere in its code path.
The verifier independently confirmed the underlying classification, tracing the split loop at 0x4002e8–0x400370 and the atoi of argv[1..4] into octets and argv[5] into the port.
A defender can pivot on the invocation, because the address appears in the command line of whatever delivered this binary. A responder should treat a host where this ran as having fetched an unknown second stage, and should recover the parent process’s command line if it is still available. The findings list two further open questions here: which addresses the C2 host currently resolves to, and whether it still answers on the recovered port.
The dead socket() call and the MIPS constant inversion
The first socket() at 0x400474 is dead code. The sample discards its return value, because the move $s2, $v0 at 0x400478 sits in the call’s delay slot and so captures the pre-call $v0, the ./Runn file descriptor from the open() at 0x400458. The relay at 0x4005e0 writes to that file descriptor. A reader who takes both socket calls at face value in source order can mistake the same code for a socket-to-socket tunnel.
0x00400464 02000424 addiu a0, zero, 2
0x00400468 5880998f lw t9, -0x7fa8(gp) ; [0x440838:4]=0x400228
0x0040046c 02000524 addiu a1, zero, 2
0x00400470 21300000 move a2, zero
0x00400474 09f82003 jalr t9
On MIPS, SOCK_STREAM is 2 and SOCK_DGRAM is 1, inverted relative to x86. The live socket(2, 2, 0) at 0x40048c therefore opens a TCP socket and must not be recorded as UDP.
The 24-byte request and the body relay
The consensus round verified the transport claim. There is no HTTP library in the image; socket, connect, read and write are reached through inline syscall wrappers, and the request is one fixed write of GET /Mozi.l HTTP/1.0\r\n\r\n with no headers at all, not even Host:. The length 24 is computed at 0x400528 as addiu s0, s3, 0x17, where s3 is strlen of the one-byte variant tag "l" at 0x400790:
0x00400524 5080998f lw t9, -0x7fb0(gp) ; [0x440830:4]=0x4001d8
0x00400528 17007026 addiu s0, s3, 0x17
0x0040052c c007a524 addiu a1, a1, 0x7c0
0x00400530 21202002 move a0, s1
0x00400534 09f82003 jalr t9
0x00400538 21300002 move a2, s0
Because the sample computes the request length from the tag, the tag is a build-time parameter, and the findings call this strong evidence that the operator generates the loader once per variant. Whether sibling Mozi.[tag] variants of this loader exist is listed as an open question, and this sample carries only its own tag. The strings at 0x4007b0–0x4007c0 are the whole of this sample’s text: "Runn", "ERR\n", and the request literal.
The findings record the framing as absent at confidence 0.95, with no magic, no length field, no endianness and no compression. The sample handles the response by accumulating i = (i << 8) | byte at 0x400598–0x40059c and comparing it against 0x0d0a0d0a, which the lui/ori pair at 0x4005a0/0x4005a4 builds and the bne at 0x4005a8 tests. Once the header terminator matches, the loop at 0x4005b0–0x4005f0 reads 128 bytes and writes exactly that count to the dropped file with no transform between the read and the write. Because the accumulator is arithmetic on a register, this logic is byte-order independent, and the findings warn against recording it as little-endian on the grounds that the target is mipsel.
The findings record that decoding a capture needs no tool, since the payload is the body verbatim starting after the first CRLFCRLF, and they give that as the reason no dissector was written; reproduction/c2_dissect.py would be return raw.
Why the family label stays at 0.60
The family label stays at 0.60 because it rests on two attacker-chosen strings, the watermark text Mozi\n at 0x400794 and the URI path /Mozi.l at 0x4007c0. Nothing in this offline container could corroborate them: capa exited 17 with no MIPS backend, FLOSS exited 255 on this architecture, neither telfhash nor a YARA rule set was available, and no corroborating code-structure match was possible. The findings flag the label for human review.
Detection without a network indicator
The findings record the absence of network-infrastructure indicators as a property of the sample itself, which the pipeline’s complete static coverage supports. The concrete destination IPv4 address and TCP port are listed as open questions, and dynamic_required is set to true because the destination is a runtime input.
The findings describe a headerless HTTP/1.0 GET as highly anomalous in egress traffic, and recommend hunting on the URI path /Mozi.l. The remaining detection material is the Runn file and the five numeric arguments in the command line of the parent that launched the sample.
- Family
- mozi
- First seen
- November 26, 2026
- Vector
- Runs as a dropper/loader; the entry vector is not established by static analysis
- Format
- 2 KB mips ELF 32-bit LSB executable
- VirusTotal
- 29/71 engines: Trojan.Linux.Mirai.K!c
- Tags
- dropper · elf · http · loader · mips
- Sample
- By request. Email security@kinryu.sh
SHA-256
-
ba0bbb8b6b7f0ad91a176b1297713abae278ddafa83b833fe6bd54267a3c89b3as captured
Analysis performed using an automatic malware analysis pipeline using Binary Ninja