Robben's Mirai variant triage across a lying honeypot clock

forensics
flag RxR{UTC+5_156688_0x54_SORA}

Robben.zip holds three files: cowrie.json (an SSH honeypot log from sensor edge-gw-03), capture.pcap (the packet capture of the same break-in), and robben.rodata.bin (a 2 KB dump of the .rodata section of a payload the endpoint agent deleted). The brief is four lawyer's questions, and it warns upfront that the log and the pcap disagree - so every answer needs a second, independent source before it goes in the report.

Insight

At 23:47:54 UTC, 192.0.2.45 SSHes into the sensor with a Go client, logs in as root/admin, and runs one long command line: fetch a dropper (phantom.sh) via wget/curl with tftp/ftpget fallbacks, then for each of ten CPU architectures, download bins/phantom.<arch>, copy it to robben, and run ./robben Payload. Download server: 198.51.100.7. Session closes 23:49:26.

Q1 - what UTC offset is the sensor's clock really on?

Every log timestamp ends in Z, which proves nothing about the clock itself. Cross-referencing the same events:

Event cowrie.json ("Z") pcap (epoch -> UTC)
SSH connect 04:47:54.914 23:47:54.841 (SYN)
Command input 04:48:38.221 23:48:38.058
Session closed 04:49:26.052 23:49:26.050 (FIN)

Five hours ahead, every time, to within 0.2s. That alone doesn't say which clock is lying, and the brief insists on a third source: the download server's own HTTP Date: headers (Thu, 23 Jul 2026 23:48:38 GMT, then :42, then :47) match the pcap packet timestamps to the second. Two independent clocks agree on 23:48 - the sensor is the odd one out, writing local UTC+5 and tacking on a Z it hasn't earned.

Q2 - how many payload-build bytes did the sensor actually receive?

The log reports this sequence by URL/hash only, no sizes, and calls the first x86 fetch a download.failed. The sizes have to come off the wire:

1/3Validate the capture

Every IP/TCP checksum is valid, nothing's fragmented, overlapping segments never disagree, both server-to-sensor streams reassemble with no holes, and the sensor's own ACKs advance through every byte up to the server's FIN on both connections - the strongest proof the sensor actually received the data.

2/3Read the responses

Each response delivers exactly its Content-Length, confirmed against the ETag size fields (24828, 26236, 27280 bytes for x86/mips/mpsl). The "failed" x86 fetch arrived in full, twice - both copies hashing identically on the wire.

3/3Decide what counts

phantom.sh is the dropper script, not a compiled build - including both copies gives 170286, rejected by the platform. The three FTP sessions end at 530 Login incorrect. with no data connection, zero payload bytes. The log's /robben "redir" entry is just the dropper's local cat phantom.<arch> >robben, never crossing the network.

"Every transfer counts" means duplicates included: (24828 + 26236 + 27280) x 2 = 156688.

Q3 - what single-byte key hides the text in robben's data section?

robben.rodata.bin is a Mirai-style .rodata dump: the C2 address in plaintext at 0x000, a credential dictionary (unreadable as stored) at 0x014-0xF4, Mirai's table.c strings at 0x124-0x290, and a jump table plus a character-class table beyond that.

Insight

Mirai's table_unlock_val() XORs every byte of an entry including the null terminator, so each encoded string ends in 00 ^ key. Nearly every entry in that region ends in 0x54 ('T'). Decoding the dictionary and table with that key gives readable strings (default, root, xc3511, /bin/busybox SORA, Connected To CNC, the CNC/report ports 0x0520/0x0f48...).

Pitfall

A few entries still look random under 0x54 (OxhlwSG8, S2fGqNFs). Brute-forcing all 256 keys against each confirms none reads better than 0x54 - those are just real factory-default IoT passwords Mirai forks carry, not a second cipher. One entry (0x23b) ends in 0x45 instead and decodes to a string that already exists elsewhere under 0x54 - a build leftover, not part of the scheme.

Key: 0x54.

Q4 - what does this family call itself?

Mirai checks for a real busybox shell by running a nonexistent applet and waiting for the error (/bin/busybox ECCHI in the original source). Forks rename the applet, which becomes the family's self-name. This sample has /bin/busybox SORA / SORA: applet not found - SORA, a known Mirai derivative. (The phantom.* and robben names are just what the operator called things on disk, not the family name.)

Flag

output
RxR{UTC+5_156688_0x54_SORA}

Pitfall

All four values were right on the first attempt; the wrapper wasn't. Rejected: RxR{+5_156688_0x54_SORA}, RxR{5_156688_0x54_SORA}, RxR{+5_156688_84_SORA}, RxR{+5_170286_0x54_SORA}. The platform wants the offset written exactly as the question labels it: UTC+5, not +5.

Takeaways

  • The log's labels can be wrong - it called its own clock UTC and called a complete download a failure. The pcap disproved both.
  • "Received" means ACKed, not just captured - the sensor's ACK numbers are the real receipt.
  • Mirai's XORed null terminator puts the key byte at the end of every string; brute force is only needed as a sanity check.
  • tshark refused to open this pcap even on a world-readable copy; Scapy did all the packet work (flow listing, reassembly with conflict checks, checksum recompute, TTL/IP-ID, ACK progression).