back in sixteen: hex, reversed as text

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

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

"our sixteen-fingered friend is walking backwards." sixteen fingers count in base sixteen, and walking backwards is a reversal: the message was written as hex, and the hex text was then reversed character by character. the single and the time trial were one such line each; the mastery was a zip of a hundred and thirty-eight blobs of twenty-eight numbered lines whose last line was a short reversed hex chunk.

the key insight is what gets reversed. reversing the characters of a hex string reverses the byte order and also swaps the two digits inside every byte, so the reading is "reverse the text, then decode hex", in that order. decoding first and reversing the bytes after that gives noise. both steps were already readings in the registry and the prompt's two words named them; what the day cost was the search for a schedule row that did not exist yet, paid once per blob.

challenge shape

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

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

artifact anatomy

the single's blob is one line of hex digits that does not decode to text when read left to right. a made-up example shows why:

"Hi"        -> hex   4869
reversed    -> text  9684     (two bytes that are not text)
reversed back, then hex -> 4869 -> "Hi"

the last two characters of the blob are the low and high digit of the message's first byte, and so on backwards through the message.

in the mastery each blob is NN<tab>chunk lines. line k is encoded by day k's encoding, from base64 on line 1 to ook! on line 27; line 28 is a reversed hex chunk of the message's last few characters, which makes twenty-eight numbered lines a blob. the mastery grew by five blobs a day: 128 on day 26, 133 on day 27, 138 here.

extraction method

the decoding engine has a reversal step (the text, character by character) and a hex step, and a chain written a>b applies its steps left to right. its search tries first the readings the prompt's words name: "sixteen" points at hex and "backward" at reversal, so the chain of the two was among the first readings tried.

HINT_FAMILIES = {
    "reverse": ("revers", "backward", "mirror"),
    "hex": ("hex", "sixteen"),
    ...
}

def reverse(text: str) -> str:
    return text[::-1]

def hexd(text: str) -> str:
    return as_text(binascii.unhexlify(re.sub(r"[\s:,;]|0x", "", text)))

def day_codec(name: str, chunk: str) -> str:    # name = "reverse>hex"
    for step in name.split(">"):
        chunk = transform(step)(chunk)
    return chunk

as_text is the shared bytes-to-text step: utf-8 (or utf-16 / utf-32 by a byte-order mark or zero bytes), refused when the result holds control characters.

for the single and the time trial the whole-text search reached the chain and its output held a slug of the asked shape. for the mastery the line reader decoded lines 1 to 27 by their schedule rows and searched line 28, which was past the schedule, prompt words first.

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 hex step refuses cheaply: after whitespace, :, ,, ; and 0x are stripped, an odd length or one non-hex character raises, and bytes that are not text are refused by the shared text step. each decoded text was one sentence with one slug-shaped token, submitted alone, speedy-button-nugget-52 for the single's blob, funky-meadow-cocoa-92 for the time trial's and bright-squirrel-opal-21, dapper-clock-cider-35, lively-pillow-cider-93 and 135 more for the mastery's 138 blobs.

failed approaches and pivots

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

automation across modes

the same reading answered every mode: 0.23 seconds on the single, 0.28 on the time trial and 1.79 for the mastery's blobs. most of the mastery's time was per blob: the line search for row 28, and a beam search that kept ranking readings after a confident slug was already in hand. on day 28 the schedule gained reversed hex as row 28, and the search now stops at a slug made of dictionary words; the same mastery solves in under a tenth of a second.

lessons

solve times

public scoreboard · day 28 finish: below top 10

  • 0:04.1single#5 of 156 solvers
  • 0:07.5time trial#5 of 154 solvers
  • 0:11.6mastery#3 of 151 solvers
  • #49team day finishof 122 teams that cleared it, in 31:21.7
  • #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 2.9s 1 0
time trial 1.2s 1 0
mastery 2.2s 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.2s 28.8s
mastery 155.0s 2.2s 152.8s

where we got stuck

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

{generated by a clanker}