How undebel/nofuserex works
Project Overview
• NoFuserEx is an open‐source deobfuscator designed specifically for handling files produced by ConfuserEx. The tool applies various deobfuscation strategies (such as anti-debugger, anti-dumper, anti-tamper, and several constant decryption mechanisms) to restore the original code logic.
• The README indicates a simple usage model (drag and drop onto the executable) which suggests that it’s a single-executable application with multiple internal modules for different deobfuscation tasks.
• The project is developed in C# (as indicated by solution and project files, e.g., NoFuserEx.sln, .csproj) and utilizes the dnlib library for assembly manipulation.
Key Components from the File Structure
• Main Application Entry Points:
• Program.cs: Acts as the main entry point.
• Options.cs: Likely manages command-line options or configuration setups.
• App.config: Contains configuration settings for the .NET application.
• Core Assembly Management:
• AssemblyManager.cs: Likely handles loading and managing the assemblies.
• MemberCloner.cs and associated utility classes could be responsible for element-level manipulation or restructuring during deobfuscation.
• Deobfuscation Engine:
• The Deobfuscator directory is the heart of the deobfuscation logic.
• DeobfuscatorManager.cs: Coordinates the overall deobfuscation process.
• IDeobfuscator.cs: Defines a common interface for all specific deobfuscation modules.
• Within Deobfuscators, you have multiple files dedicated to certain protection types:
• AntiDebuggerDeobfuscator.cs
• AntiDumperDeobfuscator.cs
• AntiTamperDeobfuscator.cs
• ProxyDeobfuscator.cs
• ResourcesDeobfuscator.cs
• The Constants subdirectory includes several decrypter classes for different types of constant data (e.g., StringDecrypter.cs, IntArrayDecrypter.cs, etc.), emphasizing the specialized handling of constant obfuscation.
• Utilities and Logging:
• Utils.cs: Provides shared utility functions.
• Logger.cs: Likely handles logging system events or errors.
Relationships and Interactions
• The application starts at Program.cs, which initializes required components (loading settings via Options.cs and App.config).
• The AssemblyManager is called to load and manage target assemblies.
• Once an assembly is loaded, the deobfuscation process is coordinated by the DeobfuscatorManager, which iterates over the list of protection types.
• For each protection type, DeobfuscatorManager instantiates and calls specific deobfuscation modules (like AntiDebuggerDeobfuscator, CompressorDeobfuscator, etc.).
• Modules under the Constants folder interact with the main deobfuscation flow to handle decryption of obfuscated constant values.
• Integration with external libraries such as dnlib is crucial for the manipulation of .NET assemblies.
• The Logger component and various Utils facilitate debug, error-checking, and helper operations across the system.