User manual
Protect your first assembly, review deployment files, and reuse the same settings in later builds.
Installation and first launch
Download the Windows x64 installer from the download page, install it, and launch Confuser Studio. The installer includes the .NET runtime required to run the app.
The display language follows your Windows settings by default. To change it, select a language in Settings, save, and restart Studio.
The seven-day trial starts on first launch, even without an internet connection. Reinstalling Studio does not reset the trial period.
After the trial expires, you need a paid license to run protection jobs. Open License and updates to check your status and save the PC request file used to purchase a license.
Protect your first assembly
- Prepare the input. Use an unprotected managed IL build of an app you own or are authorized to protect. For .NET 8–11 apps, select the matching managed entry DLL. For .NET Framework apps, select the managed EXE or DLL.
- Add the assembly. In Input assemblies, click Add file or drag the file into Studio. When processing multiple files, move the main assembly to the first row.
- Choose protection. Start with the Balanced protection preset under Protection options. Prepare tests for public APIs and code that uses reflection, UI bindings, or serialization.
- Choose a separate output folder. Under Output location, open Preview deployment files to check which files will be deployed and why others are excluded.
- Run and review the job. Select Start obfuscation under Obfuscation and logs. When it finishes, open the results folder and test the protected app in its target environment.
.NET Framework targets: You can protect apps targeting versions 4.0–4.6.1, but the protected output requires .NET Framework 4.6.2 or later at runtime.
Workspace overview
- Input assemblies
- Review selected files, target frameworks, and input checks.
- Protection options
- Choose a preset or individual transformations. The help beside each option explains its coverage and limits.
- Output location
- Set the output folder, choose deployment files, configure signing, and generate CLI commands.
- Obfuscation and logs
- Start or cancel a job, then review its progress and results.
Use Save or Save as to store your settings in a .cfsprj file. Use Open project to load them again.
Protection options
Under Protection options, enable Project protection and choose a preset or individual features. Open the help beside each option to see what it protects and whether it can slow down execution. After a job finishes, check the private report for what was applied or skipped.
Choose a preset
| preset | Behavior and use cases |
|---|---|
| Recommended protection | Combines basic protection with broader renaming, call hiding, and VM instruction block encryption. Benchmark frequently called methods. |
| Compatibility-first | Applies IL hiding and private-member renaming while preserving field names. |
| Balanced protection | Adds non-public type renaming, string encryption, and control flow obfuscation to Compatibility-first. A useful starting point for a first release. |
| Strong protection | Adds method-body encryption, VM, call hiding, resource encryption, and integrity checks to Balanced protection. Test runtime compatibility and performance. |
| Maximum protection | Adds VM instruction protection, stronger string and resource protection, broader renaming, and integrity checks. Compare features and responsiveness with the original build. |
| Performance-first (body encryption) | Keeps name, string, and method-body protection but disables VM, control flow obfuscation, and call hiding. The first call can still take longer because the method must be restored and JIT-compiled. |
| Custom | Choose the features your project needs and save them in a .cfsprj file. |
Basic protection
| Option | Behavior and checks |
|---|---|
| Rename private members | Renames eligible private methods and fields. Check code that looks up private names by string through reflection. |
| Rename non-public types | Renames eligible non-public types. Names known to be used by WPF/BAML or reflection are preserved. |
| Encrypt strings | Encrypts eligible string literals in code and restores them when first used. Check startup and code paths that load many strings. |
| Obfuscate control flow | Transforms branches and expressions in eligible methods. Benchmark frequently called methods before and after protection. |
| Harden string encryption | Enables string encryption with per-item keys and randomized storage order. The first read of each string may take longer. |
| Encrypt resources | Compresses and encrypts eligible embedded resources. Check that forms, images, and localized resources load correctly the first time. |
| Harden resource encryption | Enables resource encryption with separate keys and authentication data for content and name lists. Measure the first load of large resources. |
| Encrypt method bodies | Encrypts eligible IL method bodies and restores them as dynamic code at runtime. Check compatibility with restricted dynamic-code environments and first-call latency. |
| Hide IL code | Replaces eligible methods' original IL with encrypted, method-bound data. With VM enabled, eligible VM data is bound as well. |
| Virtualize methods (VM) | Converts supported methods to instructions interpreted by the protection runtime. Benchmark hot loops and review which methods were protected or skipped. |
| Check file integrity | Checks protected files at startup and periodically at runtime. Deploy files from the same job together, and apply final code signing after protection. |
| Exit when a monitored debugger runs | Exits the protected app if a monitored debugger or analysis tool, including REA, is already running. Periodic checks also catch tools started later. REA is identified by its official CLI path or a registered SHA-256 hash. |
Advanced protection · Names and metadata
| Option | Behavior and checks |
|---|---|
| Rename internal members | Extends renaming to eligible internal members and members of non-public types. Test reflection and VB.NET form access within the assembly. |
| Rename namespaces | Changes namespaces for types without external name contracts. Check code that stores full type names or discovers plugins by name. |
| Rename parameters and generic type parameters | Renames eligible parameter and generic type-parameter names. Check binding and automation code that reads parameter names. |
| Protect integer constants | Rewrites eligible 32-bit and 64-bit integer constants as expressions with the same value. Benchmark code that uses many such constants repeatedly. |
| Randomize method order | Shuffles method order in type metadata. Check code that relies on the order returned by reflection. |
| Hide more source identifiers | Renames more types, namespaces, and enums, then updates managed references that can be rewritten in the same deployment. Deploy the updated reference files together. |
| Rename EXE form and public types | Renames eligible public and Windows Forms types in the EXE. Test form loading and localization because resource encryption is enabled too. |
| Relax EXE type-name preservation | Relaxes some rules that normally preserve EXE type names. This also enables EXE type renaming and resource encryption, so test serialization, forms, and plugins. |
| Internalize eligible types | Reduces visibility of eligible types while preserving public DLL APIs under the compatibility rules. Check plugins and dependency injection that require public types. |
| Merge eligible private enums | Transforms metadata and uses of eligible private enums. Test saved data and protocols that serialize enum names. |
| Rename fields except those explicitly excluded | Renames eligible fields while preserving fields excluded in source and names protected by compatibility rules. Turn it off to preserve all field names. |
Advanced protection · Methods and VM
| Option | Behavior and checks |
|---|---|
| Hide external calls | Routes eligible calls to external methods through protected proxies. Test call-heavy paths and integrations with external hosts. |
| Hide internal calls too | Extends call hiding to eligible calls within the same assembly. Benchmark paths that frequently call small methods. |
| Protect additional method bodies | Includes supported struct methods and some accessors and constructors in body encryption. Explicit exclusions and name contracts still apply; test value-copy and persistence behavior. |
| Encrypt large method bodies | Raises the per-method instruction limit for body encryption and IL hiding. Compare first-call time for large initialization methods. VM limits are separate. |
| Encrypt compiler-generated methods | Includes eligible methods in compiler-generated closures and helper classes. Test lambdas and event callbacks. |
| Diversify the VM interpreter | Varies interpreter branches and layout on each protection run. VM is enabled too; the runtime may grow larger and repeated calls may run slower. |
| Encrypt VM instruction blocks | Stores VM instruction blocks encrypted and decrypts them when needed. VM is enabled too; call- and branch-heavy methods may run slower. |
| Mask VM numeric values | Masks supported numeric arguments and locals inside the VM. Compare results and execution time in computation-heavy paths. |
| Bind integrity checks to marked VM methods | Adds integrity checks to VM methods marked in source. Execution time depends on whether checks run on first use or every call; VM and integrity checking are enabled together. |
| Obfuscate the protection runtime | Obfuscates eligible code in the protection runtime libraries. Deploy the runtime from the same job and check startup time. |
| Virtualize the protection runtime | Applies VM protection to eligible runtime methods. Runtime obfuscation and method virtualization are enabled too; measure startup and repeated-call time. |
Advanced protection · Integrity and diagnostics
| Option | Behavior and checks |
|---|---|
| Verify signed integrity and deployment bundle | Uses a key generated during protection to verify files and the deployment manifest. Also enables integrity checking. Publisher Authenticode signing is configured separately. |
| Recheck integrity during execution | Adds checks when protected code runs, on top of startup and periodic checks. Checks are rate-limited; test for delays with large files or slow storage. |
| Detect debugging and tampering | Enables attached-debugger detection and file integrity checking together. You can also configure them separately. |
| Exit when a debugger attaches | Exits when a debugger attaches to the protected app. A debugger running in another process alone does not trigger this option. |
| Add ILDASM suppression attribute | Adds a suppression attribute recognized by some disassemblers. It does not prevent all decompilation; evaluate the other protections and test results. |
| Mark the assembly as protected | Adds a marker to the output assembly so later input checks can detect repeat protection. Always use the original build for another protection run. |
Exit when a debugger attaches applies when a debugger is attached directly to the protected app. Terminate the application when a debugger runs can also exit the app during startup or later when a monitored tool is running separately.
The distributed version of Confuser Studio exits at startup if a monitored decompiler or analysis tool is running. Apply “Exit when a monitored debugger runs” when protecting your own app, and it will also exit automatically when one of those tools is detected.
Diagnostics and deployment
| Option | Behavior and checks |
|---|---|
| Generate a private Portable PDB | Creates a Portable PDB matching the protected assembly in the private folder. Source locations are retained where readable input symbols allow it. |
| Generate a private Windows PDB | Creates a classic Windows PDB matching the protected assembly in the private folder. Choose this or Portable PDB generation. |
| Require administrator approval (UAC) | Adds a requireAdministrator manifest to the output Windows EXE. Test its UAC prompt under a standard user account. |
| Wrap as a native EXE | Encrypts a supported managed app and packages it in a native Windows launcher. Managed code and a cache are still used at runtime; check startup, write permissions, and dependencies. |
| Merge selected DLLs before protection | Merges additional selected DLLs into one module using the first file as the primary input, then protects it. Check input order, dependencies, resource conflicts, and runtime behavior. |
| Embed satellite resource DLLs | Embeds eligible culture-specific resource DLLs in the output. Switch languages and check text, images, and forms. |
| Keep renamed identifiers stable across builds | Uses the project's renaming seed to reproduce eligible names when signatures and rules stay the same. Keep the project and the mapping for each released version. |
| Prepare for AOT and trimming | Applies static protection to managed IL before AOT publishing or trimming. Runtime-dependent transforms are limited; review SDK warnings and test the published app. |
| AOT integer VM for marked static methods | Protects eligible static Int32 methods marked in source with a limited integer VM. Coverage differs from regular method virtualization; benchmark repeated calculations. |
Related output options
| Option | Behavior and checks |
|---|---|
| Embed protection files in the output EXE or DLL | Embeds the protection runtime and some dependencies in the selected file. Existing app data and dependencies may still be needed, and the first run needs cache write access. |
| Include existing app deployment files | Copies the protected files and selected dependencies from the existing app. Available when single-file embedding is off. Use Preview deployment files to check the file list. |
| Sign the output code | Signs the protected Windows output with the configured publisher certificate. Before release, review the signing order and checks under Signed output. |
Check compatibility
- JSON and XML serialization, WPF bindings, reflection, and plugin discovery can depend on names. If something breaks, compare the same input using Compatibility-first, then enable additional options one at a time.
- For performance-sensitive apps, measure both the first call and repeated calls before and after VM or body encryption. See the C# and VB.NET examples in the option help when you need to exclude a method.
- Replace all output files from the same protection job together. Then test the app in its target environment as described in Results and deployment.
Exclude selected code from protection
Stronger protection can make some methods slower, both on first use and on repeated calls. You can exclude only the parts where speed or name compatibility matters, such as calculation loops, startup screens, and plugin boundaries, while protecting the rest.
Which code should you exclude?
- For frequently called calculations, rendering, and data processing, compare execution time before and after VM, body protection, call hiding, and control flow protection.
- If startup slows down while strings or resources are loading, measure how long they take to load and exclude only the protection causing the delay.
- Preserve names that reflection, serialization, binding, or plugins look up as strings, including type, field, and method names.
Measure the slowdown or reproduce the compatibility issue, then limit the exclusion to the methods or fields that need it. Unprotected IL and strings may be easier to read in a decompiler.
1. Add an exclusion attribute to the original C# or VB.NET code
Add System.Reflection.ObfuscationAttribute directly above the declaration in the application's source, then rebuild the original project. Declarative protection is enabled by default in a regular Studio project. The attribute is ignored if an older project or CLI configuration sets DeclarativeProtection to false.
using System.Reflection;
namespace MyApp.Services
{
internal static class PriceCalculator
{
[Obfuscation(Exclude = true,
Feature = "ilcodehiding;virtualization;code;calls;controlflow")]
internal static decimal CalculateTotal(decimal unitPrice, int quantity)
=> unitPrice * quantity;
[Obfuscation(Exclude = true, Feature = "strings")]
internal static string StartupLabel() => "Ready";
}
}
Imports System.Reflection
Namespace MyApp.Services
Friend NotInheritable Class PriceCalculator
<Obfuscation(Exclude:=True,
Feature:="ilcodehiding;virtualization;code;calls;controlflow")>
Friend Shared Function CalculateTotal(unitPrice As Decimal,
quantity As Integer) As Decimal
Return unitPrice * quantity
End Function
<Obfuscation(Exclude:=True, Feature:="strings")>
Friend Shared Function StartupLabel() As String
Return "Ready"
End Function
End Class
End Namespace
CalculateTotal excludes only the five listed method protections. StartupLabel excludes string encryption only, so other eligible protections may still apply. List only the features you need to exclude in Feature, then compare execution times before and after.
| Feature | What is excluded |
|---|---|
virtualization;code;ilcodehiding;calls;controlflow | Selectively excludes method virtualization, body encryption, IL hiding, call hiding, and control flow changes. Join only the features you need with semicolons. |
strings | Excludes encryption of string literals in that method. It does not also disable method renaming or body protection. |
renaming | Excludes renaming of that type or member. This setting does not make the method run faster. |
all | Broadly excludes member-level protections that apply to the declaration. It does not turn off application-wide integrity checks or debugger detection. |
2. Preserve required names and compatibility code
Exclude only renaming for a field used by saved data or reflection. Use all only when a specific method must avoid every member-level protection. To exclude a type and its members together, set ApplyToMembers = true on the type attribute.
using System.Reflection;
internal sealed class AppState
{
[Obfuscation(Exclude = true, Feature = "renaming")]
private string persistedId = "";
[Obfuscation(Exclude = true, Feature = "all")]
private static int LegacyInterop(int value) => value + 1;
}
[Obfuscation(Exclude = true, Feature = "renaming", ApplyToMembers = true)]
internal sealed class PluginContract
{
internal string CommandName { get; set; } = "";
}
Imports System.Reflection
Friend NotInheritable Class AppState
<Obfuscation(Exclude:=True, Feature:="renaming")>
Private persistedId As String = ""
<Obfuscation(Exclude:=True, Feature:="all")>
Private Shared Function LegacyInterop(value As Integer) As Integer
Return value + 1
End Function
End Class
<Obfuscation(Exclude:=True, Feature:="renaming", ApplyToMembers:=True)>
Friend NotInheritable Class PluginContract
Friend Property CommandName As String = ""
End Class
When relaxed EXE type-name preservation is enabled, type renaming settings may take precedence over a source attribute that excludes renaming. If plugins or saved data use a type name, turn off that option or add a project exclusion rule and verify the running app.
3. Exclude code in the project when you cannot edit its source
In Studio, open Protection options → Advanced settings and exclusion rules → Full name patterns for types/members to exclude, and enter one pattern per line. A method is matched by its full name, including return type, declaring type, method, and parameters, so wildcards can surround the method as shown. * matches any number of characters, ? matches one character, and matching is case-sensitive.
* MyApp.Services.PriceCalculator::CalculateTotal(*)
A project pattern excludes every protection feature on a matching method. A source attribute is more precise when you need to exclude only selected features. You can enter a type's full name to exclude the whole type, but check that you have not removed protection from more code than intended.
4. Check the result and execution time
- Rebuild the original app in Release after adding the attribute, then rerun protection with the same input and project settings.
- Check the job log and transformation and mapping reports in the private folder to see whether the target method was protected or skipped, and why. An attribute added without rebuilding the original app will not take effect.
- Compare the original, protected, and exclusion-adjusted builds on the same PC. Measure startup, first call, and repeated calls separately; also test the actual UI, saved files, and plugins.
Results and deployment
The deployment folder contains files to distribute. The private folder contains name mappings and transformation reports for your team. A typical job folder looks like this:
Protected-date-time-ID/
deployment/01-App/ Files to deploy
private/01-App.maps/ Name mappings and conversion reports
private/run.json Job settings and run history
- Update the existing app folder: Copy the contents of
deployment/01-Appto the same relative paths. The app may still need its existing configuration, data, and dependencies that were not protected. - Include files from the existing app: Studio places selected dependencies in the deployment folder. Preview the file list and confirm that required settings, native DLLs, and data are present.
- Keep the
privatename mappings for the exact version you deploy. Give customers only the deployment files.
Signing the protected output
An Authenticode signature on the input does not carry over to the protected output. Use Output code signing and Signing settings, or sign the final output separately. Strong-name keys are a separate setting used for assembly references.
CLI and build automation
Use Generate CLI command under Output location to save the project and view PowerShell or CMD commands. Run the example below from the installation folder, replacing MyApp.cfsprj with your project path.
& '.\cli\Confuser.Cli.exe' '.\MyApp.cfsprj' --preview-deployment
& '.\cli\Confuser.Cli.exe' '.\MyApp.cfsprj' --output 'D:\Protected'
& '.\cli\Confuser.Cli.exe' --license-status
--preview-deployment prints input and exclusion details as JSON. --diagnostics adds details when investigating an error. In CI, check the license status and output-folder write access under the build account.
ReadyToRun and Native AOT
Use managed IL built before the .NET SDK publishes ReadyToRun, Native AOT, or a single-file app. For ReadyToRun publishing, the distribution includes build/Confuser.Protection.targets. This integration targets framework-dependent publishing on Windows and disables Native EXE, file embedding, and file integrity options that would conflict with the later publish step.
Licenses and updates
Licensing an offline PC
- On the PC that will run Studio, open License and updates and choose Save a PC request file to create a
.cfsrequestfile. - On an internet-connected device, open LicenseCode and use the request file to buy a license. An activation code will be emailed to the address used for payment.
- On the sales site, choose Download a license file and submit the same request file and activation code.
- Move the downloaded
.cfslicensefile back to the original PC and select Import a license file.
Updates and PC changes
A license is tied to one PC. Replacing the motherboard counts as a new PC. It includes two years of updates from purchase, and you can keep using the last eligible version on the same PC afterward.
Use Check for updates to see which versions you can install. If an update is required, install an eligible version and run the protection job again. You can extend the update period for an existing license on the same PC by one year on the sales site.
Troubleshooting
The input file cannot be protected
For a modern .NET app, select its managed entry DLL rather than the Windows apphost EXE. If the log shows PROTECTED_OR_INVALID_IL, rebuild the original managed IL before applying protection.
The protected app does not start or a feature fails
Check that the required runtime and dependencies are present. Try the same original build with the Compatibility-first preset, then review names used by binding or serialization and the options you changed.
Confuser Studio does not open or closes immediately
Close any monitored debuggers and analysis tools, then start Confuser Studio again. The distributed Studio app has debugger-process detection, so it may be blocked even when the tool is not attached to Studio.
Restore original names in a stack trace
Use Restore stack trace in Studio with the error text and the name mapping for the deployed build. If you have released several versions, select the mapping for the version that failed.
Cannot import the license
Use the request file created on the PC you are activating. If import fails after an update, check whether the new version falls within your update entitlement.
When contacting support, include your Confuser Studio version, target framework, reproduction steps, and relevant logs. Omit private keys and activation codes. Support information