Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trying obfuscating Dot Net Core applications

I am trying to obfuscate a Dot Net Core application but I am having no success. I am using ConfuserEx, managed to get it to work with a Net Framework, but no luck when trying it out with a Net Core Console Application or Net Core DLL.

I get the error:

Object reference not set to an instance of an object.

Did anyone managed to obfuscate a Net Core application? If not is there any other tool that can do it?

like image 440
lulas Avatar asked Jun 29 '17 20:06

lulas


People also ask

How do I obfuscate .NET exe?

You could use an obfuscation tool, like Dotfuscator or Eazfuscator.NET. Eazfuscator.NET is free, Dotfuscator has a limited Community Edition, but is lacking many of the features available for free in the other product.

What happens when a .NET solution is obfuscated?

Choosing to ignore obfuscating your . NET code, is essentially like leaving the doors to your home unlocked. It doesn't mean your going to be robbed, but in the event someone does want to rob you, you've just made it a lot easier to do.

What is Dot NET Core used for?

ASP.NET Core is a cross-platform, high-performance, open-source framework for building modern, cloud-enabled, Internet-connected apps. With ASP.NET Core, you can: Build web apps and services, Internet of Things (IoT) apps, and mobile backends. Use your favorite development tools on Windows, macOS, and Linux.

What is the purpose of obfuscating code?

Obfuscation means to make something difficult to understand. Programming code is often obfuscated to protect intellectual property or trade secrets, and to prevent an attacker from reverse engineering a proprietary software program. Encrypting some or all of a program's code is one obfuscation method.


1 Answers

You can try Obfuscar. Its free and open source.

Binaries can be loaded at https://www.nuget.org/packages/Obfuscar/

Project sample:

<Obfuscator>
  <Var name="InPath" value=".\" />
  <Var name="OutPath" value=".\output" />

  <Var name="HideStrings" value="true" />
  <Var name="UseKoreanNames" value="true" />
  <Var name="ReuseNames" value="true" />
  <Var name="RenameFields" value="true" />
  <Var name="RenameProperties" value="true" />
  <Var name="RenameEvents" value="true" />
  <Var name="OptimizeMethods" value="true" />
  <Var name="SuppressIldasm" value="true" />
  <Var name="KeepPublicApi" value="false" />
  <Var name="HidePrivateApi" value="true" />  

  <Module file="$(InPath)\YourApplication.dll" />
</Obfuscator>

Running obfuscation:

  Obfuscar.Console.exe your_project.xml
like image 62
Topper Harley Avatar answered Oct 08 '22 13:10

Topper Harley