entropy
Challenge
Imported from local notes.md.
Solution
Original Notes
entropy
Challenge Summary
- Given: A live ANSI maze service at
nc 34.131.216.230 1340. - Goal: Reach the red target cell before the 5-second collapse.
- Constraints: The board redraws continuously, the player resets after the collapse timer, and input pacing is not faithful FIFO when flooded.
Initial Recon / Triage
- Observations:
- Start position is
(1,1)and the target is(49,49). dmoves right andsmoves down from the start. Invalid keys cause redraws without movement.- Same-connection 5-second windows differed by hundreds of mask cells, which did not support the idea of a tiny reusable template set.
- Start position is
- File identification:
artifacts/probe_entropy_path.py: trace live paths from a candidate route.artifacts/scan_entropy_motifs.py: scan repeatedd/ssteering motifs.artifacts/compare_entropy_round_templates.py: compare stationary masks across collapse windows.artifacts/attempt_entropy_route.py: retry a promising route until the service prints a flag.
- Entry points:
- Live service only.
Hypotheses & Approach
- Hypothesis 1: The maze might come from a small template family that could be fingerprinted and solved offline.
- Hypothesis 2: If template reuse was not strong enough, a repeated steering pattern could still land close enough to the target to win occasionally.
Outcome:
- Template clustering stayed noisy even with multi-frame denoising and same-connection comparisons.
- The best live route family was a repeated
ddssmotif followed by a longdtail.
Execution Steps (Reproducible)
Stage 1
Commands:
cd /root/incognito2026CTF/entropy
python3 artifacts/collect_entropy_templates_multiframe.py --samples 16 --read-window 1.4 --min-frames 6 --cluster-threshold 24
python3 artifacts/compare_entropy_round_templates.py --rounds 3 --max-seconds 18
Results:
- Fresh-session and same-connection mask distances were both large, so no small template family was proven.
Stage 2
Commands:
cd /root/incognito2026CTF/entropy
python3 artifacts/search_entropy_patterns.py
python3 artifacts/sample_entropy_pattern.py "$(python3 - <<'PY'
print('ddss'*80 + 'd'*240)
PY
)" --trials 20 --duration 5.5 --stop-score 97
Results:
- The route
ddssrepeated with a longdtail produced a near-solve leg ending at(49,48).
Stage 3
Commands:
cd /root/incognito2026CTF/entropy
python3 artifacts/attempt_entropy_route.py "$(python3 - <<'PY'
print('ddss'*80 + 'd'*240)
PY
)" --trials 20 --duration 5.6
Results:
- Trial 7 returned the flag while reporting a final parsed player position of
(49,48). - The service output contained:
IIITL{K4l31d05c0p3_M4z3_M4573r_9921_n0_3y35_41c0b0c61792}
Artifacts Produced
artifacts/compare_entropy_round_templates.pyartifacts/attempt_entropy_route.pyartifacts/probe_entropy_path.pyartifacts/scan_entropy_motifs.pyartifacts/sample_entropy_pattern.py
Flag
IIITL{K4l31d05c0p3_M4z3_M4573r_9921_n0_3y35_41c0b0c61792}