Updated November 18, 2026
Glossary ToolsBest models

Concepts · deobfuscation

LLM deobfuscation explained

LLM deobfuscation works on bogus control flow and fails on instruction substitution and combined techniques, in a 2025 evaluation of seven commercial models.

By AI for Reverse EngineeringUpdated November 18, 2026
On this page

Techniques

TechniqueWhat it doesWhat helps
Opaque predicatesAdds branches that never changeA model spots them. A solver proves them
Control-flow flatteningOne loop and a state dispatcherRecover the states, then the flow
Instruction substitutionSimple operations rewritten as long arithmeticA solver. Models struggle
String encryptionStrings appear only at runtimeRun the decryptor in the lab
Import hashingAPIs resolved by hashResolve the hashes with a script
PackingThe real code is encrypted on diskUnpack, then analyze the dump
VirtualizationA custom bytecode interpreterMap the handlers first

Research

A 2025 study tested seven commercial models on assembly obfuscated four ways. Results ranged "from autonomous deobfuscation to complete failure". Resistance was low for bogus control flow, moderate for control-flow flattening, and high for instruction substitution and for all three combined, with "universal failure against combined techniques".

Workflow

  1. Clean up with tools first. Unpack, decrypt strings, resolve import hashes and simplify arithmetic with a solver. The ida-pro-mcp README says to do this before an LLM sees the code.
  2. Give the model the cleaned function and the dispatcher, and ask for the states and transitions.
  3. Have it rebuild the structure and mark every unsure transition.
  4. Check it in a debugger on real inputs, in the lab.

Kimi K3.1 Pro holds 1,048,576 tokens, so a flattened function fits in one request.

Scope

Authorized work only, on your own systems, a scoped engagement, a CTF or a lab. No exploits, payloads, malware or detection-evasion steps.