ConfuserEx icon indicating copy to clipboard operation
ConfuserEx copied to clipboard

Rename Protection with Dependencies/Costura

Open AkanshDivker opened this issue 5 years ago • 5 comments

I've got a project in which I would prefer using Costura. When confusing my main assembly, either with or without Costura, it fails to load the dependencies of my project. If it's not possible I can live without Costura, but I'm not sure why even just confusing my main assembly causes it to be unable to load its dependencies (same folder).

Output from confused assembly

EDIT:

After some more investigation it seems that I'm getting errors when I try to enable rename protection. Since this is one of the main irreversible protections, I'd appreciate some help figuring out why it's throwing errors on runtime.

Output from confused assembly

AkanshDivker avatar Oct 01 '20 04:10 AkanshDivker

What version of ConfuserEx are you using? Have you tried the latest build from CI? https://ci.appveyor.com/project/mkaring/confuserex/branch/master/artifacts

KvanTTT avatar Oct 01 '20 07:10 KvanTTT

What version of ConfuserEx are you using? Have you tried the latest build from CI? https://ci.appveyor.com/project/mkaring/confuserex/branch/master/artifacts

I was using 1.4.1 but I just tried from CI and I'm getting the same error.

AkanshDivker avatar Oct 01 '20 09:10 AkanshDivker

Issues with the name protection usually come up in case you are using Reflection or another library that relies on reflection heavily (e.g. WPF). I am guessing that could be a problem you are encountering here.

But without more information that is very difficult to say.

mkaring avatar Oct 02 '20 11:10 mkaring

If you are confusing your assembly, consider using il-repack or ilmerge to merge your dependencies into the main assembly, which may provide better protection than Costura which leaves a lot stuff un-renamed in your main assembly.

wmjordan avatar Nov 11 '20 12:11 wmjordan

I've got a project in which I would prefer using Costura. When confusing my main assembly, either with or without Costura, it fails to load the dependencies of my project. If it's not possible I can live without Costura, but I'm not sure why even just confusing my main assembly causes it to be unable to load its dependencies (same folder).

Output from confused assembly

EDIT:

After some more investigation it seems that I'm getting errors when I try to enable rename protection. Since this is one of the main irreversible protections, I'd appreciate some help figuring out why it's throwing errors on runtime.

Output from confused assembly

Im not sure if this will help, but it has definitely confused the assembly for me while using Costura follow these steps

** Even if this doesn't help the OP , maybe it helps someone else looking for a similar solution**

Step 1 : Disable costura by removing the line <Costura IncludeDebugSymbols='true' /> from fodyweavers.xml Step 2 : Compile the project and copy all the dependency DLL's and keep them in a seperate folder. Step 3 : Enable costura again by adding the Step 1 line back again. Step 4 : Copy all dependency dll's back the the EXE folder. Step 5 : Try obfuscating with Beds GUI again. Enjoy Protection!!

TheGameVlog avatar May 07 '21 16:05 TheGameVlog