Convert Figma logo to code with AI

mkaring logoConfuserEx

An open-source, free protector for .NET applications

2,308
352
2,308
102

Top Related Projects

Open source obfuscation tool for .NET assemblies

An open-source, free protector for .NET applications

2,128

Reads and writes .NET assemblies and modules

6,889

.NET deobfuscator and unpacker.

Quick Overview

ConfuserEx is an open-source, free protector for .NET applications. It is a powerful obfuscation tool designed to make reverse-engineering of .NET assemblies more difficult, helping developers protect their intellectual property and prevent unauthorized access to their code.

Pros

  • Offers a wide range of obfuscation techniques, including name obfuscation, control flow obfuscation, and reference proxy
  • Provides a user-friendly GUI for easy configuration and use
  • Supports both .NET Framework and .NET Core applications
  • Actively maintained with regular updates and improvements

Cons

  • May increase the size of the output assembly, potentially affecting performance
  • Some aggressive obfuscation techniques might cause compatibility issues with certain dependencies or frameworks
  • Advanced configuration options can be complex for beginners
  • Obfuscation is not foolproof and determined attackers may still be able to reverse-engineer the code with enough effort

Code Examples

ConfuserEx is not a code library but a standalone application, so there are no code examples to provide.

Getting Started

As ConfuserEx is not a code library, there's no quick start code. However, here are brief instructions to get started:

  1. Download the latest release from the GitHub repository.
  2. Extract the ZIP file to a desired location.
  3. Run Confuser.CLI.exe for command-line usage or ConfuserEx.exe for the GUI version.
  4. In the GUI, add your project or assembly files.
  5. Configure obfuscation settings using the provided options.
  6. Click "Protect" to start the obfuscation process.
  7. Find the obfuscated output in the specified destination folder.

For more detailed instructions and advanced usage, refer to the project's documentation on GitHub.

Competitor Comparisons

Open source obfuscation tool for .NET assemblies

Pros of Obfuscar

  • Supports a wider range of .NET frameworks, including .NET Core and .NET Standard
  • More actively maintained with regular updates and bug fixes
  • Offers a more extensive configuration system for fine-tuning obfuscation settings

Cons of Obfuscar

  • Less feature-rich compared to ConfuserEx, especially in terms of advanced protection techniques
  • May have a steeper learning curve due to its more complex configuration options
  • Slower obfuscation process, particularly for larger projects

Code Comparison

ConfuserEx configuration example:

<project outputDir="Confused" baseDir="." xmlns="http://confuser.codeplex.com">
  <module path="MyAssembly.dll">
    <rule pattern="true" inherit="false">
      <protection id="anti tamper" />
    </rule>
  </module>
</project>

Obfuscar configuration example:

<Obfuscator>
  <Var name="InPath" value="." />
  <Var name="OutPath" value="Obfuscated" />
  <Module file="$(InPath)\MyAssembly.dll">
    <SkipType name="MyNamespace.MyPublicClass" />
  </Module>
</Obfuscator>

Both tools use XML-based configuration files, but Obfuscar's syntax is more verbose and offers more granular control over obfuscation settings. ConfuserEx's configuration is simpler and more straightforward for basic use cases.

An open-source, free protector for .NET applications

Pros of ConfuserEx (yck1509)

  • More active development and recent updates
  • Larger community and user base
  • Better documentation and examples

Cons of ConfuserEx (yck1509)

  • Less focus on modern .NET frameworks
  • Some reported stability issues with complex projects
  • Slower processing time for large codebases

Code Comparison

ConfuserEx (yck1509):

public static string Encrypt(string input, string key)
{
    byte[] inputArray = UTF8Encoding.UTF8.GetBytes(input);
    TripleDESCryptoServiceProvider tripleDES = new TripleDESCryptoServiceProvider();
    tripleDES.Key = UTF8Encoding.UTF8.GetBytes(key);
    tripleDES.Mode = CipherMode.ECB;
    tripleDES.Padding = PaddingMode.PKCS7;
    ICryptoTransform cTransform = tripleDES.CreateEncryptor();
    byte[] resultArray = cTransform.TransformFinalBlock(inputArray, 0, inputArray.Length);
    tripleDES.Clear();
    return Convert.ToBase64String(resultArray, 0, resultArray.Length);
}

ConfuserEx (mkaring):

public static string Encrypt(string input, string key)
{
    using var aes = Aes.Create();
    aes.Key = Encoding.UTF8.GetBytes(key);
    aes.Mode = CipherMode.CBC;
    aes.Padding = PaddingMode.PKCS7;
    using var encryptor = aes.CreateEncryptor(aes.Key, aes.IV);
    using var ms = new MemoryStream();
    using (var cs = new CryptoStream(ms, encryptor, CryptoStreamMode.Write))
    using (var sw = new StreamWriter(cs))
        sw.Write(input);
    return Convert.ToBase64String(ms.ToArray());
}
2,128

Reads and writes .NET assemblies and modules

Pros of dnlib

  • More focused library specifically for reading, writing, and analyzing .NET assemblies
  • Actively maintained with regular updates and contributions
  • Extensive documentation and examples available in the repository

Cons of dnlib

  • Limited to .NET assembly manipulation, lacking obfuscation features
  • Steeper learning curve for developers not familiar with low-level .NET internals
  • May require additional tools or libraries for complete obfuscation solutions

Code Comparison

dnlib:

ModuleDefMD module = ModuleDefMD.Load("MyAssembly.dll");
foreach (TypeDef type in module.Types) {
    Console.WriteLine($"Type: {type.FullName}");
}

ConfuserEx:

ConfuserParameters parameters = new ConfuserParameters();
parameters.Project = new ConfuserProject();
parameters.Project.Add(new ProjectModule { Path = "MyAssembly.dll" });
ConfuserEngine.Run(parameters).Wait();

Summary

dnlib is a specialized library for .NET assembly manipulation, offering deep analysis and modification capabilities. It's well-maintained and documented but focuses solely on assembly operations. ConfuserEx, on the other hand, is a complete obfuscation solution that includes assembly manipulation as part of its broader feature set. While dnlib provides more granular control over assembly internals, ConfuserEx offers a higher-level API for obfuscation tasks, making it more accessible for developers primarily interested in protecting their .NET applications.

6,889

.NET deobfuscator and unpacker.

Pros of de4dot

  • More actively maintained with recent updates
  • Broader deobfuscation capabilities, handling multiple obfuscators
  • Larger community and more extensive documentation

Cons of de4dot

  • Primarily focused on deobfuscation, lacking obfuscation features
  • May require more technical expertise to use effectively

Code Comparison

ConfuserEx (obfuscation):

var project = new ConfuserProject();
project.Add(new ProjectModule(new ProjectModule.Preset(), "path/to/assembly.dll"));
ConfuserEngine.Run(project).Wait();

de4dot (deobfuscation):

var deobfuscator = new DeobfuscatorInfo();
var options = new DeobfuscatorOptions();
deobfuscator.Deobfuscate("path/to/obfuscated.dll", options);

Summary

ConfuserEx is an obfuscator for .NET assemblies, while de4dot is a deobfuscator. ConfuserEx focuses on protecting code, whereas de4dot aims to reverse obfuscation. de4dot has a more active development cycle and broader deobfuscation capabilities, but it lacks the obfuscation features of ConfuserEx. The choice between the two depends on whether you need to obfuscate or deobfuscate .NET assemblies.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

ConfuserEx

Build status Test status CodeFactor Gitter Chat MIT License

ConfuserEx is a open-source protector for .NET applications. It is the successor of Confuser project.

Features

  • Supports .NET Framework 2.0/3.0/3.5/4.0/4.5/4.6/4.7/4.8
  • Symbol renaming (Support WPF/BAML)
  • Protection against debuggers/profilers
  • Protection against memory dumping
  • Protection against tampering (method encryption)
  • Control flow obfuscation
  • Constant/resources encryption
  • Reference hiding proxies
  • Disable decompilers
  • Embedding dependency
  • Compressing output
  • Extensible plugin API
  • Many more are coming!

Usage

Confuser.CLI.exe <path to project file>

The project file is a ConfuserEx Project (*.crproj). The format of project file can be found in docs\ProjectFormat.md

Bug Report

See the Issues Report section of website.

License

Licensed under the MIT license. See LICENSE.md for details.

Credits

0xd4d for his awesome work and extensive knowledge!