code-obfuscation-deobfuscation

Analyzes and defeats binary code obfuscation including CFF, VM protectors, SMC, and string encryption.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/lNwNl/Praxis --skill code-obfuscation-deobfuscation-lnwnl
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: code-obfuscation-deobfuscation
Source: https://github.com/lNwNl/Praxis/tree/main/skills/_disabled/code-obfuscation-deobfuscation
Command: npx skills add https://github.com/lNwNl/Praxis --skill code-obfuscation-deobfuscation-lnwnl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Reverse engineers often face binaries hardened with junk code, opaque predicates, control flow flattening, VM protection, and encrypted strings, and base models frequently conflate packing with obfuscation or miss the right deobfuscation strategy. This Skill provides a structured playbook for identifying, classifying, and defeating these protections in native binaries. ## Core Features & Use Cases - Obfuscation Identification: Quick symptom-to-technique mapping (flat CFG, mov-only code, pushad VM entry, XOR loops, empty IAT) with a full decision tree. - Deobfuscation Techniques: Concrete methods for opaque predicate proving with Z3, symbolic deflattening with angr, SMC unpacking via Unicorn emulation, VM handler extraction, and import hash resolution. - Tool Guidance: A curated toolbox covering IDA Pro, Ghidra, D-810, Triton, miasm, REVEN, demovfuscator, x64dbg, and Unicorn with best-fit scenarios. - Use Case: Given a CTF binary whose disassembly shows a single giant switch dispatcher, use this Skill to recognize control flow flattening and apply D-810 or angr-based symbolic deflattening to recover the original CFG. ## Quick Start Analyze this obfuscated binary, identify which obfuscation techniques it uses, and walk me through defeating them step by step.

Frequently Asked Questions about code-obfuscation-deobfuscation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reverse control flow flattening in a binary?▼

Control flow flattening is reversed by identifying the dispatcher block and state variable, then recovering real block successors. Use the D-810 IDA plugin for OLLVM-style flattening, or symbolic execution with angr, Triton, or miasm to solve state transitions.

How to unpack self-modifying code in malware?▼

Self-modifying code is unpacked by locating the XOR or ADD decryption loop, setting a breakpoint after it completes, and dumping the decrypted memory for re-analysis. For automation, emulate the decryption routine with Unicorn Engine and extract the decoded region.

What tools work best for VMProtect devirtualization?▼

VMProtect devirtualization uses handler table extraction in IDA, trace recording with REVEN or Pin, and symbolic lifting with Triton or miasm. Manual handler mapping builds an ISA spec, while pattern matching identifies known VM families.

Does symbolic execution work on opaque predicates?▼

Yes, opaque predicates are proven constant using Z3 by showing the negated condition is unsatisfiable, such as proving x*(x+1) mod 2 is always zero. Abstract interpretation and pattern matching against known predicate families are alternatives.

Why does disassembly look wrong in obfuscated binaries?▼

Anti-disassembly tricks like overlapping instructions, misaligned jumps, and conditional jump pairs confuse linear disassemblers. Fix them by undefining bad code in IDA, re-analyzing from the correct offset, and converting fake conditional pairs to unconditional jumps.

When should I use dynamic instead of static deobfuscation?▼

Use dynamic analysis first when the binary can run: trace execution, breakpoint after decryption routines, and dump decoded code or strings. Reserve static-only approaches like symbolic execution for firmware, exotic architectures, or binaries that cannot execute.