How Can I Obfuscate My C# Code, So It Can't Be Deobfuscated So Easily? [Closed]

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.

8

You could have a look at the many obfuscation tools that are out there, for example these:

  • (succeeded by and then again by )

  • )

7

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.

There's Dotfuscator (). 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#:

Or this tool to format JSON:

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

2

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.

Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.

Share this article
Twitter Facebook Pinterest