Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the best way to protect .net source code from decompiling

Tags:

wpf

iam developing WPF product. I want to protect my .net source code from reverse enginering Please advice me

like image 468
Sanjay Sanjay Avatar asked May 13 '11 07:05

Sanjay Sanjay


People also ask

How can you prevent one from decompiling the .NET assembly?

Select only with “Anti IL Dasm” and “Anti Tamper”, that is enough for making it hard enough to reverse engineer for the decompilers. After you click on Done, go to Protect tab and click on Protect button. You can find the protected DLL or EXE in the output directory selected.

How can decompilation be prevented?

You can't prevent it. You can't protect your app from being decompiled, but you can make it much harder to understand decompiled code with tools like proguard . Compiled classes contain variable names, class names, etc. so it's pretty simple to decompile them to get almost original code.

How do I protect a DLL file?

Keep the DLL in a resource and expose it in the file system (under a suitably obscure name, perhaps even generated at run time) only when running. Hide all real functions behind a factory method that exchanges a secret (better, proof of knowledge of a secret) for a table of function pointers to the real methods.

Is decompiling code possible?

It is also not possible to decompile all programs. Furthermore, it is not easy to separate data and code because both are represented similarly in most current computer systems. A type of reverse engineering, a decompiler performs the opposite operations of a compiler.

Can C# be decompiled?

It can reliably decompile any . NET assembly into equivalent C# or IL code. The decompiler supports multiple formats including libraries (. dll), executables (.exe), and Windows metadata files (.

Can DLL files be reverse engineered?

As per my understanding, we can reverse engineer any compiled dll whose source language is a . net language like c#,vb.net. There are many tools availablein the market for obfuscation and prevent reverse engineering of the dll.


1 Answers

You would use an obfuscator. There are a lot of them on the market, just google.
For example, Visual Studio used to ship with the Dotfuscator Community Edition. I never used it, so I can't say anything about its quality.
This blog post shows the possible ways to try to prevent reverse engineering: http://blogs.msdn.com/b/ericgu/archive/2004/02/24/79236.aspx

like image 187
Daniel Hilgarth Avatar answered Nov 15 '22 07:11

Daniel Hilgarth