selective memory: objective-c on linux, and a configuration section
huntress ctf 2026, day 14 · binary reverse engineering · all three modes
tools used: binary analysis toolkit and timed-attempt pipeline.
the prompt: "objective-c never forgets: every class, every selector, every string is registered and waiting. read the persistence descriptor and learn what this binary remembers." the delivery was the cumulative bundle, one build per day so far, with a new member for day 14: an x86-64 elf compiled from objective-c against the gnustep runtime.
the key insight: an objective-c program built for linux is still an elf. its runtime registers classes and selectors by name, which made the build easy to fingerprint, but the questions asked the same fields as every earlier tag: the header's format, architecture and machine, and the configuration in the HCFG blob, which this build kept in a section of its own.
challenge shape
single 140 fields one bundle: a build per day, day 1 to day 14
time trial 140 fields the same bundle, other configuration values
mastery 420 fields three bundles
the day 14 tag answers ten fields: artifact_sha256_1, analysis_format, analysis_architecture, analysis_machine, the configuration fields config_campaign, config_domain, config_mutex, config_url and config_crc32_hex, and analysis_has_hcfg_section.
artifact anatomy
the build is a dynamically linked, unstripped elf. its needed libraries name the runtime outright:
NEEDED libgnustep-base.so.1.27
NEEDED libobjc.so.4.6
NEEDED libc.so.6, libm.so.6, libpthread.so.0
the gnustep runtime registers classes through generated symbols (._OBJC_CLASS_TriggerDescriptor, ._OBJC_METACLASS_..., ._OBJC_REF_CLASS_NSObject), dispatches through objc_msg_lookup_super and objc_msgSend, and keeps selector names (initWithTrigger:, triggerName and eventCountForModel: for our class) as plain strings. the section table has a dedicated .hcfg section between .rodata and .eh_frame, which starts with the raw magic:
[15] .hcfg PROGBITS flags A (allocated, read-only)
48 43 46 47 01 ... HCFG, version 1, then the key
extraction method
the format comes from the magic (\x7fELF gives elf), architecture and machine from e_machine, read in the byte order ei_data declares; both answered x86-64, which their pattern accepts beside a tool label or the machine code. the configuration reader searches every member for every carrier it knows, raw magic first; here the raw HCFG structure sat at the start of its section. its twelve-byte header holds a version, a single-byte xor key, the ciphertext length and the crc32 of the plaintext; the decoded plaintext is a json object whose keys are the configuration fields, and config_crc32_hex is that crc32. has_hcfg_section is a section-table question (an enum of true and false): is there a section whose name, leading dot dropped, is the field's token. our producer matches .hcfg, hcfg or a mach-o __hcfg in any case, whole names only. for this elf64 by hand:
import struct
def section_names(b: bytes) -> list[str]:
shoff = struct.unpack_from("<Q", b, 40)[0] # e_shoff
shentsize, shnum, shstrndx = struct.unpack_from("<HHH", b, 58)
def header(i: int) -> tuple[int, ...]: # name .. size
return struct.unpack_from("<IIQQQQ", b, shoff + i * shentsize)
strtab = header(shstrndx)[4] # its sh_offset
names = []
for i in range(shnum):
start = strtab + header(i)[0]
names.append(b[start : b.index(b"\0", start)].decode())
return names
has_hcfg_section = "true" if ".hcfg" in section_names(b) else "false"
the config decode is the day-2 one at b.find(b"HCFG"), the section's first byte; the crc32 goes out as lowercase 0x hex.
validation and answer formatting
the blob's length must fit the bytes after it, the crc32 of the decoded plaintext must equal the stored one, and the plaintext must parse as a json object; a stray HCFG byte run elsewhere fails those checks and is skipped.
failed approaches and pivots
none on the day. the build answered through the elf readers, and the objective-c runtime fingerprint was not needed for any field.
automation across modes
each mode serves the whole bundle with new configuration values, and the mastery serves three bundles. the per-tag readers answered all 140 fields of each bundle on the first attempt.
lessons
- a language's runtime is a fingerprint, not a format: an objective-c build for linux is an elf, and the elf readers answer its header fields.
- a dedicated section is the easiest carrier to find; read it by name and still validate its contents.
- a checksum stored next to an encoded blob is the validator that makes a whole-file search safe.
solve times
public scoreboard · day 14 finish: below top 10
- 0:05.4single#2 of 183 solvers
- 0:09.2time trialfirst blood, +0.52 s
- 0:13.7mastery#2 of 177 solvers
- #18team day finishof 165 teams that cleared it, in 4:36.7
- #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 | 3.0s | 1 | 0 |
| time trial | 2.4s | 1 | 0 |
| mastery | 3.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 | 2.4s | 27.6s |
| mastery | 30.0s | 3.5s | 26.5s |
both timed attempts were unranked (the organizer's ranked pool was empty that day): the flags count, with no hall-of-fame time.
where we got stuck
- nowhere: every field name was one the readers already answered, and the first attempt of each mode was correct.
flags: single, time trial, and mastery [redacted].
{generated by a clanker}