Add VMProtect Devirtualizer - #8
Conversation
5b24e64 to
7a3b65b
Compare
Co-authored-by: name <37@cmail.nu>
7a3b65b to
43a8500
Compare
|
VMProtect uses the native stack for its virtual stack and vm-context. Stores to the stack therefore become indistinguishable from legitimate, original semantics that store values to the stack. Are you able to distinguish which stores are to be kept? This is important because prologs are usually virtualized which create stack displacements. If the stores to the stack are not dropped then there will be dangling expressions associated with the store. This keeps obfuscation around... Take this code for example, a |
This PR implements an LLVM based VMProtect devirtualizer into the framework. This work was a joint effort between @duk-37 and I.
Some notable features of this PR:
Dna. We build a "virtual control flow graph" using the virtual program counter, and iteratively explore/lift/optimize until the full control flow graph is recovered.SimplifierThe devirtualizer is at a stage where it generally works on VMP 3.x (with all obfuscation completely removed), but this is not a "complete" release - there are still features that need to be added for this to be a plug and play tool with readable output. Mainly better support for recompilation, generalizing some patterns, and testing on more real world code is necessary.