half a turn: rot13 ambiguity and mixed-line decoding

huntress ctf 2026, day 2 · warmups · all three modes

tools used: decoding engine and timed-attempt pipeline.

day 2 swapped base64 for rot13: the prompt was "thirteen steps forward. funny how that works out." mastery split each message across numbered lines with a different codec per line.

the key insight: syntax validates a candidate, semantics chooses among candidates. rot13 keeps a slug's shape, so a structural match alone cannot tell ciphertext from plaintext.

artifact anatomy

the single and time trial were the whole day-1 sentence in rot13, one line, with no base64 layer: punctuation, spaces and the slug's digits pass through unchanged, and only the letters move. mastery had 8 sets, and each blob held two records, 01<TAB>... and 02<TAB>...: line 1 base64 (day 1's codec), line 2 rot13 (day 2's). the encoding boundary was the line boundary, and the cut fell mid-sentence and often mid-word: line 1 decodes to roughly the first half of the sentence, line 2 to the rest, slug included, so the decoded pieces join with no separator. a mastery delivery could be a plain blob or a zip of blob-0K.txt members.

01	TmljZSB3b3JrIGRlY29kaW5nIHRoaXMgd2FybXVwISBUbyBzb2x2ZSwgc3VibWl0IHRoaXMg
02	rknpg nafjre gb gur Tnzr Znfgre: <rot13 slug>

extraction method

breadth-first search over the transforms, with a seen set so reversible operations do not cycle:

queue = deque([(raw.strip(), [])])
while queue:
    text, path = queue.popleft()
    if slug_on_last_line(text) and english_score(text) > 0:
        return text, path
    for name, transform in transforms.items():
        candidate = transform(text)
        if candidate not in seen:
            seen.add(candidate)
            queue.append((candidate, path + [name]))

for numbered blobs, lines are sorted numerically, only the number and tab are removed, each chunk gets its plausible decodings, and joined combinations are tested best-english first. nothing hard-codes "line 1 is base64".

validation and answer formatting

the answer is the word-word-word-NN slug on the decoded text's last non-empty line, and the text around it must read as english (markers such as "the", "submit", "answer", "decoded").

failed approaches and pivots

the obvious implementation (apply every transform, return the first string matching the slug regex) was wrong. an illustrative pair: qhfgl-yvoenel-jvaq-42 and its rot13 decoding dusty-library-wind-42 are equally well-shaped, and the encoded one is reached first. requiring english in the surrounding text fixed it. decoding a numbered blob as one string destroyed both line formats; the fix was to decode per line.

automation across modes

the set number comes from the answer id, while the explicit number in a bundle member's name says which blob belongs to it; archive names, not loop position, are the durable mapping. with that, one decoder served all three modes.

lessons

solve times

public scoreboard · day 2 finish: top 3

  • 10:25.2single#47 of 419 solvers
  • 11:12.4time trial#41 of 377 solvers
  • 12:26.2mastery#33 of 367 solvers
  • #2team day finishof 264 teams that cleared it, in 18:47.6
  • #4single orderof the day's 5, by our flag time

from the public scoreboard: 09:00 et release to our flag; the table below counts from our attempt's start.

from our first start of the mode to its flag; earlier preparation was not recorded.

mode work to flag attempts wrong submits
single 1m46s 1 -
time trial 22s on the clock (prep not logged) 1 -
mastery 18s on the clock (prep not logged) 1 -

the clock

server timer of the winning attempt; used is attempt start to flag, left is what remained on the clock. day 1-2 deadlines were not logged per attempt.

mode time available time used time left
time trial not recorded 21.6s not recorded
mastery not recorded 18.0s not recorded

where we got stuck

flags: single, time trial, and mastery [redacted].

{generated by a clanker}