Dotfuscator Quick Start Guide

Quick Start with the Standalone Dotfuscator GUI

This section shows you how quick and easy it is to obfuscate your first assembly using Dotfuscator's standalone GUI.

If you prefer to get started with Dotfuscator's Visual Studio integration, then go here.

You will learn how to configure a project that uses basic yet powerful features including Renaming, Control Flow, Removal, and String Encryption to obfuscate and protect your application. The settings you use here will be suitable for providing protection in most use cases.

For a complete guide to Dotfuscator's User Interface, see the Graphical User Interface Reference in the Dotfuscator User Guide.

Note: This page will describe obfuscating the GettingStarted.exe sample assembly that ships with Dotfuscator. You can, of course, follow the same instructions with your own assembly.

Step 1: Create a Dotfuscator Project for Your Assembly

Launch Dotfuscator

To open the standalone GUI, open the Start Menu or Start Screen and select Dotfuscator Professional Edition.

You can also open dotfuscatorUI.exe from its installation location.

Select the assembly to obfuscate

  • In the Input tab, click the open directory icon to Add new input.
  • Click Browse... and go to the location of the input assembly:
    C:\Program Files (x86)\PreEmptive Solutions\Dotfuscator Professional Edition 4.x\samples\cs\GettingStarted\bin\Debug
  • Select GettingStarted.exe.
  • Click Open and then OK.
  • The path to the executable populates the list box under Input Files.

Save the Project

  • Using Windows Explorer, create a directory in a familiar location to store Dotfuscator configuration and output.
  • Select File | Save Project to save the project
  • In the Save Project As dialog, navigate to the created directory.
  • In the File Name field, enter Dotfuscator.xml and click Save.

As you can see, the location of the configuration file is independent of the location of the input files. In this case, we've chosen a different location because most users do not have write permissions to the Dotfuscator install directory without running as an Administrator.

Note: The path to the configuration file can be used in the configuration itself via the ${configdir} variable. For instance, the default assembly output location is ${configdir}\Dotfuscated.

Step 2: Configure the Project

You could build the project now, and you would already get a certain amount of protection by default:

  1. Renaming (in Library Mode)
  2. Control Flow

The instructions in this section will add additional layers of protection:

  1. String Encryption
  2. Removal/Pruning

...and will improve the strength of Renaming:

  1. Enable Enhanced Overload Induction
  2. Disable Library Mode

Turn On High-level Features

  • Click the Settings tab and select Global Options
  • In the Feature section, set the following values to "No"
    • Disable String Encryption
    • Disable Removal

Note: Setting these "Disable [Feature]" values to "No" will actually turn the features on!

Configure Renaming

Click the Rename tab and then the Options sub-tab. Check Use Enhanced Overload Induction. With this feature enabled, Dotfuscator extends Overload-Induction™ by allowing a method’s return type or a field's type to be used as a criterion in determining method or field uniqueness.

Configure String Encryption

Click the String Encryption tab. String Encryption is inclusion-based; therefore, you must mark the assembly's checkbox at the root of the tree shown in the left pane to include all methods in the input assembly.

Turn Off Library Mode

By default, Dotfuscator not rename or remove anything that could be accessed from outside that assembly. If, however, you don't need other assemblies to access your assembly, or if you are assembling both the library and consumers of the library together in the same Dotfuscator project, you will likely want to turn off Library Mode to get more powerful protection (especially more extensive renaming).

  • Go to the Input tab
  • Expand the tree of options under your assembly
  • Uncheck Library

Step 3: Build the Project

  • Click on the Settings tab and select Build Settings. The Destination Directory field is populated by default as: ${configdir}\Dotfuscated. This means the obfuscated assemblies will be placed in a subdirectory named Dotfuscated in the directory you created in Step 1 (the directory where the configuration file is saved).
  • The project is ready to be obfuscated. Click the Build Project button (the green play button) on the toolbar. Wait a few moments as Dotfuscator builds an obfuscated version of your application.

Once the build completes, your obfuscated assembly is ready to be tested and used!

Optional: Browse the Output

  • Click the Output tab. Now, you can navigate a tree that shows how Dotfuscator obfuscated your code.
  • Expand the root tree and all sub-trees. Notice the blue diamond shaped icons. These are the renamed methods and fields. The parents of each of these icons display their original names. Dotfuscator has renamed each method and field to make it almost impossible to decipher the purpose of each method. This severely impacts the process of reverse engineering the code.

  • Notice the highlighted SaySomething and set_Name methods, as well as the Name property. Dotfuscator determined these items are not used in this application. As a result, Dotfuscator's Removal feature is able to remove them, resulting in a more compact application.
  • If, while looking at your own obfuscated assembly, it does not seem like enough things were renamed, consider whether you can turn off library mode if you haven't already.

Optional: Commonly-used Convenience Features

  • Click the Settings tab and select Global Options.
    • In the General section, set the Build Progress property to Verbose. This causes Dotfuscator to provide additional information about its progress during execution at the bottom of the build tab.
    • In the Advanced section, Set the Emit Debugging Symbols to JIT Optimization; Sequence Points from PDB. Setting this property tells Dotfuscator to create a symbol file in PDB format for each output assembly. Debuggers can use these files to provide useful information in a debugging session. Typically, they contain information such as line numbers, source file names, and local variable names. The PDB files are placed in the output directory with the output assemblies.
  • Still on the Settings tab, select Reports | Renaming. Check the Output as HTML checkbox to get a useful report containing Renaming information and statistics on your application. This report will output into the same directory as the Map File. The default location is ${configdir}\Dotfuscated\Map.html.

Learn More

Now that you have successfully obfuscated using the GUI, you can see how to use the command line interface to do the same things. Or, you can examine the obfuscated output assembly in detail and see how effective the obfuscation was.

In the Dotfuscator User Guide:

Dotfuscator Version 4.31.0.6091. Copyright © 2017 PreEmptive Solutions, LLC