Skip to main content

el_camino_del_elegido

Challenge

Imported from local notes.md.

Solution

Original Notes

el_camino_del_elegido

Challenge Summary

  • Given: A ZIP archive containing nodes.json, rules.txt, and echo.png.
  • Goal: Recover the hidden flag from the lattice data.
  • Constraints: Flag format is iiitl{ }.

Initial Recon / Triage

  • Observations: rules.txt describes a million-node six-fold lattice with false connections and a hidden numerical key. nodes.json contains 1,000,000 nodes on a 1000 x 1000 coordinate grid, each with noisy neighbor lists. echo.png contains a 3 x 3 matrix.
  • File identification: nodes.json is line-oriented JSON data with node ids, coordinates, and weighted directed edges. echo.png is the numeric hint source.
  • Entry points: The matrix in echo.png, the archive name hint, and the directed edges between specially filtered nodes.

Hypotheses & Approach

  • Hypothesis 1: The archive name YSBtb2QgYiA9IDA decodes to a mod b = 0, so some quantity in the graph should be filtered by a modulus.
  • Hypothesis 2: The determinant of the matrix in echo.png is the hidden key. This was correct: det(M) = 1337.

Execution Steps (Reproducible)

Stage 1

Commands:

python3 - <<'PY'
import sympy as sp
M = sp.Matrix([[7, 233, 95], [0, 191, -4], [7, 233, 96]])
print(M.det())
PY

python3 - <<'PY'
import base64
print(base64.b64decode('YSBtb2QgYiA9IDA=').decode())
PY

Results:

  • The matrix determinant is 1337.
  • The archive-name hint decodes to a mod b = 0.
  • Together, those imply filtering the graph with modulus 1337.

Stage 2

Commands:

python3 /root/incognito2026CTF/el_camino_del_elegido/artifacts/solve.py

Results:

  • Selecting nodes with id % 1337 == 0 yields 55 special nodes.
  • Considering only edges between those special nodes produces a single directed path.
  • The edge weights on that path are integers and decode directly as ASCII characters.
  • Following the unique path from node 1337 reconstructs the flag.

Stage 3

Commands:

sed -n '1,20p' /root/incognito2026CTF/el_camino_del_elegido/artifacts/solve_output.txt

Results:

  • Solver output confirms:
  • modulus=1337
  • special_nodes=55
  • path_length=55
  • flag=iiitl{1h3re_i5_4lways_4_p41h_w4i1ing_t0_b3_d1scov3red}

Artifacts Produced

  • artifacts/solve.py - final reproducible solver.
  • artifacts/solve_output.txt - recorded solver output.
  • artifacts/mod1337_hits.json - cached subset of nodes with ids divisible by 1337.
  • artifacts/mod1337_points.png - overview plot of the filtered coordinates.
  • artifacts/unzipped/ - extracted challenge files.

Flag

iiitl{1h3re_i5_4lways_4_p41h_w4i1ing_t0_b3_d1scov3red}