开发者

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?


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.


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.


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.


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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜