← Lab /Security & privacy

VMSpec removes VM obfuscation from nearly all samples, fully recovering original code

VMSpec can completely strip VM-obfuscation and reconstruct complete program behavior for VM-obfuscated binaries

Security & privacy arXiv 21 Oct 2026 Method Prototype evidence

Published as “VMSpec: A Decompiler-based Approach against Virtual Machine Obfuscation”

Why it matters

Analysts can now fully recover the behavior of VM-obfuscated malware, facilitating detection, attribution, and mitigation of malicious code.

Summary

VMSpec decompiles virtually all VM-obfuscated binaries, correctly reconstructing full program semantics even for samples with input-dependent loops and recursion. It succeeded on 918 Tigress samples and 152 of 153 Code Virtualizer-Tiger samples, producing output comparable to Ghidra’s decompilation of the original code. The approach automates SLEIGH processor specification generation using dynamic symbolic execution, enabling existing decompilers to handle the recovered bytecode. Some samples failed due to jump-table handling, memory limits, or imprecise context identification, and analysis time ranges from ~40 s to 170 s per sample. The evaluation uses a public benchmark of 147 programs plus six real-world DGAs.

What they found 2

  1. VMSpec decompiles all Tigress samples and most Code Virtualizer samples with semantic correctness

    “VMSpec was able to decompile all 918 Tigress samples and produce semantically correct code.”

  2. The tool strips VM-obfuscation from nearly all samples, yielding decompilation comparable to that of the original code

    “VMSpec completely strips VM-obfuscation from nearly all obfuscated samples, producing output comparable to Ghidra’s decompilation of the original code.”

Caveats 7

  • The numtowords sample with a jump table could not be correctly decompiled
  • Two Code Virtualizer-Fish samples ran out of memory during analysis
  • One sample failed because context identification was too imprecise
  • Path Explosion. The complexity of current commercial handlers can already lead to path explosion.
  • Program-Context-based Specialization. Our current prototype only considers instruction-local context for specialization of native transitions.
  • State identification effort. Adding support for additional VM obfuscators currently requires additional efforts to identify and model relevant VM state.
  • Arithmetic Obfuscations. Mixed Boolean-Arithmetic (MBA) can hinder analysis; VMSpec currently relies on a simple expression simplifier.

What’s new here 4

  • Automates generation of SLEIGH processor specifications for unknown VMs
  • Enables existing decompilers to recover complete semantics of VM-obfuscated code
  • First method to handle programs with infinite, input-dependent paths and recursive calls
  • Applies a custom memory model to make DSE practical on bytecode handlers