product placement: a product code in a windows installer's property table

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

tools used: archive and metadata toolkit, cross-lane field resolution and timed-attempt pipeline.

the prompt: "installers were copied, renamed, and repackaged. recover stable product identities, distinguish revisions from different products, and find the collision." each delivery was a zip with one windows installer database (installer-00N.msi), and one question per set: the product code, the guid that identifies a product across every revision of its installer.

the key insight: an msi is not a file format with headers to read. it is a small relational database stored inside an ole2 compound file, and the product code is one row of its Property table. the table's cells are not text: they are indexes into a shared string pool, the stream names themselves are compressed, and the value comes back exactly as the authoring tool wrote it, braces and uppercase included. that stored text, unchanged, was the answer.

challenge shape

single       1 field    one zip, one installer database
time trial   1 field    one zip, one installer database
mastery      2 fields   one outer zip holding a zip per set, one msi in each

the field id is d13-msi-00N-msi-product-code-guid, the question asks for msi.product_code_guid, and the format is a pattern: "canonical guid text in 8-4-4-4-12 hexadecimal form, including hyphens", the same wording as day 12's module version id.

every database's summary stream names msitools as its creating application, and every installer in the day, the single, the time trial and both mastery sets, carried the same product code under a different file name and a different package code. that is the prompt's collision: four "products" that are one product.

artifact anatomy

an ole2 compound file is a small file system: a header, a sector allocation table, a directory of named streams. an msi keeps each database table in its own stream, plus two streams that hold every string the tables use:

_StringPool   per string: u16 length, u16 reference count (after a u32 header)
_StringData   the strings' bytes, concatenated, no separators
Property      two string columns, Property and Value, stored column-major
!_Tables ...  the catalog and the other tables, the same way
\x05SummaryInformation   an ordinary ole property set (title, author, package code)

the stream names are not stored as plain text. windows installer packs table names into private-use code points so they fit the compound file's 31-character limit: every two characters of the name become one code point from 0x3800, a trailing single character one from 0x4800, and the whole name sits behind the marker 0x4840. a directory listing shows only those code points, which is why a generic ole viewer prints garbage names for an msi.

the string pool's header holds the codepage and one flag: when its top bit is set, every string reference in every table is three bytes wide instead of two. a pool entry with length 0 and a nonzero reference count announces a long string whose real length follows as a u32.

extraction method

the reader encodes the table name it wants, opens that stream, rebuilds the string list from the pool and data streams, and reads the Property table's two columns:

def stream_name(name: str) -> str:
    out = "䡀"
    i = 0
    while i < len(name):
        c1 = ALPHABET.index(name[i])
        if i + 1 < len(name):
            out += chr(0x3800 + c1 + (ALPHABET.index(name[i + 1]) << 6))
            i += 2
        else:
            out += chr(0x4800 + c1)
            i += 1
    return out


def properties(data: bytes) -> dict[str, str]:
    ole = olefile.OleFileIO(io.BytesIO(data))
    strings, width = _strings(ole)
    table = ole.openstream(stream_name("Property")).read()
    rows = len(table) // (2 * width)

    def cell(k: int) -> str:
        return strings[int.from_bytes(table[k * width : (k + 1) * width], "little")]

    return {cell(r): cell(rows + r) for r in range(rows)}

the columns are stored one after the other, not row by row, so row r is the pair (cell(r), cell(rows + r)). string index 0 is the empty string.

with msitools installed, msiinfo export installer-NNN.msi Property prints the same table as tab-separated rows, and the ProductCode row carries the value in its stored form.

the field name maps to a row by its words: msi-product-code-guid drops the shape word guid, squashes product-code to productcode, and matches the row name ProductCode the same way. any other msi-<property words> field, the upgrade code, the product version, ALLUSERS, reads the same table; a name the table lacks falls through to the summary information stream, where the package code lives as the "revision number".

validation and answer formatting

a pattern search over the bytes finds three other guids besides the product code: the upgrade code (a second Property row, stable across products of one family), a component id (from the Component table, in the same string pool), and the package code (in the summary stream, new for every build). the row name is the only thing that tells the product code apart; a reading by position or by "the first guid" picks the wrong one on some deliveries.

the grader accepted the product code only as stored: braces kept and the hexadecimal digits uppercase, exactly as the property row holds it. the syntax line describes the shape of a guid; it does not ask anyone to reshape a stored one. day 12's module version id was different because it had no stored text at all: sixteen raw bytes that the format turns into text, lowercase and without braces.

failed approaches and pivots

the property name reached no reader, no raw header field and no exiftool tag, and the solver refused to guess. the value then came from the bytes by hand: a string search in the pool found the guid right after the word ProductCode, and a decode of the property table confirmed it. what followed was the costly part: the value was submitted reshaped to fit the syntax line, lowercase and then uppercase without braces, before the stored form went in.

automation across modes

once the property table reader returned the stored text, the same reading answered the time trial and both mastery sets in under a second each; each mastery set's msi is a separate member of its own zip.

lessons

solve times

public scoreboard · day 13 finish: top 10

  • 1:26.8single#6 of 196 solvers
  • 1:54.0time trial#5 of 184 solvers
  • 1:55.2mastery#5 of 183 solvers
  • #4team day finishof 165 teams that cleared it, in 1:55.2
  • #5single 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 84.9s 1 5
time trial 0.6s 1 0
mastery 0.5s 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.6s 49.4s
mastery 80.0s 0.5s 79.5s

where we got stuck

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

{generated by a clanker}