Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to avoid .NET DLL files from being disassembled? [duplicate]

Tags:

c#

I am writing a .NET application (a Windows class library) for implementing the licensing our product.

The problem is that the DLL can be easily disassembled by the MSIL disassembler or any other third-party tools and one can easily break the code.

I have even tried signing the assembly, but still it can be disassembled.

So how do I prevent this?

Is there any tool to available for this?

like image 332
Prasad Avatar asked Dec 01 '09 11:12

Prasad


2 Answers

Check out the answers for this question.
You cannot achieve complete protection, but you can hinder disassembly in ways that make it more difficult for people to succeed at it. There are more ways to do this, some of them detailed in the answers to the question in my link above:

  • Obfuscate your code.
  • Use public/private key or asymmetric encryption to generate product license keys.
  • Use a packer to pack your .NET executable into an encrypted w32 wrapper application.

What I would add would be incremental updating, both for your core functionality and the protection code, so your users will constantly benefit from the new features while making crackers lag behind you in breaking your software. If you can release faster than they can break and distribute your software, you are in gain. Legitimate users will always have technical support and a word to say regarding new features. They are your best market, as the ones who crack your software wouldn't have payed for it anyway.

like image 168
luvieere Avatar answered Nov 15 '22 06:11

luvieere


You can't, but you can use an obfuscator so that it's impossible to make sense out of your code.

For example, have a look at Dotfuscator.

The community edition of this program is included with Visual Studio.

like image 26
Maximilian Mayerl Avatar answered Nov 15 '22 07:11

Maximilian Mayerl