防止反编译 [英] Prevent Decompiling

查看:125
本文介绍了防止反编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Visual Studio 2017 .net c#中制作了一个PC应用程序,并将其编译为exe。然后我以为我的代码是安全的,因为已经编译,所以没人能看到它,但是当我在.net反射器之类的程序中打开exe时,我可以看到源代码。

I have made an PC app in visual studio 2017 .net c# and compiled it to an exe. And then I thought my code was safe and nobody could see it because it was compiled, but when I open the exe in a program like .net reflector I can see the source code.

有什么办法可以防止这种情况发生?还是保护我免于反编译?

Is there any way I can prevent that? Or protect me against Decompiling??

推荐答案

如果编译为 MSIL (中级语言)。在这种情况下,您需要使用混淆

You cannot prevent decompiling, if you compile into MSIL (intermediate language). In such case you need to use obfuscation

要对该主题进行更深入的讨论,请查看这篇文章 .NET混淆工具/ strategy

For a deeper discussion on the subject check out this post .NET obfuscation tools/strategy

您可以在此处找到类似的讨论

You can find a similar discussion here How can I obfuscate my c# code, so it can't be deobfuscated so easily?

您也可以选择使用 Ngen.exe 用于特定平台-它将绕过IL并生成已编译的处理器特定机器代码,并且从反向的角度来看,这是非常安全的-工程。

You can also opt to generate a native image using Ngen.exe for a specific platform - that will bypass the IL and generate compiled processor specific machine code, and that one is pretty much safe from standpoint of reverse - engineering.

使用a n IL是一种非常常见的设计选择-它具有缺点和优点-主要缺点是在一个平台和多个目标平台上更轻松地支持多种语言,即跨平台 strong>

Using an IL is a quite common design choice - and it has it's drawbacks and benefits - the main ones being easier support of multiple languages on one platform, and multiple target platforms, i.e cross platform

要了解使用IL的一些好处-请检查一下-stackoverflow.com/questions/1926386/…

To get a glimpse of some of the benefits of using IL - check this out - stackoverflow.com/questions/1926386/…

Java还使用一种中间语言-Java字节码-javaworld.com/article/2077233/core-java/bytecode-basics.html

Java also uses an intermediate language - java bytecode - javaworld.com/article/2077233/core-java/bytecode-basics.html

这篇关于防止反编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆