ConfuserEx is one of the most common protectors used on .NET programs, so learning how to clean ConfuserEx files with de4dot is a skill that pays off quickly. The process is straightforward once you know the steps: prepare a safe copy of the file, run de4dot with the right settings, and check the output before you rely on it. This guide walks through that workflow in order, with the problems you are most likely to meet along the way.
Before You Start
Work on a copy of the protected file, never the only copy. de4dot does not change the original, but keeping a backup means you can retry with different settings without worry. Also confirm that the file is a .NET assembly and that you have permission to analyse it. Cleaning your own programs, or files you are authorised to study, is the right use of the tool.
It also helps to know which protectors de4dot handles well. ConfuserEx sits near the top of that list, and the de4dot supported obfuscators list puts it in context alongside the other protectors you may meet.
Step 1: Set Up a Working Folder
Create a simple folder for the job, for example a folder named clean-test, and place a copy of the protected file inside it. Keep de4dot in a separate folder or in your path, and open a command prompt in the working folder. Short paths without spaces save you from quoting problems later.
Step 2: Run de4dot on the File
The basic command is simple. Point de4dot at the protected file and let it write a cleaned copy:
de4dot yourfile.exe
By default de4dot writes the cleaned file next to the input with a suffix such as -cleaned. Watch the output as it runs: it will name the obfuscator it detected, which should be a ConfuserEx variant. If it reports something else, or nothing at all, stop and check the file before going further.
Step 3: Check the Cleaned Output
- Open the cleaned file in a decompiler or .NET inspection tool and look at the class and method names
- Compare a few methods with the protected version: names should be more readable and control flow less tangled
- Check that strings which were hidden are now visible where you expect them
- Try running the cleaned file if it is safe to do so, to confirm it still behaves correctly
A partial result is common with heavily protected files. Some names may stay scrambled and some methods may still look complex. That does not mean the run failed; it means the protection used options that de4dot can only partly reverse.
Step 4: Fix Common Problems
If de4dot says it could not detect the obfuscator, first confirm the file is really a .NET assembly and not packed with a native packer. If detection works but the output is poor, try a newer de4dot build, since ConfuserEx support has improved over time. If the cleaned file will not run, keep the original safe and compare the two files method by method to find where the cleaning went wrong.
For a fuller look at the flags you can add to a run, de4dot command line options explained covers the options you will actually use, including how output files are named.
Tips for Better Results
- Start with the default settings before trying advanced flags
- Clean one file at a time so you can tell which run produced which output
- Keep notes on the settings that worked for each file, since ConfuserEx configurations differ
- Do not clean files you do not have a right to analyse
Conclusion
Learning how to clean ConfuserEx files with de4dot comes down to a steady routine: copy the file, run de4dot, read its detection output, and check the cleaned result carefully. Most problems come from packed files, outdated builds or layered protection, not from the basic command. With that routine in place, ConfuserEx files become one of the easier cleaning jobs you will do.
Frequently Asked Questions
What command cleans a ConfuserEx file with de4dot?
In most cases the plain command, de4dot followed by the file name, is enough. de4dot detects ConfuserEx itself and writes a cleaned copy beside the original.
Does de4dot change the original ConfuserEx file?
No. de4dot reads the original and writes a separate cleaned file, so the protected file stays untouched.
Why does de4dot say the obfuscator was not detected?
That usually means the file is not a plain .NET assembly, is packed with another tool first, or uses a ConfuserEx variant the build does not recognise.
Can de4dot fully restore a ConfuserEx file?
Often it gets close, but not always. Names that were removed and comments that were stripped cannot be restored, and heavily layered settings may only partly clean.
What do I do with the cleaned file?
Open it in a decompiler or .NET inspection tool to read the restored code, and test it carefully before relying on it for any further work.


