Resource Encryption

Babel Obfuscator offers the capability to compress and encrypt embedded resources, providing both resource protection and reducing the overall size of the assembly. When resources are encrypted, they remain securely stored within the assembly and are loaded dynamically at runtime when required.

Encrypting embedded resources can safeguard sensitive information and valuable assets from unauthorized access. This is particularly useful when dealing with resources in WPF applications, as it prevents tools like .NET Reflector from inspecting and extracting these resources.

Command Line

Enabling resource compression can be achieved through the command line by using the following option:

babel MyApp.exe --resource compress=on --resource encrypt=on

It's important to note that while resource compression can help save disk space, it may result in a slight increase in the application's startup time due to the need for resource decompression.

MSBuild Babel Task

<PropertyGroup>
   <ResourceEncryption>compress=true;encrypt=true;true</ResourceEncryption>
</PropertyGroup>

<Babel ResourceEncryption="$(ResourceEncryption)" />

Babel UI

Resource encryption can be enabled in the Settings panel of the Babel UI by checking the corresponding combo box under the Encryption section. The Resource combo box will allow you to select if managed resources should be compressed and/or encrypted.

It is possible to disable resource encryption and compression for some managed resources using XML rules.

The following XML rule will disable resource encryption for a specific cursor resource that does not need to be protected.

<Rules>
  <Rule name="rule1" feature="resource encryption" exclude="true">
    <Target>Resources</Target>
    <Pattern>Babel.HexEdit.Resources.Cursor.RightArrow.cur</Pattern>
    <Description>Disable Resource Encryption</Description>
  </Rule>
</Rules>

By utilizing resource compression and encryption, you can protect your valuable resources, maintain the integrity of your application, and deter reverse-engineering attempts.

Last updated