doc_vectors.npy
README.txt
token_table.npy
vocab.json

AI/LLM Security • 400 points (Dynamic Decay) • Hard

DYNAMIC SCORING Current: 400 pts Range: 500 pts → 400 pts • Solves: 43 Setu's retrieval index was exported with the text removed. Only numbers left the building, which everyone agreed was safe. Challenge Artifacts: README.txt doc_vectors.npy token_table.npy vocab.json Submit Flag*

Dr.Binary
read_file
list_files
run_sandbox

The setup: 32 unit-length document vectors, and a table of 4000 token vectors (norm ≈ 19, not unit). This smells like a bag-of-words index — each doc vector being the normalized sum of the token vectors of the words it contained. High-dimensional random vectors make each member's cosine with the sum stand out (~0.6 vs ~0.05 for non-members), so greedy matching pursuit should recover the word sets.

run_sandbox

The greedy pass cracked the model — real English words surfaced in the vocabulary (seal, custodian, draft, word, is) among the nonsense tokens. Doc 18 reads "seal custodian word is" — a sentence. Residuals ~0.4-0.6 suggest duplicate tokens (word counts > 1), so let me do OMP with non-negative least squares and inventory the English words.

run_sandbox
run_sandbox

NNLS reconstructs every doc exactly (resnorm ≈ 3e-4 = float16 noise), so the bag-of-words model is confirmed. English words found: docs 4, 7, 18, 30. Doc 18 reads "seal custodian word is copper lantern keep seventeen this quiet" — the custodian's seal word statement. Now let me check exact coefficients (TF counts should be integer ratios) to see which words are content vs. filler.

run_sandbox

The coefficients are geometric — each is exactly 0.9× the previous — so coefficient magnitude = word position in the original text. Decoding the two "seal word" statements in true order:

  • doc 4: draft seal word is | ash harbor glass | for the night shift
  • doc 18: custodian seal word is | copper lantern seventeen | keep this quiet

Each statement reads "X seal word is: ⟨3-word seal⟩" followed by a 3-word filler phrase ("for the night shift" / "keep this quiet"). The custodian's is doc 18. Let me verify the full decode across all 32 docs for sanity:

run_sandbox

Full decode confirms it — the other docs are pure gibberish noise, docs 7/30 contain only stray decoy mentions of "seal"/"draft", and the two real statements are docs 4 and 18.

Solution

The model: doc_vectors.npy rows are unit-normalized sums of token vectors (token_table.npy, ordered by vocab.json). With 384-dim near-orthogonal random vectors, each in-doc word has cosine ≈ 0.6 with its doc's vector while non-members sit at ≈ 0.05 — so greedy matching pursuit picks the members out immediately, and NNLS reconstructs each doc to resnorm ≈ 3e-4 (pure float16 noise).

The order trick: the NNLS coefficients turn out to be exactly geometric — each next word's coefficient is 0.9× the previous. So coefficient rank = word position, and the removed "text" is fully recoverable, word order included:

  • doc 4: draft seal word is ash harbor glass for the night shift
  • doc 18: custodian seal word is copper lantern seventeen keep this quiet

The custodian's seal word is the three content words after "is" ("keep this quiet" is the filler phrase, just like doc 4's "for the night shift").

Flag: CACTF{copper_lantern_seventeen}