Skip to content

Control Flow Obfuscation

LvStrng edited this page Aug 19, 2026 · 1 revision

Control Flow Obfuscation

Aidsfuscator's control flow obfuscation falls under 2 transformers - Control flow flattening and Control flow shuffling.


Control flow flattening

Exclusion key: controlFlowFlatten

Simple. Control flow flattening flattens a Control flow graph. This transformation is what's supposed to hold up most of your obfuscation. It squeezes the original control flow into a few switch statements to make it harder to both read the code and track where the control flow goes. This transformer alone isn't that much stronger.

Transformers that improve control flow flattening:

  • Salting (Method and Class)
  • Flow Ints
  • Control Flow Shuffling

Before:

image

After:

image

Control Flow Shuffling

Exclusion key: controlFlowShuffle

Control flow shuffling alone is very very useless. It should only be used alongside Control flow flattening and will probably get turned into a setting in control flow flattening in the future. This reorders code blocks in the bytecode to be floating around randomly. When used with control flow flattening, blocks get put into a random order and they now have to get every obfuscated value related to flow obfuscation to deobfuscate the flow.

Transformers that improve control flow shuffling:

  • Control flow flattening

Before:

image

After:

image