我如何prevent我的code被盗?我的、prevent、code

2023-09-02 01:53:14 作者:疼已不是一种感觉゛

究竟会发生什么,当我推出一个.NET的exe?我知道C#编译为IL code,我想生成的exe文件只是开始运行并通过IL code给它的发射。但如何?而如何复杂的过程,是吧?

What happens exactly when I launch a .NET exe? I know that C# is compiled to IL code and I think the generated exe file just a launcher that starts the runtime and passes the IL code to it. But how? And how complex process is it?

IL code被嵌入exe文件。我认为它可以从内存中,而不将其写入到磁盘中执行,而普通的exe不是(好吧,是的,但它是非常复杂的)。

IL code is embedded in the exe. I think it can be executed from the memory without writing it to the disk while ordinary exe's are not (ok, yes but it is very complicated).

我的最终目的是提取IL code和写我自己的加密发射至prevent scriptkiddies打开我的code的反射,只是偷我所有的课很容易。好吧,我不能prevent逆向工程完全。如果他们能够检查内存和追赶,当我路过纯IL到运行时则都不会有问题,如果它是一个.NET EXE或没有的那一刻,是什么呢?我知道有几个混淆的工具,但我不想搞糟IL code本身。

My final aim is extracting the IL code and write my own encrypted launcher to prevent scriptkiddies to open my code in Reflector and just steal all my classes easily. Well I can't prevent reverse engineering completely. If they are able to inspect the memory and catch the moment when I'm passing the pure IL to the runtime then it won't matter if it is a .net exe or not, is it? I know there are several obfuscator tools but I don't want to mess up the IL code itself.

编辑:所以现在看来​​,这是不值得尝试我想要的东西。他们将破解它呢?所以,我将寻找一个混淆工具。是的我的朋友们说的太多,这是足以所有符号重命名为毫无意义的名字。而逆向工程不会毕竟那么容易了。

so it seems it isn't worth trying what I wanted. They will crack it anyway... So I will look for an obfuscation tool. And yes my friends said too that it is enough to rename all symbols to a meaningless name. And reverse engineering won't be so easy after all.

推荐答案

如果你绝对坚持加密程序集,可能要做到这一点是把你的程序code到类库组件和加密的最佳方式。这样,你会写一个小存根可执行文件,解密组件到内存并执行。

If you absolutely insist on encrypting your assembly, probably the best way to do it is to put your program code into class library assemblies and encrypt them. You would then write a small stub executable which decrypts the assemblies into memory and executes them.

这是有两个原因一个非常糟糕的主意:

This is an extremely bad idea for two reasons:

您打算要包含在存根加密密钥。如果1337黑客能够有意义地使用你的反射组件,他可以很容易地窃取你的加密密钥和解密自己他们。 (这基本上是模拟漏洞) 在无人问津的1337 code。我很抱歉,但这是爱之深责之切。没有其他人曾经认为任何人的code是因为笔者确实几乎一样有趣。