Boppity Bop
Boppity Bop

Reputation: 10463

Is it possible to decompile the whole .NET application?

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?

Upvotes: 7

Views: 3195

Answers (6)

STO
STO

Reputation: 10638

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.

Upvotes: 5

areyesram
areyesram

Reputation: 169

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.

Upvotes: 1

Joel Coehoorn
Joel Coehoorn

Reputation: 415600

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.

Upvotes: 1

VOX
VOX

Reputation: 2923

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.

Upvotes: 1

tster
tster

Reputation: 18237

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.

Upvotes: 1

Justin Niessner
Justin Niessner

Reputation: 245389

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.

Upvotes: 1

Related Questions