a word to the wise: where an office document reaches

huntress ctf 2026, day 15 · metadata forensics · all three modes

tools used: archive and metadata toolkit and timed-attempt pipeline.

the prompt: "office documents contain relationships that point beyond the page. separate internal references from external dependencies and find the document reaching somewhere it should not." the single delivered a zip with one word document and asked one question, its external relationship targets. the timed modes delivered the whole cumulative bundle and asked every property of days 1 to 15 at once, plus one new cross-member question.

the key insight: an ooxml package lists everything it points at in its relationship parts, and TargetMode="External" marks what lives outside the package. the answer is that list, serialized in one exact order.

challenge shape

single        1 field     one zip, document-15-NNN.docx
time trial    20 fields   one zip, the cumulative bundle
mastery       100 fields  five zips, the same twenty fields per set

the field id names the member and the property: d15-ooxml-001-ooxml-external-relationship-targets, "determine ooxml.external_relationship_targets for document-15-001.docx.", answer kind json with the syntax "compact valid json array with exact values and order; no markdown or explanatory text".

the timed bundle held a member of every family seen so far: an evidence note, a roster, a jpeg, a png, a pdf, a nested zip, a windows exe, a .net dll, an msi, a shortcut and the docx. its twenty fields were the day 1 hashes, size and filename, the day 2 magic prefix, the day 3 bom flag, the jpeg and png dimensions, the pdf version, the zip's eocd count and central-directory names, the pe machine, entry point and original filename, the .net mvid, the msi product code, the shortcut target, this day's ooxml field, and one new field, metadata-day-15-synthesis-sha256-order:

compute the full-file sha-256 digest of each named file, then submit a compact json array of their filenames in ascending digest order. files: [a list of member names]

that field is graded case-insensitively. the per-member timed questions also gained an "inspect <member>." prefix, and the mastery rotated the member stems per set (roster, evidence-note-copy in place of evidence-note), so each set's fields were mapped to members from that set's own ids, as on day 1.

artifact anatomy

[Content_Types].xml
_rels/.rels                       package relationships (core, app, document)
word/document.xml
word/_rels/document.xml.rels      the document's relationships
docProps/core.xml, app.xml

each Relationship has an Id, a Type uri, a Target and, for anything outside the package, TargetMode="External". hyperlinks, remote templates (attachedTemplate in word/_rels/settings.xml.rels), linked images and ole links all appear this way.

extraction method

every .rels part is parsed as xml, not matched with a regex: attribute order is free and &amp; must come back as &.

for part in z.namelist():
    if part.lower().endswith(".rels"):
        for el in ElementTree.fromstring(z.read(part)).iter():
            if el.tag.split("}")[-1] == "Relationship":
                rels.append((part, el.get("Id"), el.get("Type"),
                             el.get("Target"),
                             (el.get("TargetMode") or "").lower() == "external"))

the document record now carries the relationship targets, external and internal, their types and counts, hyperlink targets and the attached template, so a property named by those words reads from it.

the synthesis field is read from its own question text: the file list after Files:, the digest the question names, and the direction word. each listed name resolves to its member in the same set, and the names are sorted by the digest of the full member bytes:

listed = json.loads(re.search(r"Files:\s*(\[[^\]]*\])", question).group(1))
digest = {name: hashlib.sha256(member(name)).hexdigest() for name in listed}
answer = json.dumps(sorted(listed, key=digest.get), separators=(",", ":"))

this reader was written on day 14 from day 13 practice variants that already carried a synthesis question, so it answered the day's timed modes without a change.

validation and answer formatting

the graded form is a compact json array (no spaces) of the external targets in ascending order; file order was rejected. the record still offers file order as the next candidate, and duplicates are removed first.

the synthesis array holds the file names exactly as the question lists them, smallest sha-256 first. the digests are fixed-width lowercase hex, so a plain string sort orders them the same way a numeric one would.

failed approaches and pivots

the office reader already listed external targets on the day, but the property map did not reach it: the automated run crashed, the single was answered from the relationship parts by hand, and file order went out first.

automation across modes

every mode asks the same property of other documents; the record answers each from its own parts, and any of the prompt's other words (internal references, external dependencies, the remote template) maps the same way. the eighteen inherited fields of the timed bundle and the synthesis field went through readers written on earlier days, so the time trial and the mastery waited only on the ooxml rule.

lessons

solve times

public scoreboard · day 15 finish: top 10

  • 0:23.2single#2 of 187 solvers
  • 1:15.2time trial#2 of 178 solvers
  • 1:17.9masteryfirst blood, +28.7 s
  • #4team day finishof 163 teams that cleared it, in 2:31.2
  • #4single 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 21.9s 1 1
time trial 0.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 50.0s 0.7s 49.3s
mastery 170.0s 1.0s 169.0s

where we got stuck

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

{generated by a clanker}