6

I know that .NET apps are difficult to protect. I use RedGate Reflector and know that generally speaking you can get source code from many .NET dlls.

however my question is - is it actually feasible to decompile the whole application?

I mean - create a workable VS solution so the pirate can just press F5 and get the exactly same result as if the author on his machine?

Boppity Bop
  • 9,613
  • 13
  • 72
  • 151

6 Answers6

4

Reflector have few plugins that allows to dump assembly into code:

http://www.denisbauer.com/home/reflectorfiledisassembler

http://filegenreflector.codeplex.com/

But I'm not sure that can create a project file.

Mitat Koyuncu
  • 928
  • 8
  • 20
STO
  • 10,390
  • 8
  • 32
  • 32
1

Yes, you simply Export from Reflector and get a complete runnable Project for your assembly. I've done it a couple of times. Usually, I have to migrate the project to my version of VS and some times it requires some minor fixes, but in general it works.

areyesram
  • 169
  • 2
1

For a small application, it is both possible AND feasible. You have to decompile the classes one by one and copy/paste the code into Visual Studio.

For a large application, while possible, it's not really feasible since the copy/paste process becomes extremely tedious.

Justin Niessner
  • 242,243
  • 40
  • 408
  • 536
1

It really depends on what kind of code you are writing. If you use a lot of the new features in C# 3 and above like lambda expressions, automatic properties, and yield, the decompiled source code is not runnable and requires quite a bit of work to get it to compile.

Even without those features though, I have usually experienced at least some problems compiling the decompiled source code of a full winforms application.

tster
  • 17,883
  • 5
  • 53
  • 72
1

I don't think there's anything that fully automates this for an app made up of multiple assemblies, but I can say that it's really not that hard to stitch the pieces together into a solution yourself. Perhaps a bit tedious for a large app, but if you really want to it's certainly doable.

Fortunately, I don't worry about it that much.

Community
  • 1
  • 1
Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
1

There are many obfuscators these days that protect your .NET applications from decompilation. One such obfuscator is http://www.red-gate.com/products/smartassembly/index.htm . They try to make your well structured .NET IL code into spegatti code (which still works) that decompilers cannot generate original code. It's not like 100% sure piraters cannot get the recompilable code but it will not be easy for them to decompile when using obfuscator.

VOX
  • 2,883
  • 2
  • 33
  • 43