是否可以将 dll 转换为源代码?
是否可以将 dll 库转换回源代码?
并不是说我想这样做,而是我需要外包我正在编写的软件的一些非关键部分,但我不希望其他人复制我迄今为止拥有的所有内容。
各个dll中的代码并不是完整的代码。我已经设法在库中只包含必要的代码,但我仍然不希望其他人复制我的代码。
我应该担心吗?
Is it possible to convert a dll library back to source code?
Not that I want to do this, but I need to outsource some non-critical parts of a software that I am writing, but I wouldn't want the other guys to copy everything that I have so far.
The code in the respective dll is not the whole code. I have managed to include only the necessary code in the library, but I still wouldn't like the other guys to copy my code.
Should I be worried?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
可能的?是的。
简单的?这取决于。
如果您已经用 .NET 编写了 dll,那么使用 反编译 就很简单了,使用诸如 Reflector,除非您有 混淆了您的代码。
即使这不是 .NET 代码,它仍然是可能的,尽管要困难得多。如果您确实使用现有工具之一来混淆代码,则可能会使事情变得更加困难。
一般来说,如果您将代码(编译或未编译)提供给某人,他们将能够从程序集/字节码中反编译它,即使它被混淆了。
这并不总是容易的,而且通常需要付出太多的努力。这实际上取决于您的偏执程度以及您的代码对第三方的价值。
对于真正坚定的攻击者来说,没有任何保护措施。这可能需要他们数年的时间,但如果他们真正下定决心,他们就会找到答案。
Possible? Yes.
Easy? It depends.
If you have written your dll in .NET, decompilation is a snap, using tools like Reflector, unless you have obfuscated your code.
Even if this is not .NET code, it is still possible, though much more difficult. And you can make things more difficult if you do obfuscate your code with one of the existing tools.
In general, if you give your code (compiled or not) to someone, they will be able to decompile it from the assembly/bytecode, even if it is obfuscated.
This is not always easy, and normally too much effort. It really depends on how paranoid you are and how valuable your code is to the third party.
There is no protection from a truly determined attacker. It can take them years, but if they are truly determined, they will figure it out.
从编译后的代码中恢复源代码的过程称为反编译,它可以通过更好或更坏的方式实现结果取决于程序编写的语言。
为了防止反编译,您可以使用混淆器 它的工作原理是修改二进制文件以使其更难反编译。混淆器使用的技术的一个示例是用无意义的名称(例如,a001、a002...)替换二进制文件中可见的成员名称,从而使反编译的代码变得毫无意义。有些甚至使用关键字来表示这些名称(例如 for、while、...),这样天真的反编译器将生成甚至无法编译的代码。他们还可能使用其他技术,例如加密字符串,以便在查看二进制文件时无法读取它们。
混淆并不是完美的防御。即使您使用混淆,一个足够有才华和坚定的对手也可能能够恢复与您的原始源代码相当相似的东西。
The process of recovering source code from compiled code is called decompilation and it can be achieved with better or worse results depending on the language that the program was written in.
To protect yourself against decompiling you can use an obfuscator which works by modifying the binary to make it harder to decompile. An example of a technique used by an obfuscator is to replace names of members that are visible in the binary with meaningless names (e.g. a001, a002, ...) so that the decompiled code makes less sense. Some even use keywords for these names (e.g. for, while, ...) so that a naive decompiler will produce code that won't even compile. They may also use other techniques such as encrypting strings so that they are not readable when viewing the binary.
Obfuscation is not a perfect defense. A sufficiently talented and determined adversary may be able to recover something reasonably similar to your original source code even if you use obfuscation.
尝试认为你的代码可以被任何人重写,因为一旦你开始在你的项目中聘请承包商,这个想法就会公开。
你拥有而他没有的东西:想办法利用它来做生意。如果你担心他这样做,向他提出保密协议,你就不会有任何疑问了。
所以我对你的建议是不要担心这里的技术。
Try to think that your code can be rewritten by anyone, because the idea will be out in the open once you start to take contractors on your project.
What you have and he doesn't: idea how to make business of it. And if you are afraid that he does, propose NDA to him and you won't have any doubts there.
So my proposal for you is not to worry about tech here.