Obfuscating your .NET project DLL / EXE

Print the article

This entry was posted on 11/17/2006 6:13 PM and is filed under Technical.

Quite often, we techie people worry about the stealing and usage of complex DLLs we create. A .NET can easily be de-compiled and regenerated into the project code files. At some point, this may look irreversible. VS.NET comes pre-packed with an obfuscation tool replaces the meaning strings with some non-meaning strings.. that makes it difficult for any person to understand your code.

Here, I show some steps in brief to use Dotfuscator to obfuscate your DLL / EXE.

1. open dotfuscator from VS.NET -> Tools -> Dotfuscator Community Edition

2. When it start, click on "New Project"

3. In the windpow that appears, click new. there give the your project name that you want to obfuscate, and the path where you want to create the project. this should ideally be the project folder itself

4. The click on "Trigger" tab

5. click "Browse". And select your .NET project's DLL or EXE that you want to obfuscate

6. Then click on "Build" tab

7. Under "Destination Directory" provide the path to folder where build output will be stored. This shall ideally be the path to new folder inside your projects DLL / EXE folder.

8. Go to "Rename" tab, and provide "Map Output File" path. This is required. The map file is

an essential piece of information that contains the unambiguous name mappings between the original and unobfuscated names. It is very important to keep this file after you obfuscate your application; without it, you will not be able to easily troubleshoot the obfuscated app. Due to its importance, Dotfuscator will not overwrite an existing map file by default unless you explicitly check the "Overwrite Map file" box. "Check the box".

9. Now click on "Save" icon from shortcut tab, and save the project configuration in the XML folder. It is recommended to save the file in bin folder of your .NET project; because then we can automate obfuscation upon  build/rebuild of our project

10. Finally create your obfuscated DLL ... by either:

 a. clicking on "Play" button on shortcut nav;  OR
 b. going to "Build" tab and click on "Build" Button.

The bottom region shows the build process and output - success or failure.
The output tab shows the new string mapping done by obfuscation.

 

Resources:
1. Help file in dotfuscator
2. http://msdn.microsoft.com/msdnmag/issues/03/11/NETCodeObfuscation/default.aspx

 

 

What did you think of this article?




Trackbacks
Trackback specific URL for this entry
  • No trackbacks exist for this entry.
Comments
    Page: 1 of 1
    • 11/18/2006 12:29 AM sam wrote:
      this is good process to make ur code un-meaningful for hachers. but again, its not a 100% successful method. Small projects can still be hacked, if sum1 spends ample time on the reverse engineered code
      Reply to this
    • 11/18/2006 8:13 PM Music Called Life wrote:
      sam may be right...i needed some way to protect code for one of my clients, who was getting paranoid that someone might be hacking into his code.
      If theres a better way, lets talk it out. Would be happy to share thoughts
      Reply to this

    Page: 1 of 1
    Leave a comment

     Enter the above security code (required)

     Name

     Email (will not be published)

     Website

    Your comment is 0 characters limited to 3000 characters.