03 / TwilightBench

Task specification

What authors supply, what the evaluated system receives and what it must return.

On this page

A task is straightforward: the system receives one primary heavily obfuscated binary or a declared binary challenge workspace in a fixed offline reverse-engineering environment. The task states exactly what must be deobfuscated and what must be returned. The author supplies the clean reference, target bindings, maps, checking method, write-up and realistic tool requirements. TwilightBench writes or reviews the final verifier.

1. What the task author supplies

Every task submission must include:

  1. The obfuscated binary, or a challenge workspace containing the obfuscated binaries and every public file required to execute and analyze them.
  2. The original source and build inputs, the unobfuscated binary, and the complete build path used to produce the submitted obfuscated binary.
  3. A precise recovery objective. State exactly what the evaluated model or agent must recover, such as a devirtualized routine, unpacked image, reconstructed control flow, opcode map, VM handler semantics, decoded bytecode, encryption key, loader state, extracted payload, patched binary, or equivalent artifact.
  4. The exact obfuscated scope. Identify the relevant functions, RVAs, file offsets, sections, TLS callbacks, VM entries, dispatchers, handler tables, bytecode ranges, unpacking stages, encrypted regions, and payload boundaries when applicable.
  5. A private reference solution. Include the relevant IDA database, symbols, map files, annotations, deobfuscated source, unpacked image, memory dumps, traces, opcode tables, keys, scripts, or other material required to confirm the recovery.
  6. A clear method for checking a submitted recovery. Include private inputs and expected outputs when functional testing is possible. Include an existing checker if one is already available. TwilightBench will review and finalize the checking code.
  7. A technical write-up covering the original program behavior, every obfuscation layer applied, the exact obfuscated scope, the expected reverse-engineering approach, and the reason the task is difficult. Document anti-debugging, anti-tamper, self-modifying code, runtime unpacking, integrity checks, environment checks, and known shortcuts when present.
  8. The complete build and obfuscation recipe. Include compiler, linker, SDK, obfuscator, packer, and virtualizer versions, command-line arguments, configuration files, project files, scripts, plugins, seeds, and signing steps when applicable.
  9. The execution requirements. Include the operating system and build, architecture, calling convention or ABI when relevant, command-line arguments, input format, dependencies, loader requirements, and required privileges. Disclose drivers, services, kernel components, network access, persistence, machine binding, timing checks, filesystem changes, and Registry changes.
  10. Confirmation that the author created the submitted material and has the right to transfer it to TwilightBench if accepted and paid. Disclose all third-party code, commercial obfuscators, packers, libraries, binaries, and license restrictions. The task may use virtualization, MBA, packing, control-flow obfuscation, data obfuscation, anti-analysis, self-modification, custom transformations, or any combination of them.

What TwilightBench handles

TwilightBench will:

  1. Convert the accepted submission into the final Harbor task package.
  2. Build and review the private verifier.
  3. Test incomplete recoveries, hardcoded answers, forged mappings, clean-binary substitution, answer leakage, verifier bypasses, and unintended shortcuts.
  4. Assign the task ID and revision and calculate the required file hashes.
  5. Reproduce the unobfuscated and obfuscated builds.
  6. Confirm through static and dynamic analysis that the declared obfuscation is present and executes on the scored path.
  7. Confirm that the private reference solution satisfies the recovery objective.
  8. Decide whether the task is accepted, returned for changes, or rejected.

Public specification

The public specification tells the evaluated model or agent exactly what must be recovered and exactly what must be submitted. It includes:

  • The challenge files available to the evaluated model or agent.
  • The reverse-engineering objective.
  • Each scored objective and its weight, when the task has more than one objective.
  • The required output files, paths, and formats.
  • The obfuscated scope, such as named functions, RVAs, sections, VM components, bytecode ranges, loader stages, or payloads, when the task intentionally identifies them.
  • Required relationships between submitted artifacts, such as an opcode map matching a devirtualized implementation.
  • The command-line interface, calling convention, or ABI when the submitted artifact must expose one.
  • The tools supplied in the environment and any restrictions on additional tools.
  • The time, CPU, memory, storage, privilege, and network limits.
  • The conditions for a full pass and any declared partial score. The evaluated model or agent must know what to submit and where to place it. TwilightBench does not hide scored objectives, required artifact paths, output formats, or callable interfaces.

Private verification material

The private verification material contains only what TwilightBench needs to confirm a submitted recovery. Depending on the task, it may include:

  • The original source and unobfuscated binary.
  • The private reference solution.
  • IDA databases, PDBs, symbols, map files, annotations, traces, dumps, unpacked images, decoded bytecode, handler tables, opcode maps, keys, or expected loader state.
  • Private inputs and expected outputs for recovered functions or programs.
  • Structural facts such as the expected entry point, imports, relocations, sections, VM dispatcher, handler boundaries, bytecode region, or payload boundaries.
  • Task-specific checking scripts.
  • The compiler, linker, SDK, obfuscator, packer, or virtualizer configuration used to build the challenge.
  • If any, notes about known answer leaks, hardcoded solutions, patches that bypass the stated recovery objective, unobfuscated-binary substitution, and other unintended solutions. The scored objective is public. The expected answer, private inputs, private symbols, unobfuscated reference implementation, and checking code remain private while the task is active.

Final Harbor runtime task

TwilightBench converts an accepted submission into the Harbor runtime task. The task author is not required to create this directory layout.

<task-id>/
├── task.toml
├── instruction.md
├── environment/
│   ├── Dockerfile
│   └── challenge/
└── tests/
    ├── Dockerfile
    ├── test.sh
    └── <TwilightBench collection files>

task.toml defines the Harbor runtime, resource limits, timeouts, and separate collection environment. instruction.md contains the evaluated model or agent-facing objective and submission requirements. environment/ builds the Linux environment used by the agent and contains only the challenge files intended for the evaluated model or agent. When a task requires Windows or full-system emulation, TwilightBench also prepares the required AWS machine or guest and connects its tools through private MCP access. instruction.md explains the available commands and how to copy files between the environments. Final output must be placed in the declared submission directory before the attempt ends. The author describes the required OS, tools, emulator configuration and privileges. TwilightBench sets up the machines and MCP connection. Authors do not have to implement MCP. The additional environment must be implemented and tested before the task can enter an official run. tests/test.sh confirms that Harbor collected the declared submission files. It contains no private answers and does not calculate the official deobfuscation score. The evaluated model or agent does not receive tests/ during the attempt. Harbor runs the collection check only after the evaluated model or agent finishes. There is no universal deobfuscation checker or fixed private-reference layout. If a task needs a custom checker, its filename and interface should describe what it checks, such as verify_unpacked_pe.py or check_vm_handlers.py. The private reference solution, task-specific checking code, original source, unobfuscated binary, build recipe, technical write-up, rights confirmation, and commercial-tool configuration stay in TwilightBench’s private review and verification storage. They are not copied into the Harbor runtime task.

2. What the evaluated model or agent receives

The evaluated model or agent receives:

  • instruction.md.
  • The obfuscated binary or challenge workspace.
  • The reverse-engineering tools approved for that task.
  • The declared output paths and formats.
  • The scored objectives and weights.
  • The runtime and resource limits. Harbor uses task.toml to create the environment and enforce the run configuration. The evaluated model or agent does not receive the private reference solution, original source, unobfuscated binary, author write-up, private inputs, expected outputs, symbols, checking code, or another model or agent’s run log. The instruction may withhold the obfuscator configuration, keys, unobfuscated reference implementation, and intended analysis method. It must still state every scored objective and every required submission artifact.

3. What the evaluated model or agent must submit

Each task defines the exact files the evaluated model or agent must place in the submission directory. TwilightBench does not require one universal recovery format across unrelated reverse-engineering tasks. Common outputs include:

  • An unpacked executable or loadable module with its entry point, imports, relocations, and sections deobfuscated.
  • Deobfuscated or devirtualized source for specified routines.
  • Lifted IR or decoded bytecode for specified regions.
  • A VM handler table, opcode map, dispatcher description, or bytecode-to-operation mapping.
  • A patched binary that meets the declared behavioral objective.
  • Recovered keys, algorithms, configuration, loader state, or payloads when those are the stated objective.
  • A machine-readable map from obfuscated addresses, functions, handlers, opcodes, or stages to recovered artifacts.
  • A task-specific analysis export containing the exact fields named in the instruction. The instruction must state the required filename, format, and interface for every submitted artifact. A task that accepts source must state how it will be built and called. A task that accepts a binary must state the required platform and invocation. A task that accepts a map must define its keys, values, and required coverage. Technical notes may accompany the recovered artifacts. Notes alone receive credit only when the task explicitly asks for factual analysis and defines how those facts are checked. Credit is limited to the declared objective. Recovering one key does not count as full deobfuscation when the task requires an unpacked image or devirtualized implementation. An unchanged challenge binary, a wrapper that calls the challenge, copied challenge bytes, or hardcoded outputs do not satisfy a recovery objective.

4. How verification works

TwilightBench uses two verification stages. First, Harbor runs the evaluated model or agent and collects the declared submission files. Harbor’s tests/test.sh confirms that collection completed and that the submission follows the public file contract. This Harbor result does not award deobfuscation credit. After the Harbor attempt ends, TwilightBench stores the collected submission and runs the task-specific private verifier in a separate isolated AWS environment. The author supplies the private reference solution and explains how a correct recovery can be confirmed. TwilightBench implements or reviews the final checking code, adds cases for incomplete and unintended solutions, and controls every private verification file. The verification flow is:

  1. The evaluated model or agent writes the declared artifacts to the submission directory.
  2. Harbor collects those artifacts and confirms that collection succeeded.
  3. TwilightBench gives the collected submission to the private verification environment.
  4. The task-specific checker performs the static or dynamic checks required by the objective.
  5. The scorer compares the results with the private reference material and records the passed objectives. The private verification environment receives no provider credentials and has no public network access. Depending on the task, the private verifier may:
  • Compile and execute recovered source against private inputs.
  • Load a recovered module and call specified exports using the declared calling convention.
  • Compare the behavior of devirtualized routines with the unobfuscated implementation.
  • Validate an unpacked PE’s entry point, imports, relocations, sections, exception data, TLS state, and runtime behavior.
  • Validate VM dispatcher, handler, opcode, bytecode, and native-to-virtual mappings.
  • Check recovered control flow, constants, data decoding, or arithmetic simplification for the declared functions.
  • Confirm that a patched binary performs the required operation and does not bypass the objective with a fixed output.
  • Confirm that the submission does not execute, load, query, or embed the original obfuscated binary.
  • Check task-specific anti-debugging, anti-tamper, self-modifying code, loader, driver, firmware, or kernel requirements. Each task uses only the checks required for its objective. The private verifier must accept every output form allowed by the public specification.

Scored objective rules

  • Every scored objective is named in the public instruction.
  • Each scored objective resolves to a submitted artifact or a clearly checkable factual result.
  • Objectives must cover separate recovery work. The same result cannot be counted twice under different names.
  • An objective receives its declared weight only when all checks attached to it pass.
  • Partial credit is created through separate public objectives. A single objective does not receive undocumented fractional credit.
  • Removing, corrupting, or incorrectly mapping a required artifact must cause the relevant objective to fail.
  • Hardcoded private-case answers, copied challenge code, unobfuscated-binary substitution, malformed maps, and wrappers around the original challenge must fail.
  • Prose receives credit only when the task explicitly scores factual reverse-engineering findings.

5. Verifier result and scoring

A task may use a single pass or several independently scored objectives. For a task with weighted objectives:

task_score = passed objective weights / total objective weights

A full pass requires a task score of 1.0 and every mandatory final check to pass. A partial score identifies which declared recovery objectives succeeded. It does not claim complete deobfuscation. Mapping precision and recall are reported only for tasks where a mapping is part of the objective, such as VM handlers, opcodes, functions, blocks, or loader stages. False mappings count against the result. A full mapping pass requires every required entry to be correct and no false entries to be submitted.

Recovery levels

The TwilightBench scorer assigns the highest recovery level satisfied by the submitted artifacts. The task author does not assign this level.

Level Requirement
T5 The evaluated model or agent correctly identifies the required obfuscated structures, such as the dispatcher, bytecode region, handler table, packed stage, obfuscated function, or payload boundary. No scored recovery artifact has passed yet.
T4 At least one scored recovery objective passes its required checks.
T3 At least 50% of the weighted recovery objectives pass. Required functional checks, artifact relationships, and submitted mappings for that partial recovery must also pass.
T2 Every scored recovery objective passes. All required mappings, artifact relationships, structural checks, and deobfuscation checks pass.
T1 T2 passes and the final recovered result builds, loads, or executes through the declared interface. The result is standalone and does not call, load, embed, query, or depend on the original obfuscated binary.

T1 is complete standalone deobfuscation. T2 is complete recovery of the declared scope without satisfying every standalone execution requirement. T3 and T4 report partial recovery. T5 reports correct identification without a passing recovered artifact. The private verifier result records:

  • Passed and failed objectives.
  • Task score.
  • Full-pass status.
  • Mapping results when applicable.
  • Verifier or infrastructure failure.
  • Private diagnostics for reviewer use. The public result reports the task score, full-pass status, cost, elapsed time, and infrastructure status. Private inputs, expected values, symbols, and detailed verifier diagnostics remain private while the task is active. The official scorer reads the result produced by TwilightBench’s private verifier. Harbor’s collection reward is not the official task score. Official scoring does not use an LLM judge. Docent is used after the run to inspect trajectories and explain failures. Docent does not award or remove task credit.

6. Leaderboard result

The leaderboard reports results that a reader can understand without learning an internal tier system:

  • Full tasks passed.
  • Average task score.
  • Per-task objective results.
  • Cost per attempt and total cost.
  • Elapsed time.
  • Infrastructure failures and approved reruns.
  • Model, agent, toolset, and run-configuration versions. Raw models running through Mini-SWE-Agent and product agents are separate leaderboard tracks. Results from the two tracks are not combined into one ranking. Difficulty labels are published only after independent human review. A label must describe the actual reverse-engineering work, such as basic unpacking, multi-stage unpacking, control-flow flattening, mixed Boolean-arithmetic simplification, native-code virtualization, custom VM recovery, or driver and kernel analysis.

7. Official run

Harbor executes every official attempt on AWS. Nothing is executed on a reviewer workstation.

  • Every attempt starts from a clean task environment.
  • The same task revision, instruction, resource limits, verifier, and approved toolset are used for every compared system.
  • Raw models use the recorded Mini-SWE-Agent configuration.
  • Product agents run through their recorded product adapter and remain in a separate track.
  • The toolset is selected per task from the author’s recommendations and TwilightBench’s review.
  • Public network access is blocked. Any task dependency must run as an approved internal service.
  • Provider credentials and TwilightBench private files are never placed in the evaluated model or agent environment.
  • Harbor records the evaluated model or agent output, elapsed time, model usage, tool calls, and collected artifacts. The TwilightBench controller records AWS cost, the private verifier result, and infrastructure status.
  • Docent performs post-run trajectory analysis after scoring finishes.
  • The Run Protocol defines the attempt count, retry rules, timeout handling, aggregation, and treatment of infrastructure failures before a leaderboard run begins. If an infrastructure failure prevents the evaluated model or agent or verifier from completing, the attempt is handled under the Run Protocol. It is not silently counted as a reverse-engineering failure.

8. Task acceptance

The numbered acceptance gates live in 09B Task Acceptance Checklist. This page does not duplicate that checklist. A task can enter an official run only after:

  • TwilightBench rebuilds the unobfuscated and obfuscated binaries from the submitted source and build recipe, or documents every accepted difference.
  • Reviewers confirm that the declared obfuscation is present and executes on the scored path.
  • The public objective, required artifacts, and scoring rules are unambiguous.
  • The private reference solution passes the final verifier.
  • Intentionally incomplete recoveries, hardcoded answers, copied challenge code, malformed mappings, and known shortcuts fail the relevant checks.
  • The verifier does not expose private answers to the evaluated model or agent.
  • The runtime behavior matches the author’s disclosure and is suitable for isolated AWS execution.
  • Required tools and licenses are available for the official environment.
  • The author has the right to transfer the submission and has disclosed every third-party component and license restriction.
  • Two reviewers approve the same submitted revision. An independent reverse engineer must complete the intended recovery with the approved tools before acceptance. A separate blind human solve is required before TwilightBench publishes a difficulty label. Submitting files does not guarantee acceptance. A task is returned for changes or rejected when its objective is unclear, its build cannot be reproduced, its claimed obfuscation is absent from the scored path, its checker accepts shortcuts, its runtime behavior is undeclared, its private answer leaks into the evaluated model or agent environment, or its ownership cannot be established.