How can I obfuscate my c# code, so it can't be deobfuscated so easily? [closed]

好久不见. 提交于 2019-11-26 05:32:44

问题


I release a bunch of tools for free, but recently I have began to sell an application, that has private research, and people have been able to get my source code, and one person publically released my entire source. I spent a lot of time on this program, just to have someone crack it, and release my entire source.

How can I go about protecting my program? I have tried HWID, but people are still able to crack it. I know I am limited by C#, but it the most convenient to use. I just need a way to protect my programs from people trying to do this.


回答1:


You could have a look at the many obfuscation tools that are out there, for example the ones mentioned in https://stackoverflow.com/questions/805549/free-obfuscation-tools-for-net (note: question currently unavailable for view).

EDIT: the above linked question has been deleted and thus isn't available for viewing. As a reference here is the list of currently working links posted in the above question extracted with help of some power user:

http://gapotchenko.com/eazfuscator.net
http://orangeheap.blogspot.nl
http://confuser.codeplex.com (succeeded by https://yck1509.github.io/ConfuserEx/) http://ntoolbox.com




回答2:


Well, the problem with languages like C#/Java is that they are generally much easier to de-obfuscate. The way to secure this is generally to put this stuff into a webservice, but you said you couldn't really do that. What about porting specific non-trivial functions over to a language like C, and obfuscate that. Your C# program could then use reflection to make calls to this external/unmanaged dll. It would increase the difficulty for de-obfuscating, but the problem is that if someone wants it bad enough, they can figure it out as it is client-side.

It may be that legal action is the only real solution here, but this is not a site for legal advice, and I am not qualified to give it if it were.

Additionally, this could be a business decision. Consider Making your software open-source and post a donation link. I am also not qualified to give business advice, but this is worth considering. It may actually increase your revenue, not to mention the other benefits that come with releasing open-source software.




回答3:


There's Dotfuscator (http://www.preemptive.com/products/dotfuscator/overview). But the best solution in some cases is to offer what you do as a web site (Software as a Service).

Consider this tool for example to convert VB to C#: http://converter.telerik.com/

Or this tool to format JSON: http://jsonformatter.curiousconcept.com/

This may or may not work for you. I don't know what the nature of the software you're trying to protect is.




回答4:


No, your code needs to contain the information needed to decrypt itself, its an impossible problem to solve.

Your best solution is to put your intellectual property on a server in the cloud that only you have access to. Give your customers a unique login, audit their access to check for abuse, off load as much grunt work onto your customers machines, but keep your algorithms locked into the cloud.



来源:https://stackoverflow.com/questions/19163701/how-can-i-obfuscate-my-c-sharp-code-so-it-cant-be-deobfuscated-so-easily

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!