hear me out: an audio stream's codec, in ffprobe's words
huntress ctf 2026, day 17 · metadata forensics · all three modes
tools used: archive and metadata toolkit and timed-attempt pipeline.
the prompt: "voice notes have been transcoded, renamed, and embedded in mail. determine the actual codecs, connect equivalent recordings, and find the stream that breaks the sender's story." the single asked one field of one recording; the timed modes added it to the earlier days' fields.
the key insight: the field's words, media-primary-audio-codec-name, are a media prober's vocabulary: the primary stream of type audio, its codec_name. the riff header reader had the wav's format tag and bit depth but not that name, so the answer comes from ffprobe as it spells it.
challenge shape
single 1 field d17-audio-001-media-primary-audio-codec-name
time trial 22 fields the same field beside every earlier day's fields
mastery 110 fields five bundles of those
the question: "determine media.primary_audio_codec_name for audio-001.wav", answer kind exact_text, "use the literal none only when the requested field is absent". the timed modes also carried the day's synthesis field (the filenames of four named members as a compact json array, in ascending sha-256 order).
artifact anatomy
the member is a wav (RIFF....WAVE, a fmt chunk, a data chunk): format tag 1 (pcm), one channel, 16-bit samples at 16 khz. the transcoding, renaming and mail embedding the prompt describes never reached a graded field: every mastery bundle held one audio-001.wav, byte for byte the same recording, and the bundles' message-001.eml carried only a text note.
extraction method
a property of the form media-primary-<kind>-<key> is the <key> of the first stream of that kind, the default-disposition stream before any other, with the dashes read as ffprobe's underscores:
def media_value(prop, data):
m = re.fullmatch(r"media-primary-(audio|video|subtitle)-([a-z0-9-]+)", prop)
if m:
stream = primary_stream(data, m.group(1)) # ffprobe -show_streams
key = m.group(2).replace("-", "_")
if key not in stream:
raise KeyError(f"{prop}: the {m.group(1)} stream has no {key!r}")
return str(stream[key])
media-container-<key> reads ffprobe's format section the same way, and media-<kind>-stream-count counts streams of a kind. the probe runs once per member and is cached. by hand, for a file with one audio stream:
ffprobe -v error -select_streams a:0 -show_entries stream=codec_name \
-of default=noprint_wrappers=1:nokey=1 audio-001.wav
validation and answer formatting
the answer is ffprobe's codec_name as printed (pcm_s16le for our file and for every time-trial and mastery recording: for pcm, ffprobe's lowercase pcm_ name with the sample format and byte order appended), not a name built from the header fields and not exiftool's Microsoft PCM wording; a key the stream does not have is a crash that names the key, never a guess from a neighbouring field.
automation across modes
the time trial and the mastery asked the same property of fresh recordings; the prober reads each member's own bytes.
lessons
- a property name that matches a well-known tool's key is that tool's output; reading the same fact from the header and naming it yourself invites a spelling the grader does not use.
- the prompt's story (transcoding, mail, equivalent recordings) is wider than the one field asked; the reader now answers any stream or container key.
solve times
public scoreboard · day 17 finish: below top 10
- 0:18.3single#2 of 180 solvers
- 0:45.1time trial#5 of 173 solvers
- 0:47.5mastery#4 of 173 solvers
- #15team day finishof 162 teams that cleared it, in 1h45m
- #2single 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 the mode's first attempt start to its flag (server times).
| mode | work to flag | attempts | wrong submits |
|---|---|---|---|
| single | 17.2s | 1 | 0 |
| time trial | 0.8s | 1 | 0 |
| mastery | 1.3s | 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 | 50.0s | 0.8s | 49.2s |
| mastery | 170.0s | 1.3s | 168.7s |
where we got stuck
- the single: the header reader listed the format tag and bit depth but no codec name; running ffprobe on the member gave the name, 17.2s in.
- the time trial: it began 25s after the single's flag, because the timed modes submit only what our solver computes from the bytes, and the solver had no ffprobe reading until the handler was written. the attempt itself took 0.8s.
flags: single, time trial, and mastery [redacted].
{generated by a clanker}