Logo van Devirtualizing Vm Protected Code

Devirtualizing Vm Protected Code

Community
trilwu
devirtualizing-vm-protected-code

Haal de oorspronkelijke logica terug uit code die is beschermd met een virtualization-obfuscator, zoals VMProtect, Themida/WinLicense, Code Virtualizer of een aangepaste opcode-VM. Lokaliseer de VM-dispatcher, reverse-engineer de handlers om hun semantiek te achterhalen, haal de virtuele bytecode eruit en vertaal die met Triton, miasm of tools op basis van VTIL naar een vereenvoudigde IR. Gebruik deze skill wanneer een functie is veranderd in een enorme fetch-decode-dispatch-loop, wanneer analyse een handler-tabel toont in plaats van normale code, of wanneer na het uitpakken een gevirtualiseerde kern zichtbaar wordt.

Add to TypingMind

Overzicht

Uitgevertrilwu
Repositorysecskills
Skillnaamdevirtualizing-vm-protected-code
Sterren
144
Forks
15
Meegeleverde bestanden
Alleen instructies
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Compleet zonder extra bestanden

    Alles wat het model nodig heeft, staat in de instructies — geen extra bestanden om te synchroniseren.

  • Open source

    Gepubliceerd door trilwu op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Devirtualizing Vm Protected Code in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/trilwu/secskills/tree/main/secskills-core/skills/devirtualizing-vm-protected-code
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/trilwu/secskills.git /tmp/secskills
mkdir -p .claude/skills
cp -r /tmp/secskills/secskills-core/skills/devirtualizing-vm-protected-code .claude/skills/devirtualizing-vm-protected-code
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Devirtualizing Vm Protected Code in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Devirtualizing Vm Protected Code automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Devirtualizing Vm Protected Code niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Devirtualizing VM-Protected Code

Virtualization obfuscation replaces native instructions with bytecode for a custom virtual machine embedded in the binary, then runs that bytecode through an interpreter. The original logic is not gone — it is expressed in an instruction set you have to recover first. Devirtualization is a fixed pipeline: find the VM, understand its handlers, extract the bytecode, and lift it back to something readable. The obfuscator changes every build, so the pipeline, not any one tool, is the durable skill.

When to Use

  • A function turned into a large fetch-decode-dispatch loop with a handler table instead of ordinary control flow
  • Binaries protected by VMProtect, Themida/WinLicense, Oreans Code Virtualizer, or a bespoke opcode VM
  • Recovering the algorithm inside a virtualized function (a licence check, a crypto routine, anti-cheat logic)
  • After unpacking, when the real code is virtualized rather than merely packed

When NOT to Use

  • Unpacking, dumping, and fixing imports of a packed/protected binary — that is unpacking-protected-binaries, and it comes first: unpack the outer protection, then devirtualize the virtualized core it reveals.
  • Ordinary (non-virtualized) obfuscation — junk code, opaque predicates, string encryption — is normal work for analyzing-binaries.
  • Virtualized/obfuscated JavaScript — reversing-obfuscated-javascript.
  • Exploiting a bug in the recovered logic — exploiting-memory-corruption.

The Pipeline

1. Locate the VM. Find the transition from native to virtual: the vm_enter stub that saves native context and sets up the virtual machine, the dispatcher loop that fetches the next virtual opcode and jumps through a handler table, and the vm_exit that restores native context. The dispatcher is the anchor for everything else.

2. Recover the VM architecture. Identify the virtual context — the structure holding the VM's registers and virtual instruction pointer — and how the dispatcher decodes an opcode into a handler index. Note the VM's shape: stack-based vs register-based, opcode encoding, and any key/rolling obfuscation on the bytecode pointer.

3. Understand the handlers. Each handler implements one virtual instruction — a micro-operation like add, load, store, xor, push, or a native call. Analyze handlers individually; symbolic execution of a single handler (Triton, miasm) yields its semantics far faster than reading it by hand, because a handler is small and side-effect-focused even when the surrounding VM is huge. Build a table mapping opcode → semantics.

4. Extract the bytecode. With the handlers understood, read the virtual instruction stream the dispatcher walks — the actual program, in the VM's instruction set.

5. Lift and simplify. Translate the virtual instructions into an IR and run optimization passes — constant folding, dead-code elimination, peephole — to collapse the VM's verbosity back toward the original logic. This is where VTIL-based tooling (and, for VMProtect x64, NoVmp) shines: it lifts to an optimizable IR and simplifies, turning thousands of virtual ops into a handful of real ones. Triton and miasm support the same lift-and-simplify approach when no ready tool fits the target VM.

Static vs Dynamic

Handlers can be studied statically, but a dynamic execution trace — capturing the sequence of handlers actually run for a given input — is often the faster route into a specific virtualized function: it tells you which handlers matter and in what order, so you devirtualize the path that runs rather than the whole VM. Combine them: trace to find the relevant handlers, symbolic-execute them to get semantics, lift the traced bytecode.

Expectations

  • No universal button. VMProtect and Themida differ, versions differ, and custom VMs share nothing. Off-the-shelf devirtualizers target specific protector versions and break on others; treat them as accelerators for the pipeline, not replacements for it.
  • The core is recoverable even when the whole is not. You rarely need to devirtualize an entire binary — you need the one function with the algorithm. Scope to it.
  • Nested and mutating VMs exist. Some protectors virtualize inside a virtual machine, or mutate handlers per build. Recover one layer at a time.

Rationalizations to Reject

  • "A tool devirtualized it, so I'm done." Automated devirtualizers match specific protector versions and silently produce partial or wrong output on others. Validate the recovered logic against the binary's observed behaviour.
  • "I have to devirtualize the whole binary." You need the target function. Trace to it and lift only what runs; whole-binary devirtualization is usually wasted effort.
  • "The handlers are too big to read." A handler is one micro-op with a lot of obfuscation around it. Symbolic-execute it for the semantics instead of reading the noise.
  • "It's still packed, I'll devirtualize first." Unpack first (unpacking-protected-binaries); devirtualization operates on the revealed code, and anti-debug/anti-dump defenses will fight you until the outer layer is off.
  • "The virtual instruction stream is the answer." The raw bytecode is not readable logic — you must lift and simplify it. The optimization passes are what turn recovered opcodes back into the algorithm.

References

  • unpacking-protected-binaries — remove packing/anti-debug before devirtualizing
  • analyzing-binaries — general RE of the recovered, devirtualized code
  • reviewing-cryptography — when the virtualized routine is a crypto/licence check
  • exploiting-memory-corruption — exploiting a bug in the recovered logic

Veelgestelde vragen

Wat doet de AI-skill Devirtualizing Vm Protected Code?

Haal de oorspronkelijke logica terug uit code die is beschermd met een virtualization-obfuscator, zoals VMProtect, Themida/WinLicense, Code Virtualizer of een aangepaste opcode-VM. Lokaliseer de VM-dispatcher, reverse-engineer de handlers om hun semantiek te achterhalen, haal de virtuele bytecode eruit en vertaal die met Triton, miasm of tools op basis van VTIL naar een vereenvoudigde IR. Gebruik deze skill wanneer een functie is veranderd in een enorme fetch-decode-dispatch-loop, wanneer analyse een handler-tabel toont in plaats van normale code, of wanneer na het uitpakken een gevirtualis...

Waarom Devirtualizing Vm Protected Code gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Devirtualizing Vm Protected Code bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Devirtualizing Vm Protected Code in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/trilwu/secskills/tree/main/secskills-core/skills/devirtualizing-vm-protected-code. TypingMind leest het bestand SKILL.md en installeert het als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Devirtualizing Vm Protected Code gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Devirtualizing Vm Protected Code gebruiken?

Zoveel als je wilt. Je kunt Devirtualizing Vm Protected Code gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Devirtualizing Vm Protected Code gratis?

Ja. Deze skill is door trilwu op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇