Home - Forums-.NET - Spices.Net - Obfuscation + Error virtual method + Property in Struct

Spices.Net

NET code security, tools to protect, obfuscate, tamper defense, code and data safety, recover, convert, optimize, explore, browse and analyze .Net software.

This forum related to following products: Spices.Net Suite, Spices.Net Obfuscator, Spices.Net Decompiler

Obfuscation + Error virtual method + Property in Struct
Link Posted: 27-Mar-2009 00:02
Hello,
I'm using the trial version of Spices.Obfuscator version 5.4.6.0 to evaluate its applicability to our projects.
We develop web and winform applications using C# and Visual Studio 2005.

Checking behavior and correctness of our software when obfuscated, I have found a couple of odd things:
1. Obfuscating with Anonymizer:InternalFields=true, declaring a struct with one or more properties defined with simple set/get accessors, when assigning the property value or comparing its value with == operator, I don't get the right value and also in a VS debug session I cannot see the value contained in the property.
The issue disappears if I simply change the struct in a class, or if I set Anonymizer:InternalFields=false

2. Obfuscating with Anonymizer:InternalMethods=true an assembly that contains:
- a BaseClass with a virtual method Foo()
- a DerivedClass, derived from BaseClass, overriding the Foo() method
- the DerivedClass.Foo() method does something and then calls base.Foo()
When executing, declaring an object of type DerivedClass and calling its Foo() method, the BaseClass.Foo() version is called, instead.
The issue disappears if I set Anonymizer:InternalMethods=false

Of course, when the not obfuscated version of assembly is executed the behavior is as expected.

Am I using the obfuscator flags in a wrong way, or is there anything else?
Any ideas?

I can send you a sample application with these patterns, if it can be useful.

Thanks
Nicola
Link Posted: 27-Mar-2009 00:15
It would be wonderful if you send us a sample, this gives us possibility to operatively fix that problem. Please also include your spices.project to analyze combination of obfuscation settings.