monkey business: a message in ook!, the twenty-seventh line

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

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

"ook. ook? ook! someone seems chatty." the chatty one is ook!, the brainfuck dialect that spells each of the eight commands as a pair of Ook., Ook? and Ook!. the single and the time trial were one ook! program each; the mastery was a zip of 133 blobs of twenty-seven numbered lines whose twenty-seventh line was a short ook! program.

the key insight is the one from day 26 with a different alphabet: a loop-free program over one cell is a delta code, and an interpreter that already reads brainfuck reads ook! by mapping the pairs first. the ook! reading has been in the registry since day 14, so the search found it without a change; what it cost was the search itself, because the daily schedule did not yet name the twenty-seventh row.

challenge shape

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

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

artifact anatomy

the single's blob is one line of Ook., Ook? and Ook! tokens separated by spaces. two tokens make one command: Ook. Ook. is +, Ook! Ook! is -, Ook! Ook. is ., and the five other pairs are the pointer moves, the loop brackets and input. these programs use the three commands of a delta code: the first run of + raises the cell to the first character, every later run is the difference to the next character, and each . prints.

in the mastery each blob is NN<tab>chunk lines, line k encoded by day k's encoding from base64 on line 1 through day 26's brainfuck on line 26; line 27 is the ook! program for the message's last few characters.

extraction method

the decoding engine reads ook! by translating the pairs to brainfuck and running the same bounded interpreter:

OOK = {("Ook.", "Ook?"): ">", ("Ook?", "Ook."): "<", ("Ook.", "Ook."): "+",
       ("Ook!", "Ook!"): "-", ("Ook!", "Ook."): ".", ("Ook.", "Ook!"): ",",
       ("Ook!", "Ook?"): "[", ("Ook?", "Ook!"): "]"}

def ook(text: str) -> str:
    words = re.findall(r"Ook[.?!]", text)
    if len(words) < 8 or len(words) % 2:
        raise ValueError("not ook")
    return brainfuck(
        "".join(OOK[(words[i], words[i + 1])] for i in range(0, len(words), 2))
    )

the refusal is cheap: the reading collects the Ook., Ook? and Ook! words wherever they sit, needs at least eight of them and an even count, and the interpreter then refuses a program with unbalanced loops or one that runs past its step cap. the output must still decode as utf-8 text and end in a slug, so a stray Ook. in other text does not produce an answer. for the single and the time trial the whole-text search reached it and its output held a slug of the asked shape. for the mastery the line reader decodes lines 1-26 by their schedule rows and searched line 27, which was past the schedule.

validation and answer formatting

the question asks for the slug that the final non-empty decoded line instructs, three lowercase words, a hyphen and two digits. each decoded text was one sentence with one slug-shaped token, submitted alone, hearty-castle-fern-71 for the single's blob, zesty-sprout-harbor-78 for the time trial's and jolly-cloud-nugget-32, bright-scooter-harbor-98, jolly-tent-beaver-48 and 130 more for the mastery's 133 blobs.

failed approaches and pivots

none on day 27.

automation across modes

the same reading answered every mode. the search past the schedule cost 0.40 seconds on the single and 1.63 seconds on the mastery's blobs; on day 27 the schedule gained ook! as row 27, so line 27 is now read by its row before any search runs.

lessons

solve times

public scoreboard · day 27 finish: below top 10

  • 0:03.3single#2 of 159 solvers
  • 0:05.8time trialfirst blood, +0.51 s
  • 0:09.5mastery#2 of 151 solvers
  • #38team day finishof 127 teams that cleared it, in 34:43.1
  • #1single orderof the day's 8, 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.6s 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 150.0s 2.2s 147.8s

where we got stuck

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

{generated by a clanker}