Code Virtualization Obfuscation results in Max CPU?

1k views Asked by At

I am using Eazfuscator.NET to obfuscate my .NET website and to really get good obfuscating want to use the code virtulization option, however when I then try to login to the website that is obfuscated the server cpu spikes to 100% and the page times out, if I turn this obfuscation feature off then the pages work fine but the dll is then more readable.

The option I am using in the AssemblyInfo.cs is as follows:

[assembly: Obfuscation(Feature = "Apply to type *: apply to member * when method or constructor: virtualization", Exclude = false)]

Does anyone know why this may occur and how I can avoid the cpu spike but still have decent obfuscated code?

2

There are 2 answers

0
ogggre On

Please consider the following approaches:

  1. Virtualization of everything is an obvious overkill. Please consider to selectively virtualize important methods only

  2. Usually nobody has access to website code except its authors. Thus obfuscation may not be a requirement for ASP.NET websites

0
Fredou On

the problem with obfuscation is if you have reflection code or code that depend on strict value, you could get into infinite loop, this could be the issue here,

example, if you have, let say, INotifyPropertyChanged the obfuscation will change the property name while the OnPropertyChanged("Name") wont

you have to cherry pick what will be obfuscated to make sure it won't break your code