One archive, containing one archive, containing one archive - a hundred
stages deep. Every stage wears the same disguise: a 25-file telemetry
tree full of backups, cache blobs, logs, and CSVs. Only one file per
stage actually matters: the child .zip.
Hint
unzip -z on the handout shows an archive comment,
X-Pressure-Chain: active. That's the author telling you a chain exists
before you've even opened anything.
Separating payload from decoration
Every stage's manifest and status JSON name a stage_NNN counter, and
the logs/CSVs/telemetry rows are plausible filler. The obvious first
pull - .dat and .bin blobs - is a dead end: cache/blob_01.dat,
backups/backup.dat, misc/fragment.dat, and friends are all random
bytes with no real header. One, telemetry/node.dat, even gets
misidentified by file(1) as "OpenPGP Public Key," which it plainly
isn't - pure padding dressed up to look worth investigating.
Insight
Strip the decoration away and the structure is trivial: each archive
holds exactly one .zip, and that zip is the next stage. The stage
counter embedded in the JSON is the only state that actually carries
downstream (stage_001, stage_002, ...) - everything else resets each
level.
Walking the chain without touching disk
Pitfall
The challenge's own description warns against unpacking blindly, and
it's right to: a hundred nested archives written to disk is pointless
I/O at best, and a hostile version of this exact setup is literally a
zip bomb. Nothing here needs real disk writes - read each child archive
straight into a BytesIO and descend in memory instead.
1import io, re, zipfile
2
3def stage_number(zf):
4 for name in zf.namelist():
5 if name.endswith((".json", ".log", ".txt")):
6 m = re.search(rb"stage_(\d+)", zf.read(name))
7 if m:
8 return int(m.group(1))
9
10def child(zf):
11 zips = [n for n in zf.namelist() if n.endswith(".zip")]
12 return zips[0] if zips else None
13
14with zipfile.ZipFile("pressure.zip") as outer:
15 current = io.BytesIO(outer.read(outer.namelist()[0]))
16
17depth = 0
18while True:
19 with zipfile.ZipFile(current) as zf:
20 names = zf.namelist()
21 if "final/flag.txt" in names:
22 print(zf.read("final/flag.txt").decode().strip())
23 break
24 current = io.BytesIO(zf.read(child(zf)))
25 depth += 1
depth 97 stage 98 25 files -> logs/container_sync_2895.zip
depth 98 stage 99 25 files -> exports/container_sync_0fbf.zip
depth 99 stage 100 final stage, flag found:
L3m0n{53bdc987084ccf0ec7747fc9edee1b12}
The stage marker runs cleanly from 1 to 100, and the final stage is the
only one anywhere in the chain with a final/ directory.
L3m0n{53bdc987084ccf0ec7747fc9edee1b12}
Note
Scanning every stage along the way for the L3m0n{...} wrapper turns up
exactly one hit, in final/flag.txt - no decoy flag was planted earlier
in the chain to catch an impatient grep -r.