rotten base: base64 with its letters turned thirteen places

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

tools used: decoding search engine and timed-attempt pipeline.

"sixty-four invited thirteen over. things got scrambled." sixty-four is base64 and thirteen is a letter rotation, and the order is the trick: the message was base64-encoded first, and then every letter of the base64 text was rotated by thirteen places. the single and the time trial were one such line each; the mastery was a zip of a hundred and forty-three blobs of twenty-nine numbered lines whose last line was a short chunk under the same treatment.

the key insight is what the rotation leaves alone. rot13 moves letters only, so the digits, the + and / and the = padding of the base64 text stay where they are, the length does not change, and the result still looks exactly like base64. it just does not decode, or decodes to noise. a base64-shaped line that refuses to decode is the tell; the reading is "rotate the letters back, then decode base64", in that order.

challenge shape

single         1 field    the slug one blob's decoded text instructs
time trial     1 field    the same, a fresh blob
mastery      143 fields   one slug per blob, 143 blobs of 29 numbered lines

the field is message (setK.message in mastery).

artifact anatomy

the single's blob is one line of characters from the base64 alphabet, padding included. a made-up example shows the shape:

"Hi"                 -> base64    SGk=
letters +13          -> text      FTx=      (still base64-shaped)
letters -13, base64  -> SGk=      -> "Hi"

in the mastery each blob is NN<tab>chunk lines. line k is encoded by day k's encoding, from base64 on line 1 through reversed hex on line 28; line 29 is a chunk of the message's tail under rot13-over-base64, which makes twenty-nine numbered lines a blob and a hundred and forty-three blobs a set.

extraction method

the decoding engine has a rot13 step and a base64 step, and a chain written a>b applies its steps left to right. the prompt's words gave it no head start: no hint word in its table covers "sixty-four", and "thirteen" counts as a shift only next to a word like caesar, shift or rotate, which this prompt does not have. the single was read by the plain breadth-first peel: rot13 is a one-step reading of any text, and base64 of its output is the second step. the time trial and the mastery then tried that chain first, because the process that won the single keeps the chain its peel read the slug by.

def rot13_then_b64(text: str) -> str:          # the `rot13>b64` row
    turned = codecs.decode("".join(text.split()), "rot13")
    return base64.b64decode(turned, validate=True).decode("utf-8")

for the single and the time trial the chain's output held a slug of the asked shape. for the mastery the line reader decoded lines 1 to 28 by their schedule rows and read line 29, past the schedule, by the single's chain before any search.

validation and answer formatting

a reading counts when its text is printable and holds a slug of the asked shape: three lowercase dictionary words, a hyphen and two digits. the chain is cheap to refuse: the rotated text must still be valid base64 (it always is, by construction) and the decoded bytes must be utf-8 text, which the wrong order or a wrong rotation fails at once. each decoded text was one sentence with one slug-shaped token, submitted alone, jovial-comet-nugget-31 for the single's blob, peppy-rainbow-coral-52 for the time trial's and witty-island-trail-51, kind-beacon-waterfall-50, brisk-banner-brook-62 and 140 more for the mastery's 143 blobs.

failed approaches and pivots

none on day 29: the first run of every mode found the reading.

automation across modes

the same reading answered every mode: 0.08 seconds on the single, under a millisecond on the time trial (the single's chain kept in-process) and 0.08 seconds for the mastery's hundred and forty-three blobs. on day 29 the schedule gained rot13-over-base64 as row 29, so the next mastery reads line 29 from the table rather than from a search.

lessons

solve times

public scoreboard · day 29 finish: below top 10

  • 0:02.7singlefirst blood, +0.69 s
  • 0:06.6time trialfirst blood, +0.08 s
  • 0:10.2mastery#2 of 145 solvers
  • #61team day finishof 116 teams that cleared it, in 34:38.6
  • #1single orderof the day's 7, 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 when we started working on the mode to its flag. attempts counts our solver runs.

mode work to flag attempts wrong submits
single 1.4s 1 0
time trial 1.7s 1 0
mastery 1.0s 1 0

the clock

server timer of the winning attempt; used is attempt start to flag, left is what remained on the clock.

mode time available time used time left
time trial 30.0s 1.7s 28.3s
mastery 160.0s 1.0s 159.0s

where we got stuck

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

{generated by a clanker}