the shortcut home: where a windows shortcut points
huntress ctf 2026, day 14 · metadata forensics · all three modes
tools used: archive and metadata toolkit and timed-attempt pipeline.
the prompt: "a shortcut collection is a map of intent—if you read where each link points instead of where it sits. reconstruct the targets and identify the impossible destination." the delivery was a zip of windows shortcut files (.lnk); each question asked one shortcut's target path.
the key insight: a shell link stores its target more than once, and the one the question means is the path windows itself would open: the local base path from the link-info block when the link has one, else the path built from the shell item id list. our shortcut reader already returned that path; what was missing on the day was the step from the question's property name to the reader's field.
challenge shape
single 1 field one zip, shortcut-NNN.lnk
time trial 1 field one zip, another shortcut
mastery 2 fields two zips, one shortcut each
the field id names the member and the property: d14-lnk-001-lnk-target-path-windows, "determine lnk.target_path_windows for shortcut-001.lnk.", answer kind exact_text with the lane's usual syntax: "exact artifact-derived value only, without quotes or explanatory text unless quotes are part of the value; use the literal none only when the requested field is absent".
artifact anatomy
a shell link (ms-shllink) is a fixed 76-byte header followed by optional structures, each present only when its bit in the header's LinkFlags is set:
header 76 bytes: size 0x4c, clsid 00021401-..., LinkFlags,
FileAttributes, creation / access / write times, FileSize,
IconIndex, ShowCommand, HotKey
LinkTargetIDList shell item ids, when HasLinkTargetIDList
LinkInfo volume id + LocalBasePath (+ CommonPathSuffix), or a
network share, when HasLinkInfo
StringData name, relative path, working dir, arguments, icon
location, each when its flag is set (utf-16 when IsUnicode)
ExtraData blocks: environment variables, tracker (machine id and
droid ids), special and known folder, ...
the day's shortcuts set HasLinkTargetIDList, HasLinkInfo, HasName, HasWorkingDir and IsUnicode, and point at a local volume (DRIVE_FIXED). the header's times and file size describe the target, not the link.
extraction method
the reader walks the structures in flag order and returns one flat record:
flags, attrs = struct.unpack_from("<II", data, 0x14)
pos = 0x4C
if flags & HAS_IDLIST:
n = struct.unpack_from("<H", data, pos)[0]
idlist = idlist_path(data, pos + 2, pos + 2 + n)
pos += 2 + n
if flags & HAS_INFO:
... # volume id, LocalBasePath, NetName
... # string data, extra data blocks
if base: # LinkInfo LocalBasePath
target = base + suffix if suffix and not base.endswith(suffix) else base
elif net: # a network share
target = net.rstrip("\\") + ("\\" + suffix if suffix else "")
else:
target = idlist or extra.get("environment_target", "")
exiftool -s -LocalBasePath shortcut-NNN.lnk reads the same link-info string with a public tool.
the property name is matched to a record field by its words. both sides are spelled one way (modification means write, id means guid, network means net), the words that only say how a value is written (path, windows, hex, utc) are set aside, and the field whose words the property covers most wins. lnk-target-path-windows leaves target, and the record's target field is the path above.
validation and answer formatting
the path is answered as stored: drive letter, backslashes and case kept. two checks guard the mapping. a property word left over that another field owns refuses the match, so target size can never read the path. and a match that leaves more words unread than it read is refused as well: the description string is the record's name, and an unrelated question about a share name would otherwise have read it. a refusal raises; it never guesses.
failed approaches and pivots
the reader existed when the day began; the property did not map to it. the first automated run crashed on the unknown property, the single was answered by reading the record directly, and the mapping by words was added for every record reader the same day.
automation across modes
every mode asks the same property of a different shortcut, and the mastery asks two at once, one per zip. once the property maps by its words, any other field of the same record maps the same way: arguments, working directory, icon, the target's times and size, drive serial and label, tracker machine id, droid ids, known folder.
lessons
- a link's target lives in the link-info block first, the id list second; report the path the shell would open.
- map a new property to an existing reader by its words, and refuse when the words do not add up rather than guess.
- the header of a shortcut describes its target: times, size and attributes are the target's.
solve times
public scoreboard · day 14 finish: below top 10
- 0:18.4single#5 of 197 solvers
- 0:57.1time trial#8 of 188 solvers
- 0:58.4mastery#7 of 184 solvers
- #18team day finishof 165 teams that cleared it, in 4:36.7
- #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 | 16.4s | 1 | 0 |
| time trial | 0.4s | 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 | 30.0s | 0.4s | 29.6s |
| mastery | 30.0s | 0.5s | 29.5s |
where we got stuck
- the single: the automated run crashed on the unmapped property; reading the shortcut record directly answered it 16 seconds after the start.
- the timed modes started 38 seconds after the single's flag: the property mapping reached the solver 21 seconds after the flag and the first timed start came 17 seconds after that. each timed mode then took under a second.
flags: single, time trial, and mastery [redacted].
{generated by a clanker}