yck1509 / ConfuserEx

An open-source, free protector for .NET applications
http://yck1509.github.io/ConfuserEx/
Other
3.57k stars 1.64k forks source link

debugging obfuscated dll #269

Open mako3551 opened 9 years ago

mako3551 commented 9 years ago

Hi,

I am using confuser ex on obfuscating license dll...it works fine... but I need to debug it by myself sometimes... it is possible to debug obfuscated dll? I am attaching on process from Visual studio 2012 and it crashes on Exception: System.ExecutionEngineException

exception

yck1509 commented 9 years ago

Hi, To debug the ouput, you need to disable the Anti Debug protection.

mako3551 commented 9 years ago

yes I tried that (I deleted all the protections)..but stil the exception is throwned...but when I am obfuscating the dll command line writes warning: Could not find resource type...

commandline

Maybe the exception is throwned because of this warning

yck1509 commented 9 years ago

What settings did you used? Also, you might want to try the latest builds from the CI Server.

mako3551 commented 9 years ago

I am using version v0.5.0

protections

yck1509 commented 9 years ago

You need to set the preset to a lower value, as the Maximum preset includes all protections, including Anti Debug protection.

mako3551 commented 9 years ago

Ok I used this settings and I stil have the smae problem...

protections

yck1509 commented 9 years ago

Anti Debug protection is included in the Minimum preset. In fact, you could keep your previous settings and add a line: "Remove" "anti debug" and it should solve it.

mako3551 commented 9 years ago

I need to add this line to project xml?

yck1509 commented 9 years ago

You could do it like this:

image

mako3551 commented 9 years ago

My settings now:

protections

And it crashes on this:

exception

yck1509 commented 9 years ago

Hi, It doesn't seems to be caused by Anti Debug protection. Does it work outside the debugger?

Gaushick commented 9 years ago

Yes, We can avoid the "ExecutionEngineException" from the obfuscated dll to remove anti-debug mode. It will resolve the issue.

niravparsana94 commented 6 years ago

@mako3551 Did you find any solution?

mako35551 commented 6 years ago

Hi niravparsana94,

no. Situations when I need to debug this dll are very rare, so I decided to let it be. When I need to debug this dll, I need to copy not obfuscated dll to project and start debug.

Pasgaard commented 6 years ago

MAY-02-2018: The following settings will do the trick:

<project outputDir="Obfuscated" baseDir="." xmlns="http://confuser.codeplex.com">
    <module path="YOUR.dll">
        <rule preset="none" pattern="true">
            <protection id="constants" />
            <protection id="ctrl flow" />
            <protection id="ref proxy" />
        </rule>
    </module>
</project>