CFG Flattening with CMOV: Antivirus & EDR Evasion via Control Flow Obfuscation in x64 Assembly
Static analysis tools and AI-driven EDRs map malicious behavior through branching instructions — JMP, JZ, JNZ form the edges of a Control Flow Graph that heuristic engines traverse. CMOV-based CFG flattening removes all conditional branches, collapsing the graph to a single flat node sequence that defeats both signature-based and ML-based detection. Full x64 Assembly implementation: branch-free syscall obfuscation, CMOV patterns for JZ/JNZ/JLE replacement, and empirical bypass results against NGAV and Ghidra CFG analysis.