PreEmptive logo

Dotfuscator 101

An introduction to PreEmptive's Dotfuscator -C# encryption and .NET obfuscation app security tool

In this blog, we will dive into Dotfuscator as part of our 101 series. We will walk you through what Dotfuscator for .NET does and how it can help protect your projects. 

For those of you who are in the industry and know how this product protects your code, we appreciate your loyalty! If you are not tech-savvy but want to know more about this product, here’s our summary.

What Is Dotfuscator for .NET?

Dotfuscator is a multi-functional tool that combines obfuscation and optimization while shrinking your source code on .NET, Xamarin, and Windows Platform Apps. Basically, it jumbles and encrypts your code, hardening it to prevent theft. 

How Does Dotfuscator Work?

PreEmptive Dotfuscator for .Net provides many layers of protection for .NET users with multiple forms of obfuscation. We like to describe this as constructing the perfect sandwich.

PreEmptive layer 2
  • First we start with the bread, in this case we will call it Renaming. Renaming obfuscation alters the variables and methods, making it difficult to read or scan over to gain access to certain parts of your source code. However, we make things extra difficult for the typical hacker by utilizing Overload Induction™. This renames as many methods as possible to the same name instead of changing one variable one by one. To say the least—this is what makes the “bread” harden at the surface level.
  • Then add the veggies: lettuce (Control Flow) and tomato (String Encryption). Control Flow uses advanced obfuscation by falsifying conditional statements. It destroys the code patterns that decompilers use to recreate source code, resulting in spaghetti logic to confuse anyone who tries to crack the code. Adding the tomato to this (String Encryption) hides all the strings that are present in the user’s assembly. To better explain, the typical hacker will locate string references inside the binary. Usually, if the application is time-sensitive, a message will pop up when time has expired – this is exactly what hackers search for inside the decompiled output, indicating that they are VERY close to stealing your algorithm. Dotfuscator directly addresses this issue by allowing the user to encrypt strings in the most vulnerable part of the source code. 
  • Now comes the choice of meat (Watermarking, Pruning, Linking-Assembly Merging). Watermarking helps track unauthorized copies of the user’s project by embedding copyright information directly into .NET applications without jeopardizing runtime behavior. Pruning takes the work out for you by removing unused types, methods, fields, debugging information, and non-essential metadata from an MSIL file while processing. Dotfuscator Linking-Assembly Merger combines multiple input assemblies into one or more output assemblies, meaning it shrinks your application down alongside pruning and renaming. 
  • Next is the cheese (Tamper Detection & Defense). Dotfuscator injects code that verifies your application’s integrity during runtime. If it detects tampering, it will shut down the application, invoking random crashes. Now, that’s an excellent choice of cheese! 
  • Last but not least are the condiments: mayo (Debug Detection) and mustard (Defense Using Checks). These two are prebuilt into Dotfuscator and can be injected into .NET apps. This allows your app to detect any unauthorized uses, such as debugging or tampering. Don’t be fooled; checks can do more than just the average scanning; they can react, too, for example, exiting the app when tampering is found. 
  • For those who like a little extra to the sandwich, (Shelf Life) is the pickle! Shelf Life is an inventory management function that allows you to embed an expiration date, de-activation, and notification logic into your code! Now, this is what we call the ultimate sandwich! 

When Should You Use Dotfuscator?

Whether you’re a start-up company, freelancer, or an organization developing projects using .NET software, you should use this in the development process (preferably in the beginning stages), even after launches. Data breaches are no longer part of the “new normal”. They are part of everyday scenarios. If you don’t protect your code from the beginning…you will likely become another data breach statistic.

Where Does Dotfuscator work?

Dotfuscator is injected directly into your source code, providing a multi-layered approach through in-app hardening, assessing, and securing where your code is vulnerable.  

Why Should You Use PreEmptive Dotfuscator?

PreEmptive Dotfuscator has been pioneering in-app security since 2003—that’s 19 years in the business! Our clients range from small to large enterprises, including many Fortune 500 companies in different industries, from medical to government agencies. But if you still need more convincing, check out our client list here

More Info

For more information on how to get started, download our free trial. If you need further help, we encourage you to use our resources, found in our navigation bar. We hope this blog has helped you better understand Dotfuscator for .NET.


In This Article:

Try a Free Trial of PreEmptive Today!