Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Technique:Recognizing code obfuscation/.NET obfuscators

From ReverseEngineering.wiki

Marker attributes, strings, section names and name styles that identify ConfuserEx, Dotfuscator, SmartAssembly, Eazfuscator.NET, .NET Reactor, Obfuscar and KoiVM in a managed assembly, as Detect It Easy and de4dot detect them.

Background: Format:.NET metadata (ECMA-335). Managed obfuscators work on metadata and IL, so the evidence lives in the TypeDef/TypeRef/MemberRef names, string heap, resources and custom attributes. Detectors in this section come from the MIT-licensed Tool:Detect It Easy rule files in db/PE and from the detection logic in de4dot (GPL, read only for what it looks for).

ConfuserEx

Open source (MIT). Protections and their ids from the source: constants (string and number encoding), ctrl flow, ref proxy, resources, anti tamper, anti debug, anti dump, anti ildasm, invalid metadata, compressor, and the renamer (Confuser.Renamer) with modes Empty, Unicode, ASCII, Letters, Decodable, Sequential, Reversible, Debug. Markers: the engine injects an attribute class named ConfusedByAttribute (ConfuserEngine.cs) into the module; the DIE rule reports ConfuserEx when ConfusedByAttribute exists, taking the version from a Confuser v string, and also looks for the string ConfuserEx v in the second section. Modified forks are rule-matched too (a DotNetPatcherPackerAttribute object, and an assembly name starting with a stylized 'protector' text). The compressor appends .cr to the assembly name and wraps the program in a stub with a Main and a Decrypt method plus LZMA decompression (Compressor.cs). Control flow comes in NormalPredicate/ExpressionPredicate and switch/jump manglers: expect switch-based dispatch with state arithmetic. Reference proxy modes are Mild and Strong. Unverified: marker attribute can be removed by users, so its absence is weak evidence.

Dotfuscator (PreEmptive)

DIE reports it when a DotfuscatorAttribute object is present (and few other protector results exist); de4dot looks for a type whose full name is DotfuscatorAttribute as well. The attribute can be stripped by an option; Unverified.

SmartAssembly (Red Gate)

Strings and attributes: Powered by SmartAssembly <a.b.c.d> (version 5.x), Powered by {smartassembly} (1.x to 4.x), and a SmartAssembly.Attributes namespace with PoweredByAttribute. DIE also checks the IL bytes 20ffffff005f175920ffff0000 for 3.x. de4dot names internal classes SmartAssembly.HouseOfCards.Strings, SmartAssembly.Delegates.GetString and SmartAssembly.StringsEncoding.Strings: string encoder classes and a delegate-based call indirection.

Eazfuscator.NET

The DIE rule needs a managed PE whose first section holds the text fefef in its first 1024 bytes and a run of identifiers made of the UTF-8 sequence E2 80 xx (characters from the Unicode General Punctuation block, which render as invisible or blank). So the visible sign is type and member names that look empty in a decompiler.

.NET Reactor (Eziriz)

DIE keys on: a section named .reacto with empty following sections (2.0-2.1); entry-point byte patterns for 2.x to 4.7 native-stub builds; for managed builds, signatures in the first section; names beginning m_ followed by long random text repeated (control flow option), strings $$method0x... (6.5), SuppressIldasmAttribute (anti-ILDASM) and an anti-tamper pattern using BinaryReader plus RSACryptoServiceProvider. A resource named __ is part of the 4.x native-stub rule. Version claims are the rule author's.

Obfuscar

Open-source renamer. DIE has one 1.0 rule: IL bytes 0691066120AA00000061D29C0617580A (a string-hiding or arithmetic loop).

KoiVM

A virtualizing protector (usually combined with ConfuserEx forks). DIE: the text KoiVM or VMEntryRun in the first section. Virtualized methods become calls into a VM runner with an opaque byte array.

Name styles to look for

Invisible Unicode names (Eazfuscator), random Unicode (ConfuserEx Unicode mode), sequential or short ASCII (Letters, Sequential), m_ plus random (Reactor), names that differ only in case. Unverified: decompilers may show duplicate-looking member names for these, since the names differ only in invisible characters.

See also Technique:Recognizing code obfuscation.