$ cat writeup.md…
$ cat writeup.md…
HackTheBox
The challenge provided a zip file (password: `hackthebox`) containing a single file: `token_embeddings.npz`.
$ cat /etc/rate-limit
Rate limit reached (20 reads/hour per IP). Showing preview only — full content returns at the next hour roll-over.
"A cube is the shadow of a tesseract casted on 3 dimensions. I wonder what other secrets may the shadows hold."
The challenge provided a zip file (password: hackthebox) containing a single file: token_embeddings.npz.
token_embeddings.npz — NumPy compressed archive with two arrays: tokens and embeddingsimport numpy as np data = np.load('token_embeddings.npz') tokens = data['tokens'] # shape (110,), dtype <U1 — single characters embeddings = data['embeddings'] # shape (110, 512), dtype float64
Key observations:
{, }, _, #, !, -PCA revealed the embedding structure:
The challenge hint about "shadows" pointed to the idea that the 512D embeddings encode sequential positional information. Consecutive characters in the original message should have nearby embeddings in the high-dimensional space.
This transforms the problem into finding a Hamiltonian path through 110 nodes — essentially a Traveling Salesman Problem (TSP).
scipy.spatial.distance.cdist...
$ grep --similar