ChromaStone Ben 10 FAT16 image, deleted files recovered

forensics
flag L3m0n{1f8abb7f1a399867dbafb7750bfd787a}

A Ben 10 themed forensics box: omnitrix_backup.zip unpacks to a 32 MB omnitrix_backup.img, a FAT16 disk image labeled PLUMBER01. config.json on the visible filesystem lays out the whole plot (and, refreshingly, the whole attack):

json
1{
2  "groups": {
3    "group_3": {
4      "status": "DELETED - FORENSICALLY RECOVERABLE",
5      "files": 11,
6      "traitor": "Kevin 11"
7    }
8  },
9  "plumber_hq": {
10    "encryption": {
11      "algorithm": "XOR-stream",
12      "key_derivation": "concat(stolen_artifact, origin_planet) - no separator, no hashing",
13      "applies_to": "tetrax_shard.dat only"
14    }
15  },
16  "retention_policy": {
17    "note": "FAT filesystem deletion marks directory entries only. Raw cluster data is not wiped."
18  }
19}

That's the whole challenge, stated outright: 11 files got "deleted," FAT deletion doesn't actually erase cluster data, and one of the eleven is additionally XOR'd with a key built from two JSON fields concatenated raw.

Hint

Mount or carve the image and look at the raw bytes well past where unzip/7z lists any files - FAT16 only removes the directory entry, not the file's clusters.

Finding the deleted files

7z l omnitrix_backup.img only lists 22 files (Group 1 and Group 4, the "SECURED" ones, plus the logs). app.log names the deleted Group 3 roster

  • Tetrax Shard, Swampfire, Spidermonkey, Armodrillo, Rath, Cannonbolt, Upgrade, Spitter, Buzzshock, Nanomech, Kevin 11 - and strings -n 6 -t d over the raw image finds ten of eleven of them anyway, in plain text, sitting untouched in their old clusters:
output
127104  Intel: Tracked crystal energy signature to Anur System Sector 7-G.
133245  Intel: LEMME TELL YA SOMETHING! The Forever Knights were in Sector 7-G!
139387  Intel: Area patrol complete. Refer to Tetrax Shard for full coordinates.

The one entry that doesn't show up as readable text is tetrax_shard.dat

  • exactly the file the config flagged as self-encrypted, and exactly the one the log calls out: "tetrax_shard.dat contains the Chromastone crystal location."

Insight

Clusters in this image are a fixed 2048 bytes, written back to back in archive order (Group 1, then Group 4, then Group 3 - matching app.log timestamps exactly). Group 1's first file (heatblast.dat) starts right at the data-region boundary, so every later file's cluster offset is just data_start + index * 2048. Lining that arithmetic up against where strings finds "Codename: Swampfire" (the file right after Tetrax Shard) pins down exactly which 2048-byte cluster is Tetrax Shard's, without needing a directory entry at all.

Decrypting it

The key, per config.json: concat(stolen_artifact, origin_planet), raw concatenation, no separator, no hashing - "Chromastone-Crystal" + "Petropia":

python
1data = open("omnitrix_backup.img", "rb").read()
2chunk = data[124928:126976]              # Tetrax Shard's recovered cluster
3key = b"Chromastone-CrystalPetropia"
4pt = bytes(b ^ key[i % len(key)] for i, b in enumerate(chunk))
5print(pt[:pt.find(b"\x00")].decode())
output
CLASSIFIED - PLUMBER INTELLIGENCE DIVISION
...
RECOVERY AUTHORIZATION CODE:
L3m0n{1f8abb7f1a399867dbafb7750bfd787a}

This code authorizes the Plumber strike team to access the crystal's
last known coordinates. This file was encrypted before archiving using
the mission artifact key. If you recovered and decrypted this file,
the crystal can still be found. Time is critical.

- Tetrax Shard, Senior Petrosapien Operative, Plumber Division 7

Pitfall

Getting the cluster boundary wrong by even a few bytes produces confident-looking garbage, not an obvious error - XOR against a repeating key still "decrypts" misaligned ciphertext into dense-looking noise that's easy to mistake for "wrong key" rather than "wrong offset." If the output isn't readable, check your alignment to the filesystem's cluster boundaries before doubting the key.