Code protection has a vocabulary problem: vendors use the same words for different things, and feature lists assume you already know them. These are the terms you will meet when choosing or using a .NET obfuscator, each in a sentence or two, with a link where there is more to say.
How .NET code is built and shipped
- Assembly
- The compiled unit of .NET code — a
.dllor.execontaining IL and metadata. It is what you ship and what an obfuscator rewrites. - IL (Intermediate Language)
- The instruction set .NET compilers produce, also called CIL or MSIL. It is far closer to source than machine code, which is why it decompiles so well. See how decompilers read your code.
- Metadata
- Tables inside the assembly describing every type, method, field and parameter, including their names. The runtime needs it, so it cannot be stripped — only rewritten.
- JIT (just-in-time) compilation
- The runtime turning IL into machine code as the program runs. Because this happens on the user's machine, the IL has to be shipped.
- NativeAOT
- Compiling a .NET app to machine code ahead of time, with no IL in the output. There is nothing for a .NET decompiler — or a .NET obfuscator — to work on. See single-file, trimming and AOT.
- ReadyToRun (R2R)
- Pre-compiled machine code added alongside the IL to speed up start-up. The IL is still there, so the assembly still decompiles.
- Single-file publish
- Bundling an app and its dependencies into one executable. The assemblies inside are unchanged and easily extracted — it is packaging, not protection.
- IL2CPP
- Unity's backend that converts IL to C++ and compiles it natively. An IL2CPP build has no managed assembly to obfuscate. See Unity game assemblies.
- Strong name
- A signature that gives an assembly a unique identity. Obfuscation invalidates it, so re-sign afterwards.
- Authenticode (code signing)
- A certificate-based signature that tells Windows who published a file and that it has not been altered. Always applied after obfuscation. See the right order.
Reading and attacking code
- Decompiler
- A tool that turns an assembly back into readable C# — ILSpy, dnSpy, dotPeek. See the tools compared.
- Disassembler
- A tool that shows the raw IL instructions rather than reconstructed C#. ILDASM is the one that ships with the .NET SDK.
- Deobfuscator
- A tool such as de4dot that tries to undo known obfuscation patterns. It can restore structure, but never the original names. See can it be reversed?
- Static analysis
- Studying a program by reading its file without running it. Most casual reverse engineering is static, and it is what obfuscation is best at frustrating.
- Dynamic analysis
- Studying a program while it runs, with a debugger or by inspecting memory. Slower and more skilled work, and much harder to prevent on a machine you do not control.
- Patching
- Editing a compiled file to change its behaviour — typically flipping a licence check so it always passes.
- Threat model
- A plain statement of who you are defending against and what they want. It decides which layers are worth turning on. See what obfuscation protects against.
Protection layers
- Obfuscation
- Rewriting a program so it behaves the same but is harder to understand. It raises the cost of reverse engineering; it is not encryption.
- Symbol renaming
- Replacing meaningful type, method and field names with meaningless ones. The base layer. See how it works.
- String encryption
- Storing string literals encrypted so they do not appear in a decompile, and decoding them at runtime. See how it works.
- Control-flow obfuscation
- Reshaping a method's branches and loops into a tangle that runs identically but is hard to follow. See how it works.
- Reference proxying
- Routing calls to external methods through generated stubs so the real target is not visible at the call site. See how it works.
- Method virtualization
- Converting a method into bytecode for a private interpreter embedded in the assembly, so no equivalent IL remains to decompile. The strongest and most expensive layer. See when it is worth it.
- Anti-tamper
- Detecting that a shipped binary has been modified, and refusing to run the altered code. See how it works and its limits.
- Integrity check
- Our focused form of tamper detection: a self-check over virtualized methods, so patching them breaks them. See what it covers.
- Anti-debugging
- Code that tries to detect an attached debugger and react. We do not offer it. See why.
- Packing
- Compressing or encrypting an executable and unpacking it at start-up. A common cause of antivirus false positives.
- Watermarking
- Embedding a hidden, per-customer marker in a build so a leaked copy can be traced to its source. It identifies; it does not protect.
Working with an obfuscated build
- Exclusion
- Telling the obfuscator to leave a specific type or member's name alone, usually because something finds it by name. See how to exclude code.
- Reflection
- Code that inspects or calls types and members by name at runtime. The main reason renaming ever breaks a program. See what breaks and why.
- Rename map
- A file recording which original name became which obfuscated name. It lets you turn an obfuscated crash report back into readable names. See decoding a stack trace.
- Public surface (public API)
- The types and members other assemblies can call. Preserved for a library, renamable for an application. See why the rule differs.
- False positive
- An antivirus scanner flagging a legitimate program as malicious. More likely with packing and aggressive runtime protection than with renaming.
Looking for which of these your project actually needs? The layer decision guide matches each protection to the threat it answers.