06 / TwilightBench
Private verification
Task-specific checking without exposing private answers to submitted code.
After a Harbor run ends, TwilightBench checks the exact files collected from the submission directory. Harbor confirms only that the declared files were collected. It does not award deobfuscation credit. The private checker records which public objectives passed, calculates the task score and obfuscation-removal coverage, checks required mappings, and assigns the highest level reached from T5 to T1. Official scoring is programmatic. An LLM does not decide the result.
1. Files and access
Harbor task environment
The evaluated LLM or agent receives:
instruction.md.- The obfuscated binary or challenge workspace.
- The task-specific public files named in
instruction.md, such as headers, sample inputs, templates, loaders, libraries, firmware blobs, or runtime dependencies. - The reverse-engineering tools approved for that task.
- The required output filenames, formats, and interfaces.
- The declared run limits.
Harbor reads
task.tomlto build the Linux environment and enforce the run configuration. When required, TwilightBench also assigns a Windows machine or emulator guest to the attempt. The task instructions explain how to access its tools and transfer files. The evaluated LLM or agent does not receive the original source, unobfuscated binary, private solution, private inputs, expected outputs, private mappings, private symbols, or private checking code. This rule applies to the Linux workspace and every machine or file accessible through MCP.
Harbor submission collection
Output created on Windows or in an emulator must be copied to the declared submission directory before the run ends. After the run finishes, Harbor checks the declared filenames, regular-file requirement, paths, file types, encodings, and size limits. It copies only the declared output files and executes none of them. Harbor’s collection result confirms whether the submission was collected correctly. It does not determine whether any reverse-engineering objective passed.
AWS submission checking
When a task requires static inspection, compilation, loading, or execution, TwilightBench checks the collected submission in a separate AWS environment. The checking environment uses the OS, runtime, architecture and device setup required by the submitted output. It does not reuse the Windows machine or guest modified by the evaluated LLM or agent. This environment may receive:
- The collected submission.
- Public compilers, headers, drivers, loaders, and format definitions required by the task.
- Task-specific file readers.
- Private input values when behavioral testing is required. It does not receive expected outputs, the unobfuscated reference, private mappings, private symbols, AWS credentials, provider credentials, or private checking code. When the task requires a standalone result, the original obfuscated binary is also absent.
Private comparison and scoring
The private comparison receives the checked static values and execution results together with the correct private answers. It does not compile, load, or execute submitted code. Private source, reference files, expected answers, mappings, symbols, and detailed checking results remain unavailable to the evaluated LLM or agent while the task is active.
2. Verifier rules
- Every task uses checks written for its declared reverse-engineering objective.
- The same collected files must produce the same result under the same checker version and AWS environment.
- Every scored objective must point to a declared submitted file or a checkable field inside one.
- The checker must accept every output representation allowed by the public task specification.
- Exact symbols, layout, compiler output, or instruction selection are required only when the public task specification requires exact reconstruction.
- Submitted code is never executed in the process or AWS environment that holds the correct private answers.
- An LLM is never used to decide the official score.
3. How a submission is checked
- The evaluated LLM or agent writes the required files to the submission directory.
- Harbor collects the declared files and reports whether collection succeeded.
- TwilightBench stores the exact collected files after the Harbor run ends.
- Task-specific file readers validate the declared JSON, CSV, maps, source, binaries, decoded bytecode, CFGs, or analysis exports.
- When behavioral testing is required, a separate AWS environment builds or runs the submitted code against private inputs. That environment does not have the expected outputs.
- The execution results and checked static values are passed to the private comparison.
- The private comparison checks them against the unobfuscated reference, expected outputs, required mappings, addresses, control-flow facts, loader state, or other task-specific answers.
- TwilightBench applies the public objective weights and determines the highest level reached from T5 to T1.
- TwilightBench stores the private result and the public result. Docent may analyze the completed run afterward, but it cannot change the score. The complete Harbor run and replacement-run procedure is defined in 05 Run Protocol & Evaluation.
4. Who writes the private checker
The task author supplies:
- A correct recovery.
- The original source, unobfuscated binary, and private analysis material needed to confirm the recovery.
- A clear explanation of how the submitted output can be checked.
- Private inputs and expected outputs when functional testing is possible.
- Any existing checking code that may be useful.
- Known ways someone could produce an incomplete or misleading result without completing the stated objective. TwilightBench:
- Defines the final required output files and formats with the author.
- Writes or reviews the official private checker.
- Separates submitted-code execution from access to the correct private answers.
- Creates the correct, incomplete, malformed, copied, wrapped, hardcoded, and task-specific test submissions needed to test the checker.
- Confirms that the correct deobfuscation reaches T1.
- Owns the checker used for official scoring. The task author is not required to build the Harbor package or follow one fixed private directory layout. Each task receives the checking code and private file structure required by its objective.
5. What private verification may check
Depending on the task, the private checker may:
- Compile submitted C, C++, Rust, LLVM IR, or another declared source format and call the required function or entry point.
- Execute recovered code against private inputs and compare its behavior with the unobfuscated implementation.
- Load an unpacked PE, ELF, Mach-O, firmware image, or module and inspect its entry point, sections, permissions, imports, exports, relocations, exception data, TLS state, or loader behavior.
- Validate VM entry points, dispatchers, handler tables, opcode semantics, decoded bytecode, virtual registers, and native-to-virtual mappings.
- Validate recovered functions, basic blocks, CFG edges, indirect targets, branch predicates, opaque predicates, and flattened control-flow state.
- Check MBA simplification, bit width, flags, memory effects, and bitvector behavior for the declared routines.
- Check unpacking stages, decoded payloads, encryption keys, loader state, runtime patches, or reconstructed executable images.
- Confirm that required virtualization, packing, control-flow obfuscation, data obfuscation, anti-analysis, or self-modifying code has been removed or reconstructed as stated.
- Confirm that a standalone result does not load, invoke, embed, query, or depend on the original obfuscated binary, VM runtime, packed loader, or another component that the task requires the evaluated LLM or agent to remove. Each task uses only the checks required by its public objective. A checker must not reject a technically correct alternative implementation when the public specification allows one.
6. AWS checking requirements
Submitted source, binaries, scripts, IR, firmware and analysis files are opened or executed only inside the task’s separate AWS checking environment. Every checking attempt uses:
- A new environment with the OS and runtime required by the submission.
- No public network access. Only required private control and result-transfer connections are allowed.
- No AWS or model-provider credentials.
- No access to expected outputs, private reference files, private symbols or the private comparison and scoring code.
- No access to the AWS host filesystem, Docker socket, host processes or host devices.
- Fixed CPU, memory, storage, process, file, output and wall-clock limits. For Linux user-mode checking, keep the existing defaults: a non-root account, a read-only submission, a read-only base filesystem and limited temporary storage. Windows checking uses a separate Windows environment. Driver, kernel and full-system tasks use an isolated guest with the required OS, devices and privileges. Administrator access, driver loading and OS changes are allowed only inside that guest when the task requires them. They do not grant access to the AWS host or other runs. The exact collected submission is kept outside the checking environment. Linux checks use a read-only copy. When a Windows or privileged guest needs a writable copy, use a disposable working copy and keep the collected original unchanged. Restart, timeout, log collection and cleanup controls run outside any guest that the submitted code can modify or crash. Execution results go to the separate private comparison. Submitted code never runs where the correct private answers are stored. A task is not accepted until its build, execution, timeout and cleanup behavior have been tested on the required AWS setup. Windows execution, driver loading, full-system emulation and other platform requirements need a working task environment and matching private checks before acceptance. The Windows/MCP and additional guest setup described in 07 Environments & Tools still needs implementation and testing.
7. Scoring and T1 through T5
Each task declares one or more scored objectives. An objective receives its full declared weight only when every check assigned to that objective passes. Otherwise it receives zero weight.
obfuscation-removal coverage =
passed objective weights / total objective weights
When mappings are required, TwilightBench reports:
- Required mappings recovered: correct required mappings divided by all required mappings.
- Submitted mappings correct: correct submitted mappings divided by all submitted mappings. Missing required mappings reduce the result. Incorrect extra mappings count as wrong. Mapping results are not reported for tasks that do not require mappings.
| Level | Requirement |
|---|---|
| T5 | The required machine-readable identification is correct, but no scored recovery objective passes. A task without an identification stage reports T5 as not applicable. |
| T4 | At least one scored recovery objective passes, but the requirements for T3 are not met. |
| T3 | At least 50 percent of the weighted objectives pass. The task’s declared partial behavior, mapping, and relationship requirements must also pass. |
| T2 | Every scored recovery objective passes. All complete behavior, mapping, relationship, structural, and obfuscation-removal checks also pass. |
| T1 | T2 passes. The final output builds, loads, or runs through the declared interface and does not depend on the original obfuscated binary or any VM, loader, packed stage, or obfuscated routine that the task requires the evaluated LLM or agent to remove. |
T1 is the benchmark pass condition. T5 through T2 report concrete partial progress.
8. Outputs that do not satisfy a task
The checker must follow the public objective. Unless the task explicitly asks for one of these results, the following do not satisfy complete deobfuscation:
- Renaming, copying, or embedding the original obfuscated binary.
- Submitting a wrapper that launches or loads the original obfuscated binary.
- Retaining an in-scope VM dispatcher, bytecode interpreter, packed loader, or obfuscated routine when the task requires its removal.
- Hardcoding public sample outputs or a small table of guessed answers.
- Submitting false mappings that do not resolve to the recovered code.
- Calling the original obfuscated binary during checking to obtain the required answers.
- Returning only a key, valid input, flag, payload, or written explanation when the task requires recovered code, an unpacked image, decoded bytecode, mappings, or another technical output. A missing mandatory file, extra undeclared file, link, special file, path outside the submission directory, or oversized submission is an invalid submission. A collected file that fails its task-specific format or behavior check fails the objective tied to that file. A build failure, crash, or timeout in submitted code is recorded for the relevant output. It must not erase credit from another independently scored output that was checked successfully.
9. Testing the private checker
Before accepting a task, TwilightBench tests the checker with the cases required by that task. These normally include:
- The correct recovery, which must reach T1.
- A different correct implementation when the public specification allows different implementations.
- Incomplete recoveries expected to stop at T5, T4, T3, or T2.
- Empty, missing, malformed, or oversized output.
- A copied, renamed, embedded, or wrapped challenge.
- Hardcoded public samples.
- Missing, incomplete, or false mappings.
- Corruption of each independently scored output.
- Build failures, runtime failures, and timeouts when submitted code is executed.
- Repeated checking of the same collected files. The author does not have to create these test submissions. TwilightBench creates and reviews them while finalizing the task. The complete task-acceptance procedure is defined in task acceptance requirements.
10. Private and public results
The private result records:
- Passed and failed public objectives.
- Task score and obfuscation-removal coverage.
- Mapping correctness when applicable.
- The highest level reached from T5 to T1.
- T1 status.
- Build and runtime results.
- Run outcome and infrastructure status.
- Detailed results needed to investigate a failed check. The public result contains the fields needed for the leaderboard. It does not contain private inputs, expected outputs, correct mappings, symbols, source, target locations, or detailed checking results. Manual review may investigate a disputed result but cannot award credit outside the private checker. If an error in the checker affected scoring, TwilightBench creates a corrected checker version and checks every affected collected submission again. Leaderboard calculation and published fields are defined in 04 Outputs, Grading, Leaderboard & Reporting.