02 / TwilightBench
Obfuscation taxonomy
VM design, control flow, MBA, packing, anti-analysis and execution requirements.
Purpose: This taxonomy records what is technically present in a TwilightBench task. Labels support corpus build, coverage analysis, and result breakdowns. They do not determine target credit, T1, or any other score; the fixed task specification and task-specific verifier do. The taxonomy is multi-axis. A task may carry multiple labels on the same axis. The labels are non-exhaustive and do not restrict which obfuscation an author may use. Narrow mechanism details belong in per-task metadata rather than being forced into a global label.
Axis model
| Axis | Question answered |
|---|---|
| Recovery scope | What code or artifact must be recovered? |
| Insertion point | Where in the build or execution lifecycle was the transformation introduced? |
| Transformation family | What static or semantic transformation was applied? |
| Runtime obfuscation | What obfuscation exists only or primarily during loading or execution? |
| VM design | How is a virtualization-based obfuscation constructed? |
| Semantic domain | Which machine-level behaviors must a recovered result preserve? |
| Platform | Where and under what ABI, loader, privilege, or device model does the task execute? |
| Agent trap | Which mechanisms primarily increase automated-analysis friction rather than transform the program itself? |
These axes may overlap in one implementation, but they should not be collapsed. For example, virtualization is a transformation family; rolling-key bytecode encryption is a VM-design detail; anti-emulation is a runtime obfuscation; and oversized tool output is an agent trap.
1. Recovery target and scope
Each task states what must be deobfuscated. Supported scopes include:
- Expression.
- Basic block.
- Function or native code region.
- Set of native functions or regions.
- Virtualized program or region.
- Module.
- Whole executable.
- Embedded payload.
- Loader or unpacking stage.
- Driver component.
- Kernel component.
- Firmware component.
- Managed-runtime component.
- A declared combination of the above. The public task specification declares the recovery scope, public target IDs, required relationships, allowed output representations, and required artifact interfaces. The private specification binds those public IDs to exact functions, ranges, VM handlers, bytecode regions, payload stages, clean references, mappings, and verifier predicates. The author supplies the clean reference, private bindings, maps and a way to check the result. TwilightBench writes or reviews the final verifier. The system must not be required to guess a hidden scored target ID, output path, symbol, ABI, or callable interface. Recovery scope describes the unit being recovered. It is not a difficulty label and does not itself award credit.
2. Obfuscation insertion point
Record where each in-scope transformation entered the artifact:
source-levelcompiler-irlink-timebinary-rewritingloader-or-packerruntime-generatedjit-generatedmulti-stageA task may use multiple insertion points. For example, source-level data encoding may be followed by compiler-IR flattening, link-time layout disruption, and a loader-stage packer.
3. Obfuscation and transformation families
| Family | Examples |
|---|---|
| Virtualization | Custom VM, bytecode, dispatcher, handlers, rolling bytecode encoding, nested VMs, multiple VMs, superoperators |
| MBA and data obfuscation | Linear or nonlinear MBA expressions, encoded constants, encrypted strings, transformed tables, instruction substitution, bitwise-polynomial forms |
| Control-flow obfuscation | Control-flow flattening, opaque predicates, bogus branches, indirect control flow, unresolved indirect targets, call and return obfuscation |
| Function and code transformation | Function duplication, outlining, inlining, splitting, merging, reordered regions, cross-function state machines |
| Data-flow, alias, and pointer obfuscation | Alias inflation, pointer encoding, transformed object layouts, artificial dependencies, state threading, indirect data access |
| Anti-disassembly and code-layout tricks | Overlapping or ambiguous decoding, mixed code and data, invalid fall-through, alignment abuse, exception-driven transfer, misleading boundaries |
| Packing | Encrypted or compressed images, staged unpacking, manual mapping, broken or reconstructed imports and relocations |
| Anti-analysis | Anti-debugging, anti-disassembly, anti-emulation, integrity checks, self-modification, environment checks |
| Custom and mixed transformations | Author-defined transformations that do not fit one family, or obfuscation stacks whose semantics arise from several intertwined families |
The labels may be combined. The verifier checks the actual declared recovery target and predicates, not the family name. A family label never substitutes for task-specific technical evidence.
4. Runtime obfuscation layers
Record runtime obfuscation layers separately from static transformation families:
- Packing and staged unpacking.
- Encrypted or compressed images.
- Manual mapping.
- Self-modifying code.
- Dynamically generated or JIT-generated code.
- Integrity checks and anti-tamper logic.
- Anti-debugging.
- Anti-emulation.
- Anti-dynamic-binary-instrumentation.
- Anti-symbolic-execution.
- Anti-taint-analysis.
- Anti-dump logic.
- Environment or hardware binding.
- Timing dependence.
- Nondeterministic behavior.
- Runtime-dependent keys, state, or code generation.
A mechanism may receive both a transformation-family label and a runtime-obfuscation label when both are technically true. For example, a custom VM with mutable handlers is labeled
virtualizationandself-modifying-or-dynamically-generated.
5. VM design and virtualization details
For virtualization tasks, the VM architecture and relevant construction details are recorded directly rather than using virtualization as the only label.
VM architecture and dispatch
- Stack VM.
- Register VM.
- Hybrid VM.
- Centralized dispatcher.
- Decentralized dispatch.
- Direct-threaded dispatch.
- Indirect-threaded or table-driven dispatch.
- Handler duplication.
- Superoperators.
- Nested VMs.
- Multiple cooperating VMs.
- Custom bespoke VM implementations.
Bytecode and VM state
- Plain, encoded, encrypted, or compressed bytecode.
- Bytecode encryption, including control-flow-sensitive bytecode encryption.
- Rolling-key bytecode encryption.
- Virtual-PC encoding.
- Handler-bytecode interleaving.
- Mutable handlers.
- JIT-generated handlers.
- Encoded VM registers, flags, stack, or memory state.
- Per-block, per-path, or state-dependent decode keys.
Handler and control-flow transformations
- MBA-obfuscated handlers.
- Instruction substitution inside handlers.
- Opaque predicates.
- Call obfuscation.
- Flattened handler control flow.
- Anti-emulation loops.
- Non-constant right-shift MBA.
- Polynomials within bitwise sub-expressions.
- Involutions using right shifts.
- Inter-handler state coupling.
Recovery terminology
- Devirtualization is a recovery operation.
- Bytecode decoding is a recovery operation.
- Handler lifting or synthesis is a recovery operation.
- Deflattening is a recovery operation. These recovery operations may appear in author write-ups and result analysis, but the taxonomy label describes the obfuscation that existed in the challenge. Exact opcodes, keys, handler addresses, obfuscated ranges, bytecode layouts, and private target bindings remain in private task metadata while the task is live.
6. Semantic domain
Record every machine-level semantic domain that matters to verification:
fixed-width-integerfloating-pointsimd-vectorcondition-flagsmemory-aliasingexceptions-unwindingsyscallspersistent-stateconcurrency-atomicskernel-statefirmware-device-statemixed-domainTask metadata must also state the relevant bit widths, signedness, modular arithmetic, endianness, register and flag behavior, ABI, stack layout, memory effects, loader state, imports, relocations, system calls, exception behavior, floating-point mode, concurrency model, device state, and allowed runtime dependencies when they affect correctness. Semantic-domain labels describe what must be preserved. They do not imply that behavioral equivalence alone proves deobfuscation; structural, mapping, obfuscation-removal, and self-contained checks remain task-specific requirements.
7. Platform and execution-context labels
Record only fields that are useful for reproduction, verification, corpus analysis, or result breakdowns:
- File format and architecture, such as PE x64, ELF x64, ARM, AArch64, MIPS, RISC-V, or a declared bytecode format.
- Endianness and CPU feature requirements.
- ABI and calling convention.
- Operating system and version constraints.
- Execution level, such as user mode, kernel, driver, firmware, boot stage, or managed runtime.
- Loader model, load address, and relocation basis where relevant.
- Execution context, such as native, emulated, virtualized, hypervised, or device-backed.
- Required emulator, hypervisor, device model, MMIO model, or peripheral state.
- Recovery target, such as whole binary, payload, VM program, function set, or stage set.
- Obfuscation families present.
- Task origin, such as newly authored private task, development task, showcase task, or retired task.
The public leaderboard uses an opaque task ID such as
twilight-001. Public metadata may expose the high-level platform, recovery scope, and transformation families. Private clean references, target bindings, maps, symbols, exact expected values, verifier logic, generation seeds, opcodes, keys, and obfuscated addresses are not published while a task remains live.
8. Difficulty and calibration
TwilightBench v0.1 targets expert-authored tasks. The binaries are expected to be heavily obfuscated and to require serious reverse engineering. They may combine virtualization and MBA with packing, control-flow obfuscation, data obfuscation, anti-analysis, self-modification, runtime generation, or custom transformations.
The tasks may occupy the same broad intended expert band without requiring the same time, effort, tools, or specialist knowledge.
Do not assign Advanced, Expert, or Extreme merely from author intent or the number of labels. Assign a calibrated difficulty only after:
- A blind solve by a senior reverse engineer who is not the author.
- Relevant classical-tool and deobfuscator baselines.
- Pilot agent runs.
- Measurement of time, resource use, failed approaches, and verifier outcomes. Until that calibration is complete, publish expert-authored, not Expert. Difficulty is an empirical result about a fixed task revision. It is not a score multiplier and cannot change target credit.
9. Anti-agentic patterns and agent traps
Mechanisms aimed primarily at degrading automated or agentic analysis are separate from binary-obfuscation families.
Narrative poisoning
- Fake symbols.
- Planted strings.
- Prompt injections or embedded prompt-like text.
- Decoy regions.
- Fake errors and misleading diagnostics.
- Misleading metadata or annotations.
Budget and search traps
- Code scattering.
- State expansion.
- Search-space expansion.
- Costly oracle checks.
- Oversized tool output.
- Cyclic references.
- Deliberately repetitive or low-information regions.
Obfuscation stacks
- Intertwined layers.
- Global semantics that defeat local reasoning.
- Runtime binding.
- Cross-stage keys or state.
- Mutually dependent decoding and control flow.
Tool friction
- Anti-debugging.
- Anti-emulation.
- Anti-decompilation.
- Anti-dynamic-binary-instrumentation.
- Anti-symbolic-execution.
- Anti-taint-analysis.
- Anti-dump behavior.
- Tool-parser friction.
- Deliberately malformed but runtime-tolerated structures. These labels measure agent robustness and analysis friction. They do not change whether the binary was deobfuscated, do not award target credit, and do not excuse a verifier from checking the declared recovery target.
10. Task origin and exposure status
The origin and exposure status are independently recorded from technical difficulty:
- Newly authored private task.
- Derived private task.
- Development task.
- Dummy or plumbing task.
- Showcase task.
- Retired task.
- Publicly exposed task. If a task is derived from public material, record the base artifact and the substantive changes. Renaming, recompiling, repacking, changing constants, or applying another seed alone does not establish an independent task family. Exposure status matters for leakage analysis and leaderboard eligibility, but it is not an obfuscation label.
11. Labeling and scoring rules
- A task may have multiple labels on the same axis.
- Labels should describe mechanisms that are materially present.
- Narrow implementation details belong in per-task metadata, not the global taxonomy.
- Recovery operations such as deflattening, devirtualization, unpacking, lifting, synthesis, and reconstruction must not be recorded as if they were challenge-side transformation families.
- Taxonomy labels never award target credit.
- Taxonomy labels never replace verifier predicates.
- The verifier checks the declared target, relationships, semantics, structure, mappings, obfuscation removal, self-contained behavior, and residual dependencies.
- Recovery scope is not difficulty.
- The number of labels is not difficulty.
- Difficulty is assigned only after calibration.
- Exact live-task mechanisms may remain private when disclosure would reveal the answer, but the fixed private metadata must retain them.
- Public target IDs and required interfaces must remain visible even when their private bindings are hidden.
- Anti Agentic analysis must be reported separately from binary-obfuscation families.
12. Minimum taxonomy record
The repository schema is authoritative, but every task record should be able to represent at least the following fields:
taxonomy:
recovery_scope:
- virtualized-region
insertion_points:
- compiler-ir
- binary-rewriting
transformation_families:
- virtualization
- mba-data-obfuscation
- control-flow-obfuscation
runtime_protections:
- anti-emulation
- self-modifying
vm_design:
architecture: register-vm
dispatch_modes:
- decentralized
bytecode_encoding:
- rolling-key
handler_features:
- duplicated-handlers
- mba-obfuscated-handlers
semantic_domains:
- fixed-width-integer
- condition-flags
- memory-aliasing
platform:
file_format: ELF
isa: x86_64
endianness: little
abi: sysv-x86_64
os: linux
privilege_level: user
execution_context: native
agent_traps:
- planted-strings
- search-space-expansion
- tool-parser-friction
origin: newly-authored-private
difficulty:
calibration_status: uncalibrated
public_label: expert-authored
A real task may require more detailed private fields. This minimum record exists to keep task composition, breakdowns, and calibration reproducible without pretending that a taxonomy label is itself grading evidence.