Tactical LogHuntress CTF 2026 // team archive

Days / Day 01 / Binary RE / ELF Aware

DAY 01//LANE: BINARY RE//STATUS: CORRECT x3

ELF Aware

Binary RE SSTTMM Modes reported CORRECT in this write-up

Challenge

  • Category: Binary Reverse Engineering (Day 01). Game Master ID binary-reverse-engineering-day-01-c-elf-orientation
  • Prompt: "Before you can reverse anything, you have to learn to read. These plain C binaries are your primer: headers, section tables, symbol tables. Start with readelf -h -S and work your way down."
  • Modes: Single Solve (2 pts), Time Trial (1 task, under 5 s, 3 pts), Mastery (2 tasks, under 5 s, 5 pts)

Artifacts

FileSHA-256
elf_aware.zip (challenge artifact, not published) (CourseStack download)db9c0652f4267287ffec5c20cf1a908109663b75c6519c86866535a2bb4a3d1b
extracted/slot-0.elf (challenge artifact, not published)ELF64 LSB x86-64 EXEC, dynamically linked, not stripped

Triage

Static ELF orientation: header fields, a custom section, the symbol table and a constant returned by a function. The binaries were never executed.

Investigation

readelf -h slot-0.elf            # ELF64, little endian, X86-64, EXEC, entry 0x401030
readelf -S -W slot-0.elf         # custom section .huntress @0x402010 size 0x18; .symtab present
readelf -x .huntress slot-0.elf  # "BR01-SYMBOL-ORIENTATION\0"
readelf -s -W slot-0.elf         # recover_code (GLOBAL FUNC @0x401120), huntress_marker (LOCAL OBJECT)
objdump -d -M intel slot-0.elf   # recover_code: mov eax,0x539 ; ret  -> 1337

The Game Master asks nine questions (answer_ids): elf_class, endianness, machine, elf_type, marker, has_symtab, exported_symbol, recover_code, entry_point.

Failed path: eight full submissions using readelf, file or elf.h spellings were all wrong. The judge accepts partial submissions and reports a remaining count. Submitting one field at a time showed which spellings it accepts:

answer_idAccepted valueRejected spellings
elf_classELF64ELFCLASS64
endiannesslittlelittle endian, 2's complement, little endian, LSB, little-endian
machinex86-64Advanced Micro Devices X86-64, x86_64, EM_X86_64
elf_typeET_EXECEXEC, EXEC (Executable file)
markerBR01-SYMBOL-ORIENTATION
has_symtabtrue
exported_symbolrecover_codemain, huntress_marker
recover_code1337
entry_point0x401030

(This is the spelling style of pyelftools / elf.h constants rather than readelf's output.)

Flag Recovery

Single Solve returned CORRECT with flag Tokene88fd18e9985765b4ecafb71754664b4. The answers were cross-checked against my own static analysis of slot-0.elf (challenge artifact, not published), which matched the agent's assigned file on every field.

Flag

  • Tokene88fd18e9985765b4ecafb71754664b4

Time Trial and Mastery

All three modes are marked Correct on CourseStack, which you confirmed. The Homebase agent's scripts are elf_aware_timed.py and elf_aware_probe.py, and its saved artifacts are in /tmp/elf-aware-probe/ (start JSON, ZIPs, mastery-results.md). All of these are in the Homebase VM and were not copied here.

  • Time Trial (under 5 s): the bundle holds 4 ELF slots x 9 questions = 36 answer_ids. Runs completed in 0.88 to 1.41 s. Failures along the way:
    • The first run crashed on a recover_code constant encoding the parser did not handle, and the 30 s server deadline passed before it submitted.
    • Two runs returned incorrect. Exact_text constants were being rendered in hex, but the challenge uses decimal; the agent changed this to decimal.
    • The agent did not report the run that finally passed. I saw the Correct result on CourseStack.
  • Mastery (2 tasks, under 5 s): two sets x 4 slots x 9 questions = 72 answer_ids, nested as setN.slotM_<field> (for example set1.slot0_elf_class).
    • The first probe script expected set1.elf_class, so it saved the ZIPs and stopped without submitting.
    • After the ID mapping was fixed, each of the 8 slot subsets was submitted as a partial. Each was accepted, and the remaining counter dropped by 9 per slot: 63, 54 ... 9, then CORRECT.
    • Every field was accepted with the same spellings learned in Single Solve. Nothing needed a new spelling.
  • Answer-ID shapes differ by mode: Single Solve uses a bare <field>, Time Trial uses per-slot IDs, and Mastery uses setN.slotM_<field>. Map IDs from the start response and do not hard-code them.

Minimal Reproduction

Run readelf -h -S -s and objdump -d on the assigned ELF, then submit the nine values in the spellings above.

Lessons Learned

  • The Game Master supports partial submissions with a remaining counter. Use it to settle exact_text spellings field by field instead of resubmitting the full set.
  • Expect the spellings pyelftools produces (little, x86-64, ET_EXEC), not readelf's long-form text.
  • For timed modes, first save the start JSON and artifacts and dry-run the parser against them offline. Most failed timed runs here were ID-mapping or formatting bugs, not analysis errors.
  • If a full submission fails, submit per-slot partials while the server deadline is still open. That pins down the wrong field without spending a fresh attempt.
  • Huntress challenge flags this year are bare 32-character hex values returned by the Game Master (flag field), not flag{}-wrapped.