Technique:Recognizing code obfuscation
| On this wiki | Facts · Code · Notes · Topics |
|---|
How to tell that code was run through an obfuscator and which one: the shapes native, .NET, Java/Android and JavaScript obfuscators leave behind, with open detection rules as evidence. Recognition only; no removal of license or protection checks.
What this page is for
An analyst who opens a binary or script and sees nonsense wants to know first: is this obfuscation, which tool made it, and which transformations are present. Each tool has a signature (marker attribute, string, section name, name style, code shape). Recognizing it tells you what to expect (an encrypted string table, a dispatcher loop, a string array) and which public documentation applies. This wiki documents recognition and the structure of the transformations, not how to defeat licensing or protection checks of commercial products.
Generic transformations
| Transformation | What it looks like | Where documented |
|---|---|---|
| Control-flow flattening | One dispatcher (a loop around a switch on a state variable); every original block ends by assigning the next state | Technique:Recognizing code obfuscation/Native obfuscation patterns |
| Bogus control flow, opaque predicates | Conditions that always go one way, with a never-executed cloned block | same page |
| Instruction substitution | Simple arithmetic and logic replaced by longer equivalent sequences | same page |
| String encryption | Literals gone from the data section; calls to a decrypt stub, or a string array | native page, .NET page, JavaScript page |
| Identifier renaming | Names replaced by short, hex, invisible-Unicode or non-ASCII names | .NET, Java and JavaScript pages |
| Reference proxies / call indirection | Calls routed through generated delegate or stub methods | .NET page |
| Packing / compression of the whole program | Tiny stub plus an encrypted blob | .NET page (ConfuserEx compressor) |
Pages by platform
- Technique:Recognizing code obfuscation/Native obfuscation patterns: Obfuscator-LLVM (flattening, bogus control flow, substitution), Hikari family, obfus.h.
- Technique:Recognizing code obfuscation/.NET obfuscators: ConfuserEx, Dotfuscator, SmartAssembly, Eazfuscator.NET, .NET Reactor, Obfuscar, KoiVM, with the detection rules of Tool:Detect It Easy and the detectors of de4dot. Metadata background: Format:.NET metadata (ECMA-335).
- Technique:Recognizing code obfuscation/Java and Android obfuscators: ProGuard and R8 renaming (Format:ProGuard and R8 mapping file), Allatori and DexGuard at recognition level. Container background: Format:DEX, Platform:Android.
- Technique:Recognizing code obfuscation/JavaScript obfuscator output: javascript-obfuscator string array, rotation, hex identifiers.
Method
- Run a signature identifier (Tool:Detect It Easy) first; its rules are open and name the tool and often the version.
- Look for marker attributes, strings and section names that the tool leaves for its own runtime.
- Look at the name style (see the platform pages).
- Look at one function: dispatcher loop, decrypt-stub calls, or always-true branches.
- Record what you find as facts on the tool page; a mapping file (ProGuard/R8) or a project file (ConfuserEx) is ground truth when you have it.
Caveats
Detection rules are heuristics: a custom fork can change marker names (the DIE ConfuserEx rule has entries for modified forks), and one assembly can carry several tools' marks. Unverified: version ranges given by rules are the rule authors' claims, not tested by this wiki.
Topics
- Native obfuscation patterns — What compiler-level obfuscation of native code looks like in a disassembler: Obfuscator-LLVM control-flow flattening with a switchVar dispatcher, bogus…
- .NET obfuscators — Marker attributes, strings, section names and name styles that identify ConfuserEx, Dotfuscator, SmartAssembly, Eazfuscator.NET, .NET Reactor, Obfuscar and…
- Java and Android obfuscators — Recognition notes for Java and Android obfuscation: ProGuard/R8 renaming and its mapping file, plus what is and is not documented for Allatori and DexGuard.
- JavaScript obfuscator output — What output of javascript-obfuscator looks like: a string array, a rotation function run at start, accessor wrappers, hexadecimal identifiers, and the option…
Code & repositories
- https://github.com/yck1509/ConfuserEx @
3e3e4ae8ef01e3a169591e9b7803408e38cce7ca· license: MIT (read from LICENSE; GitHub's detector did not classify it)
ConfuserEx .NET obfuscator (MIT): protections, renamer modes, ConfusedByAttribute
Tested on: source read, not run: source read · checked 2026-10-18; archived; last activity 2019-05-14; Note: the latest release ships binaries; the wiki links only the source, never the binaries - https://github.com/javascript-obfuscator/javascript-obfuscator @
67005e2b6ee9e3e48592f964a28e3e8fa9aa9111· license: BSD-2-Clause
javascript-obfuscator (BSD-2): option reference for string array, rotation, flattening
Tested on: source read, not run: README read · checked 2026-10-18; last activity 2026-10-04 - https://github.com/horsicq/Detect-It-Easy @
bf13be3ec2d0a0751526f3a1acd07c904e7d0113· license: MIT (read from LICENSE; GitHub's API was busy)
Detect It Easy (MIT): db/PE protector rules for .NET obfuscators and obfus.h
Tested on: source read, not run: rule files read · checked 2026-10-18 - https://github.com/obfuscator-llvm/obfuscator @
42f732c274e7cf9d7ddf2097bfc181de7587147e· license: NCSA (declared by the contributor for the files used; GitHub reports MIT (read from LICENSE.TXT; GitHub's API was busy) for the repository)
Obfuscator-LLVM; the passes (flattening, bogus control flow, substitution) are on the llvm-4.0 branch
Tested on: source read, not run: source read · checked 2026-10-18 - https://github.com/de4dot/de4dot @
b7d5728fc0c82fb0ad758e3a4c0fbb70368a4853· license: GPL-3.0-or-later (declared by the contributor; GitHub's detector did not recognize COPYING)
de4dot (GPL): .NET deobfuscator; only its detection logic per obfuscator was read
Tested on: source read, not run: source read · checked 2026-10-18