你从混淆程序中获得的exe速度是否有所不同?

时间:2021-09-06 21:11:35

There are a number of obfuscation programs out there for .Net and I've tried one, my exe seems much slower when obfuscated. Do all obfuscation programs have the same effect or have I chosen a bad one? I'm hoping some are better than others, if you know of a fast one let me know.

有很多针对.Net的混淆程序,我试过一个,我的exe在混淆时似乎要慢得多。所有混淆程序是否具有相同的效果,或者我选择了一个不好的程序?我希望有些人比其他人好,如果你知道一个快速让我知道。

3 个解决方案

#1


8  

Disclaimer: my employer is PreEmptive Solutions, the creator of the Dotfuscator .NET obfuscator.

免责声明:我的雇主是PreEmptive Solutions,Dotfuscator .NET混淆器的创建者。

It can depend on the obfuscator you use and the options you enable in it. I am going to speak from experience with Dotfuscator.

它可能取决于您使用的混淆器以及您在其中启用的选项。我将从Dotfuscator的经验谈谈。

There can be load time and memory footprint improvements of obfuscated assemblies if you use renaming and removal, partly because all/most of your methods, fields, etc are renamed to much smaller names (for example "ThisVeryLongMethodName(SomeVeryLongParameterName)" becomes "a(a)" so you gain some benefit in assembly size and usually with load time. In addition with removal you remove methods, etc. that are never call and again decrease the size of your binaries.

如果使用重命名和删除,可能会对混淆程序集的加载时间和内存占用量进行改进,部分原因是所有/大多数方法,字段等都重命名为更小的名称(例如“ThisVeryLongMethodName(SomeVeryLongParameterName)”变为“a( a)“这样你就可以获得装配尺寸的一些好处,通常还有加载时间。除了删除之外你还可以删除从不调用的方法等,并再次减小二进制文件的大小。

String encryption can adversely affect runtime performance to a slight degree as the strings must be converted back to human readable text at runtime.

字符串加密会对运行时性能产生轻微影响,因为字符串必须在运行时转换回人类可读文本。

If you use any other systems/techniques like Microsoft SLP's secure vm technology to render methods unreadable that will also incur a runtime performance penalty due to the secure vm.

如果您使用任何其他系统/技术(如Microsoft SLP的安全虚拟机技术)来呈现不可读的方法,这也会因安全虚拟机而导致运行时性能下降。

Other obfuscation tools that do not produce managed code assemblies as an output but instead rely on a native code loader to "preprocess" their output can also incur an runtime performance hit (especially at load time).

其他混淆工具不会将托管代码程序集生成为输出,而是依赖于本机代码加载器来“预处理”其输出,这也会导致运行时性能损失(特别是在加载时)。

#2


5  

Obfuscation shouldn't change the runtime performance of your code. If it is then you've got a bad obfuscator that's doing much more than just obfuscating. All obfuscation should do is make your IL hard to read.

混淆不应该改变代码的运行时性能。如果它是那么你有一个糟糕的混淆器,它做的不仅仅是混淆。所有混淆都应该让你的IL难以阅读。

#3


2  

There are different obfuscation methods that tools can use. There are the simple rename methods that should not affect performance in any way. Other methods might change the flow of the code. That could have a negative impact on performance. You might want to check out other obfuscators and try out different settings.

工具可以使用不同的混淆方法。有一些简单的重命名方法不应该以任何方式影响性能。其他方法可能会改变代码的流程。这可能会对绩效产生负面影响。您可能想要查看其他混淆器并尝试不同的设置。

#1


8  

Disclaimer: my employer is PreEmptive Solutions, the creator of the Dotfuscator .NET obfuscator.

免责声明:我的雇主是PreEmptive Solutions,Dotfuscator .NET混淆器的创建者。

It can depend on the obfuscator you use and the options you enable in it. I am going to speak from experience with Dotfuscator.

它可能取决于您使用的混淆器以及您在其中启用的选项。我将从Dotfuscator的经验谈谈。

There can be load time and memory footprint improvements of obfuscated assemblies if you use renaming and removal, partly because all/most of your methods, fields, etc are renamed to much smaller names (for example "ThisVeryLongMethodName(SomeVeryLongParameterName)" becomes "a(a)" so you gain some benefit in assembly size and usually with load time. In addition with removal you remove methods, etc. that are never call and again decrease the size of your binaries.

如果使用重命名和删除,可能会对混淆程序集的加载时间和内存占用量进行改进,部分原因是所有/大多数方法,字段等都重命名为更小的名称(例如“ThisVeryLongMethodName(SomeVeryLongParameterName)”变为“a( a)“这样你就可以获得装配尺寸的一些好处,通常还有加载时间。除了删除之外你还可以删除从不调用的方法等,并再次减小二进制文件的大小。

String encryption can adversely affect runtime performance to a slight degree as the strings must be converted back to human readable text at runtime.

字符串加密会对运行时性能产生轻微影响,因为字符串必须在运行时转换回人类可读文本。

If you use any other systems/techniques like Microsoft SLP's secure vm technology to render methods unreadable that will also incur a runtime performance penalty due to the secure vm.

如果您使用任何其他系统/技术(如Microsoft SLP的安全虚拟机技术)来呈现不可读的方法,这也会因安全虚拟机而导致运行时性能下降。

Other obfuscation tools that do not produce managed code assemblies as an output but instead rely on a native code loader to "preprocess" their output can also incur an runtime performance hit (especially at load time).

其他混淆工具不会将托管代码程序集生成为输出,而是依赖于本机代码加载器来“预处理”其输出,这也会导致运行时性能损失(特别是在加载时)。

#2


5  

Obfuscation shouldn't change the runtime performance of your code. If it is then you've got a bad obfuscator that's doing much more than just obfuscating. All obfuscation should do is make your IL hard to read.

混淆不应该改变代码的运行时性能。如果它是那么你有一个糟糕的混淆器,它做的不仅仅是混淆。所有混淆都应该让你的IL难以阅读。

#3


2  

There are different obfuscation methods that tools can use. There are the simple rename methods that should not affect performance in any way. Other methods might change the flow of the code. That could have a negative impact on performance. You might want to check out other obfuscators and try out different settings.

工具可以使用不同的混淆方法。有一些简单的重命名方法不应该以任何方式影响性能。其他方法可能会改变代码的流程。这可能会对绩效产生负面影响。您可能想要查看其他混淆器并尝试不同的设置。