Home - Forums-.NET - Spices.Net - Silverlight and obfuscation

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

Silverlight and obfuscation
Link Posted: 29-Mar-2008 20:41
Is obfuscating Silverlight application supported?
(I tried with evaluation version and it displayed 'Token' error at the end.)

If not are you planning to support in the near future?

Thanks
Link Posted: 30-Mar-2008 05:10
Yes, obfuscation of Silverlight assemblies is supported, but you should to avoid public/serializable members obfuscation.
Try to use ObfuscationOptions.Members = DefaultImproved / KeepsSerialization modes.
Or you can send us your assembly for analysis. in this case we can provide you with recommendations how to obfuscate your assembly effectively.
Link Posted: 31-Mar-2008 01:10
Thank you for the information.  

I must say it is very impressive product. Definitely looking into obtain license in next couple of month.

Thanks!
Link Posted: 31-Mar-2008 06:15
I tested with KeepSerialization option as you suggested.

I tested with 6 assemblies that are needed to be cross obfuscated and I am getting 10+ error message that all look like the same type error.

Unfortunately I am not in a position that I can send you assembly files.

But just wondering if you could tell me what this error means?
Basically all the errors I got are related to in combination of generic & interface.

[MD] Error: TypeDef: ....+GetObjects>d__3 is marked Nested but has namespace: , token=0x020000ea.
Link Posted: 31-Mar-2008 06:20
Don't worry about this warning. That warning just lets you know about some incorrectness in metadata (usually nested classes have no namespace declaration in metadata, but nested generic classes since .Net 2.0 have it). But that incorrectness isn't affecting on behavior of your code.
Link Posted: 31-Mar-2008 14:49
Hi Thanks again. I will just ignore the warning.

As I mentioned I have total 6 project files.
I just added new Silverlight library project and simply referenced the other 6 projects.
In that new project file, I put below at the begining of the csproj file.



and also below near the end of the file.

  
          InputFiles="$(TargetDir)My*.dll"
      Options_Members="KeepsSerialization"
      Options_Naming="NonDisplayable"
      Options_Anonymizer="Minimum"
      Options_MixDictionary="true"
      Options_StringEncryptionMode="Encrypt3DES"
      Options_antiILDASM="True"
      OutputPath="$(TargetDir)Obfuscasted\"
      SearchPaths="C:\Program Files\Microsoft Silverlight\2.0.30226.2"/>
  


It seems AfterBuild dosn't do anything. I have nNo error message, no warning, and no output.
Could you please tell me what I am doing wrong?
Link Posted: 01-Apr-2008 04:09
Did you remove the xml-comments tags?
For example:
In the following excerpt of .csproj:

you should remove the

in the end of that excerpt.
Link Posted: 01-Apr-2008 21:31
Yes. Infact I removed the place holder comment block before I cut and pasted AfterBuild element from your documentation.

I am not color blind

So you don't see any problem with properties and values etc in the AfterBuild task element?

If I specify Input files to something like "My*.dll" will that then cross obfuscate all the matching assemblies?
(Not specified in doc)

I wonder if this is related to Silverlight project file...  
Do you think this has anything to do with below line?  


I am not expert on MSBUILD.
thank you for your help
Link Posted: 02-Apr-2008 03:54
So you don't see any problem with properties and values etc in the AfterBuild task element?

No problem. We've reproduced that situation, and not found something special, excluding xml-comment flag.

If I specify Input files to something like "My*.dll" will that then cross obfuscate all the matching assemblies?
(Not specified in doc)

You should specify list of dll's (separated by ";") or Spices.Project here. Wildcards symbols aren't supported here.

Do you think this has anything to do with below line?


This line imports list of tasks especially designed for SilverLight, that you can use here.
Link Posted: 02-Apr-2008 12:11

You should specify list of dll's (separated by ";") or Spices.Project here. Wildcards symbols aren't supported here.


Thanks that must be the reason!