mkaring / ConfuserEx

An open-source, free protector for .NET applications
https://mkaring.github.io/ConfuserEx/
MIT License
2.33k stars 362 forks source link

Using packer leads to an exception at startup #499

Open rvazarkar opened 2 years ago

rvazarkar commented 2 years ago

Getting the following exception when running an obfuscated file with packer enabled:

Unhandled Exception: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at ?????????????????????????????????????????(Module )
   at ?????????????????????????????????????????(String[] )

Steps to Reproduce:

  1. Build the exe.
  2. Run it.

You can find the crproj here: https://github.com/BloodHoundAD/SharpHound/blob/obfuscation/SharpHound.crproj

I did notice that the compressed exe seems way too small. Using Fody (which I've removed from this branch for testing), the file size is ~1mb, but with packer its 310kb.