Day 30 - Campaign Trail (binary-reverse-engineering)
All three modes CORRECT.
- single_solve flag: Token1b280bfe17571044b2a167d4357aa10e
- time_trial flag: Token627a0e29763c885c37c564ad37ff6cb3
- mastery flag: Tokenbbdb3a10de9716eb6c542c634a8221b2
What the day added
Day 30 is a cumulative recap (d01..d30, 14 fields/day = 420 TT ids, x14 sets = 5880 MM ids). The only genuinely new layer is d30 itself: a NEKO-bytecode campaign of three role-named members per set:
- d30--sample-loader.n
- d30--sample-library.n
- d30--sample-config.n
Each file is a Neko bytecode module (magic NEKO) carrying an appended HGRF trailer that uses the same 12-byte layout as HCFG, differing only in the magic bytes:
+0 magic 'HGRF' (4)
+4 version (1)
+5 xor key (1)
+6 length le16 (2)
+8 crc32 le32 (4)
+12 xor-encoded utf-8 json payload (length bytes)
The JSON is a huntress.binary.campaign_graph.v1 capsule with graph.nodes, graph.edges, graph.load_order, graph.config.{campaign,domain,ipv4,url,mutex, windows_path,linux_path,service,host_model} and a per-member this_role tag (loader / library / config). All three role copies carry an identical graph.config when this_role is removed, as the question text asserts.
The 7 unresolved fields on first run
The lane spine already answered 413/420 of the Single's ids by catalog (d01..d29 shapes + d30 structural / artifact_sha256_N / Neko-based elf-less inventory). The 7 residues were the new d30 class:
- d30_analysis_loader_format ->
neko_bytecode - d30_analysis_library_format ->
neko_bytecode - d30_analysis_config_capsule_format ->
neko_bytecode - d30_analysis_config_campaign ->
BR30-000(from loader.n HGRF) - d30_analysis_config_domain -> ...example.invalid (from loader.n HGRF)
- d30_analysis_config_mutex ->
Global\HuntressBR30-000(from loader.n HGRF) - d30_analysis_config_url ->
https://...(from loader.n HGRF)
...and in MM each set also asks the capsule_graph_config_* variants that select the config role member instead of the loader. All variants decode to the same shared config object; what differs is only which role-named member supplies the HGRF record.
Patch (in binary_wip.py answer(), before the member-picker)
Added an explicit d30 fast path that:
- Picks the role-named member by basename (
endswith(role + '.n')). - Classifies it as
neko_bytecodewhen its first 4 bytes areNEKO. - For a
analysis_config_capsule_graph_config_<name>suffix, reads the HGRF record from the config member and returnsgraph.config.<name>. - For a plain
analysis_config_<name>suffix (non-capsule), reads the HGRF record from the loader member and returnsgraph.config.<name>.
The HGRF scan starts from rfind(b'HGRF') (the question says "scan backward from the end"), bounds-checks the length, CRC32-validates the XOR-decoded payload before accepting it, and never guesses.
With that one extractor added, SS went 420 sure / 0 probe / 0 unknown; the runner then opened the TT and MM windows and both passed CORRECT first try.
Lessons + D+1
- Specific extractor/opcode missing: HGRF capsule records on NEKO bytecode. The 12-byte layout is identical to HCFG except the magic. Keep this in the shared kit so a future day that reuses the exact capsule can be answered by the spine without a clone edit.
- Stall time: ~5 minutes. The 413 pre-answered fields proved the lane spine was already correct for d01..d29 end to end; the only build was the d30 role picker + HGRF decode.
- Keep in clone vs port to shared: port. The role-named-member picker (
loader.n/library.n/config.n) and the HGRF decoder are both generic shapes - a future day that bundles role-named members or ships a capsule with a 1-byte-magic twin of HCFG will reuse exactly this logic. The clone copy is fine for today; shared autosolve_binary should pick up a small_hgrf_scansibling of_hcfg_scanand wire the three format-suffixes + the two config-suffix families.
Reproducibility
- Artifact:
single_0.bin(challenge artifact, not published) (evidence.zip, zip-crypto passwordinfected). - Members (per set):
d30--sample-{loader,library,config}.n, each ~20.9 KB. - HGRF trailer offsets observed on single_0.bin: loader off=20173 ver=1 key=0xF1 crc=0xC41517FB, library off=20182 ver=1 key=0xF1 crc=0x8E1F39C8, config off=20209 ver=1 key=0xF1 crc=0x76C956E7.
- All three decode to the same
graph.configmodulo thethis_rolefield.