如何混淆dll的源代码? [英] How to obfuscate source code of dll ?

查看:430
本文介绍了如何混淆dll的源代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我需要对dll文件中的源代码进行加密或混淆,以防止反向生成以查找代码。现在我怎么能这样做,哪个更好,加密或混淆?



问候。

Hi all,
I need to encrypt or "obfuscate" the source code in a dll file to prevent reverse engeneering to find the code. Now how can I do this and wicth one is better, encryption or obfuscate ?

regards.

推荐答案

加密是指某种修改数据的方法,使其在加密形式下无意义且无法读取。它也必须合理安全,即没有正确的密钥就不能轻易解密。



任何比这更少的东西都会被称为混淆。这是通过某种方式使其无法使用的数据,但不被认为是一种严重的加密形式。



链接:

MSDN:如何使用Visual C#加密和解密文件 [ ^ ]
Encryption refers to some method of modifying data so that it is meaningless and unreadable in it’s encrypted form. It also must be reasonably secure, that is it must not be easily decrypted without the proper key.

Anything less than that will be referred to as obfuscation. This is data that is rendered unusable by some means, but is not considered as a serious form of encryption.

Link for it:
MSDN:How to encrypt and decrypt a file by using Visual C#[^]


加密是不够的,因为密钥需要解密加密的dll / code需要成为dll的一部分,否则.Net运行时将如何理解它。



更好的方法是混淆哪些破坏了它的意图或含义代码通过各种策略,如符号重命名,流混淆,呼叫隐藏等。所以即使代码可以被查看,也无法理解。除了混淆之外,.Net的一些混淆器如删除的商业链接也支持加密(作为附加的安全措施)。
Encryption is not sufficient, since the key needed to decrypt the encrypted dll/code needs to be part of the dll, otherwise how will the .Net runtime understand it.

The better way is to obfuscate which mangles the intent or meaning of the code via various strategies like symbol renaming, flow obfuscation, call hiding, etc. So even if the code can be viewed, it cannot be understood. Some obfuscators for .Net like Removed Commercial Link also support encryption (as an added security measure) in addition to obfuscation.


这篇关于如何混淆dll的源代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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