escape room: a json string line, and a quote inside the slug
huntress ctf 2026, day 9 · warmups · all three modes
tools used: decoding search engine and timed-attempt pipeline.
the prompt was one line: "these characters would very much like to escape." the new encoding was a json string literal: every character of the message written as a \uXXXX escape, the whole run wrapped in double quotes, the form a json parser turns back into text.
the key insight: the escape reader already turned \u escapes into characters, so the single and the time trial, where the json string was the whole blob, fell to the day-8 solver. but the reader kept the two quote characters. around a whole message that was harmless; on the mastery the json string was the last of nine lines, the slug ran across the boundary into it, and the opening quote landed inside the slug.
challenge shape
one answer field per blob: the slug that the final non-empty decoded line tells you to submit, in the shape the question states (three lowercase words, a hyphen, a two-digit number). the single and the time trial delivered one blob each; the mastery delivered a zip of 43 blob-NN.txt files under one clock, one per answer set.
artifact anatomy
the single and time-trial blobs were one unterminated line: a double-quoted string with every character, spaces and punctuation included, as a six-byte \u00XX escape ("Nice ... for Nice ).
the mastery blobs use the numbered-line layout from day 2, now with nine lines, and line k carries day k's encoding: base64, rot13, hex, binary groups, decimal, octal, percent escapes, html references, and then the new one:
08 &#NN;&#NN;&#NN;... # illustrative: day 8, decimal html references
09 "\u00NN\u00NN\u00NN..." # illustrative: day 9, a json string of \u escapes
the message is split evenly across the lines and ends with the slug. line 09 decodes to 12 or 13 characters, less than a slug, so in all 43 blobs the slug started on line 08 and ended inside line 09's quotes.
extraction method
the solver is the day-8 one: every printable reading of every line, a beam that joins them left to right and scores the whole message by letter pairs, and a slug read from the last line. the escape reader replaces \x, \u and octal escapes with their characters and leaves everything else alone, so a json string came back with its quotes. for the single that did no harm: the slug pattern only requires that no letter, digit or hyphen touches either end of the slug, and a closing quote after the two digits passes:
SLUG = re.compile(r"(?<![A-Za-z0-9-])[a-z]+-[a-z]+-[a-z]+-\d{2}(?![A-Za-z0-9-])")
on the mastery's first blob, line 08 read …fancy-st and line 09 read "orm-tiger-34": the opening quote sat inside the slug, in 42 of the 43 blobs between two letters of one word. no hypothesis in the beam contained a slug, so the line decoder raised.
the solver then fell back to treating the blob as one value: the breadth-first peel tries whole-blob transforms until a slug appears. nine lines in nine encodings have no whole-blob reading, so the peel spent its 20,000-node budget, about 5.8 seconds a blob, and raised no decoding path found in 20000 readings. replayed on the bundle, the day-8 engine fails all 43 blobs this way.
validation and answer formatting
the slug is accepted only from the final non-empty line of a decoding that reads as english, in the shape the question's syntax text gives. the answer is the slug as written. the json-string reading added on day 9 checks its input (a double quote at both ends, a backslash inside, a string out of json.loads) and refuses anything else, such as a quoted number.
failed approaches and pivots
the error pointed at the wrong layer: it came from the peel, a fallback that cannot work on a numbered blob, and the line decoder's own failure was discarded on the way. the single and the time trial could not reproduce it, since their quotes surrounded the whole message. the cause showed only when the bundle's lines were printed one by one: eight decoded to fragments of english, line 09 to a fragment in quotes.
the fix was a reading that understands the format, not only its escapes:
def json_string(text: str) -> str:
t = text.strip()
if len(t) < 2 or t[0] != '"' or t[-1] != '"' or "\\" not in t:
raise ValueError("not a json string literal")
out = json.loads(t)
if not isinstance(out, str):
raise ValueError("not a json string literal")
return out
it runs first in the line order, so the slug joins up across the boundary.
two more changes on day 9 make the same kind of failure cheaper:
- every reading of a line also counts with wrapper characters (quotes, backticks, brackets) stripped from both ends, ranked after the readings themselves. it needs no knowledge of the format: with the json-string and literal readings switched off, this alone answers all 43 blobs of the failed bundle, with the same slugs.
- a numbered blob that fails now raises its own error with each line's best reading instead of falling through to the peel: two to three seconds instead of nearly six, with line 09's quotes visible in the report.
automation across modes
the same solver read all three modes: the single and the time trial through the whole-value path, the mastery through the line beam, blob by blob.
the engine's other day-9 additions (the rest of the literal family, caesar and keyed recovery, low-confidence answers with per-line readings) came from stress tests, not from this bundle; the decoding engine article describes them.
lessons
- a reader for a quoted format has to remove the quotes. decoding the escapes inside a literal is not the same as decoding the literal.
- a fallback should not replace the error it falls back from: a generic error from a different model of the input hides the part that broke.
- test a new line encoding with a word crossing into it. a whole-blob test of the same encoding cannot show what its delimiters do at a line boundary.
solve times
public scoreboard · day 9 finish: top 10
- 0:04.9single#3 of 229 solvers
- 0:06.4time trial#2 of 209 solvers
- 4:18.7mastery#23 of 206 solvers
- #7team day finishof 173 teams that cleared it, in 4:18.7
- #1single 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 when we started working on the mode to its flag.
| mode | work to flag | attempts | wrong submits |
|---|---|---|---|
| single | 1.4s | 1 | 0 |
| time trial | 1.5s | 1 | 0 |
| mastery | 4m12s | 2 | 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 | 7.0s | 0.4s | 6.6s |
| mastery | 9.0s | 0.5s | 8.5s |
where we got stuck
- mastery: the first attempt failed on every blob with an error that named no line, and the single and the time trial decoded cleanly, so neither could reproduce it. the cause took printing the bundle's lines by hand; once they were on screen, the quotes on line 09 were plain. the fix was the short json-string reading above, and the second attempt solved the bundle in 62 ms. the diagnosis, not the fix, took most of the four minutes.
flags: single, time trial, and mastery [redacted].
{generated by a clanker}