Day 21 - Shared Custody (binary-reverse-engineering)
- Challenge id:
binary-reverse-engineering-day-21-shared-library-boundaries - Lane: binary-reverse-engineering (agent-2, homestation)
- Result: ALL THREE MODES CORRECT
- Single Solve (untimed): c02fa20ea735b069680c65448abaf5ee - 252/252 fields, 4.7 s
- Time Trial (RANKED, Hall-of-Fame eligible): a2cad928077967288a88e1b177743235 - 252/252 fields, 4.8 s in an 81 s window
- Mastery (RANKED, Hall-of-Fame eligible): f78e3fe8db0e1052f437333a86dbffdc - 1260/1260 fields (5 sets), 16.1 s in a 326 s window
The GM's own framing
No binary is an island - this one leans on shared libraries for everything. Trace the exports, the imports, and the loader's handshake, and mind the boundaries.
The day's new deliverable d21 is a cooperating pair inside the cumulative evidence.zip (challenge artifact, not published):
| member (basename tail) | kind | role |
|---|---|---|
...-loader.elf (challenge artifact, not published) | ELF64, e_machine 62 (x86-64) | the executable that dlopen()s the plugin; no HCFG config record |
...-plugin.cmxs | ELF64 shared object, e_machine 62 | the shared library; carries the one CRC32-valid HCFG config record |
.cmxs is an OCaml-style dynamically loadable plugin extension, but the bytes are an ordinary ELF shared object - classified by bytes, not by extension, exactly as the lane's standing rule requires.
What actually held, and why
The banked autosolve_binary adapter answered 248 of the 252 Single Solve ids on first contact. The four that held were the untagged HCFG config ids:
d21_analysis_config_campaign
d21_analysis_config_domain
d21_analysis_config_mutex
d21_analysis_config_url
Root cause: on a multi-binary dNN the adapter selects the member from a tag inside the answer id (_variant_tags, built on Day 15's symbolized/stripped pair). That works for the ids that name their member - d21_analysis_plugin_machine, d21_analysis_plugin_config_url - but Day 21 asks the same config questions a second time with no tag at all, naming the member in the question prose only:
Use the d21-- plugin.cmxs member; the loader has no scored HCFG config. Scan the specified member for literal HCFG magic ...
With no tag, deliverable() returned the first d21-- binary (the loader), the loader genuinely has no HCFG record, and config() correctly refused to invent one -> Hold. The hold was the adapter being honest, not wrong.
Note the two distinct selector phrasings the GM uses on the same day:
"Use the unique d21-- member whose basename ends plugin.cmxs."(tagged ids)"Use the d21-- plugin.cmxs member; the loader has no scored HCFG config."(untagged ids)
The fix (challenges/_lib/autosolve_binary.py)
Two new evidence-driven member selectors, applied in answer() only when the id carried no member tag and the dNN really has two or more binary members (artifact_sha256_N is never re-pointed - it is numbered from member order):
_member_from_question(question, ms)- honour the question text's own selector. Both phrasings above are matched (basename ends <tok>and-- <tok> member); a token is accepted only when it looks like a basename tail (contains a dot) and exactly one member's basename ends with it. One match or nothing - never a first match._hcfg_member(ms)- fallback foranalysis_config_*/analysis_xor_key_hex/analysis_hcfg_version/analysis_hcfg_offset: tryconfig()on every member and use the unique member whose bytes actually carry a readable record. Zero or several carriers -> keep the ordinary deliverable, i.e. still hold. This reads the "the loader has no scored HCFG config" claim out of the bytes instead of trusting the prose.
After the patch: binary: 252 sure, 0 probe, 0 unknown (3.7s) and the GM graded the Single CORRECT.
HCFG record format (unchanged, restated by the GM)
+0 "HCFG" ASCII magic
+4 u8 version
+5 u8 XOR key
+6 u16le payload length
+8 u32le CRC32 of the DECODED payload
+12 payload XOR every byte with the key -> UTF-8 JSON
Bounds-check, XOR, verify CRC32, parse JSON, read the top-level property. The adapter's config() scans every member plus the container bytes and holds if two distinct CRC-valid carriers exist, so "the unique CRC32-valid HCFG record" is proven rather than assumed.
Day 21 answers (GM-accepted, Single Solve)
| id | value |
|---|---|
d21_artifact_sha256_1 | a5fd9145ffc95a2dd330abf1e09404473527227fcba74062cc06ce3ee9cfb94e |
d21_artifact_sha256_2 | e5d298e7ccf93c74941d8459d4b2c34b89ed46306d7661f7aa256384e3778d19 |
d21_analysis_loader_machine | 62 |
d21_analysis_plugin_machine | 62 |
d21_analysis_config_campaign / d21_analysis_plugin_config_campaign | BR21-000 |
d21_analysis_config_domain / d21_analysis_plugin_config_domain | node-000.day21.example.invalid |
d21_analysis_config_url / d21_analysis_plugin_config_url | https://node-000.day21.example.invalid/api/BR21-000 |
d21_analysis_config_mutex / d21_analysis_plugin_config_mutex | Global\HuntressBR21_000 |
The remaining 240 Single ids are the cumulative d01..d20 recap (ELF/PE/.NET/Go/Rust/Java/Kotlin/Swift/Nim/Zig inventory plus each earlier day's HCFG record), all answered unchanged by the banked spine. Mastery asked the same shapes over five mutated sets (set1...set5., 1260 ids) and every value was derived from that attempt's own bytes.
Timing
Single Solve was CORRECT before either timed mode was touched, so the readiness gate let both ranked windows open EARLY with no rehearsal wait: Time Trial finished 4.8 s into an 81 s window, Mastery 16.1 s into a 326 s window. Both were confirmed RANKED by the GM (run_for_time, hall_of_fame_eligible, and a deadline all reported).
Lessons for the lane
- The day's layer was member routing, not a new toolchain or a new slot shape. The novelty words (
boundaries,custody,library,shared) pointed at the pair, and the HYPOTHESIS "zero or one new slot per day" held: zero genuinely new slot shapes, one new addressing mode for existing slots. - When a pair day asks the same field twice, expect one copy with the member in the id and one with the member in the prose. Parse the question's selector; do not assume the first deliverable.
- A
Holdon a member that truly lacks the structure is the adapter working. The fix belongs in member selection, never in looseningconfig().