Posted By

pckujawa on 02/11/10


Tagged

security obfuscate


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

khouser
Priestd09
danfinrud55


Obfuscating .NET code so as to hide implementation details from public view (using BabelObfuscator)


 / Published in: C#
 

URL: http://www.csharp411.com/net-obfuscators/

If you weren't already aware, you can use a product like Reflector.NET to see all of the source code (that's right, the code) of a .NET assembly (DLL, EXE, etc). This is a real problem when your code is proprietary, especially when you might have security implementations in the code. Thus, there is often a need to hide the implementation details - enter obfucation.

There is a article on and list of obfuscators from C# 411 which explains the situation better. From my research, I decided to settle on the free and open source Babel Obfuscator. Part of the decision process was seeing it in action, which is especially easy when you install the Babel add-in for Reflector.

Once you've decided that Babel is for you, the code below automates the process when added to the post-build event of your assembly. The parameters and settings are up to you, but this baseline should do everything you'll need.

  1. "c:\Program Files\Babel\babel.exe" --types --events --methods --properties --fields --stringencrypt $(TargetPath)

Report this snippet  

You need to login to post a comment.