-
-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What's the strongest protection settings without triggering anti-virus false positives? #64
Comments
Hello, in general I'd recommend to enable the protections you want, with the options you want to use. There are lot of protections with different levels of impact on your application. Real world projects always require some tweaking to get working properly, because usually you need to enable and disable the configurations for different parts of your assemblies. As for the protections:
To create the same result every time you can set the seed to a fixed value, but this will not help you with the anti virus application. These applications will always scan your application. You should upload your application to virus total to check if it's detected as virus. In general I recommend to use:
You have to setup the pattern and options so especially the WPF bindings (in case they are written using WPF) are not broken. So you may have to disable it for some classes. Just enabling these protections for everything usually does not result in a working output. So try to disable protections for part of your application where they cause error. That can be done in the So the answer "what is the strongest protection" is very difficult to answer, because it very much depends on your application. Have fun hiding your stuff, |
Hi Martin, I just read your excellent answer on the way out the door for a long weekend and I am very much looking forward to trying your suggestions Tuesday or Wednesday of next week when I am back in the office. I will report back with a post to this thread at that time. Your answer will help a lot of newbies like me who are looking for good advice on this extremely important topic. Thank you! glasgowrob |
Hi Martin, Thank you again for your invaluable advice. I went through all of it today and tried everything, and used a lot of the specific things you suggested with excellent results. Here are a handful of specific comments on your advice and how I used it, in case you have any additional comments on my potentially faulty rationale:
4. I deviated from your list of 7 protections that in general you recommend in 3 ways: 4A. I turned on "AntiDebug", because even though "it's fairly easy using a msil editor to get rid of the code that break the Debuggers", I figure I would keep it turned on if it is better than nothing. Maybe it would stop a couple of my laziest competitors from debugging my application. 4B. I turned on "AntiDump", because I decided that I won't need mini-dumps from my customers' computers. 4C. I turned on "Invalid Metadata" because I am only protecting the main executable of a desktop app, not an assembly that will ever be referenced by another assembly. Is my rationale for my choices faulty in any way? Thank you again for all of the help! glasgowrob |
I am closing this issue because after working with mkaring's ConfuserEx a lot in the last few weeks, I have learned a lot about it and have become more comfortable with my decisions in my previous post and have decided that they do in fact make sense. |
I think use https://github.com/dotnet/runtimelab/tree/feature/NativeAOT will be better for you and should not be triggered by AVs. If you can make at least string encryption work with this, it will be really strong protection. But you'll have to use .NET Core |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hello mkaring, Hello fellow ConfuserEx fans,
I am trying to obfuscate my WPF/C# desktop application as much as possible using mkaring's ConfuserEx, but without triggering anti-virus false positives when I release my beta version in a couple of months.
1. What advice can you give someone like me, who is trying to find a "good balance" between the strongest possible obfuscation and not triggering anti-virus false positives?
2. What protections should I turn off in my .crproj file to accomplish this?
So far I have turned off the following:
Protection 1 I turned off: "anti tamper". Reason: because lots of people (including mkaring) in lots of issues across all 3 ConfuserEx branches have mentioned that "anti tamper" is the worst for anti-virus triggering.
Protections 2 and 3 I turned off: "anti dump" and "invalid metadata". Reason: Because without turning off these 2 protections as well, my exe is unverifiable via PEVerify, which I run using the following command at the Visual Studio 2019 command prompt:
peverify "<File Path to My Obfuscated Exe>"
I've seen some ConfuserEx issues where people suggest making sure that one's obfuscated executable is verifiable, so to accomplish this I had to turn off all 3 protections mentioned above, and avoid any "<argument>" name-value pairs that the ConfuserEx documentation mentions "produce unverifiable modules".
3. Do you think that my choices of turning off the three protections mentioned above ("anti tamper", "anti dump", "invalid metadata") were good ones, or would you recommend turning off a different set of protections?
I hate to turn off "anti tamper" because I love how it removes the code from my methods (!!!) (sorry nosy competitors!) without breaking my application and maybe would stop hackers from being able to remove the licensing code (which I am sure is easy to find somehow), and I hate to turn off "anti dump" and "invalid metadata", because I want the most protection possible.
4. Should I turn off ConfuserEx features that make each build a little different than the last, so that anti-virus companies don't think that each new version is a completely different piece of software with potential for new threats?
Some examples of this include:
renaming changes the names every time
I use "resources" protection, which I think I read in another issue somwhere might produce different results each time, but I am not sure.
Thank you so much!
glasgowrob
The text was updated successfully, but these errors were encountered: