Home - Forums-.NET - Spices.Net - Obfuscation Problems

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 Problems
Link Posted: 29-Oct-2007 07:52
I am encountering problems with obfuscation.  I am using version 5.3.0.0 with these obfuscation properties {Members=Methods, Fields, Parameters}{Anonymizer=High}.  

I do not know how to debug the obfuscated assemblies.  I have a feeling this would help tremendously.  Can you provide me with the steps needed to debug the obfuscated assemblies?

Additionally, here are my main questions and problems:

1.  First, I receive this consistency check.  Can you explain what this message means?

Assembly Application1:Referenced assembly App2 contains in the project but have incorrect version (App2, Version=1.0.2.0, Culture=neutral).


2.  During the verification of assemblies, several errors are produced.  I do not know what they mean or how to fix them.  Can you provide guidance on what the problem is and how to fix it?

[MD] Error: Exception occured on validating TypeDef: Type Token: 0x02000003, Method Token: 0x06000013

[MD] Error: Message:Unknown element type: 74.

[MD] Error: Stack Trace:

Assembly: NineRays.ILOMD, Type: 6.p0, Method: 6.p\\ue 6(System.IO.BinaryReader, 6.pV)

Assembly: NineRays.ILOMD, Type: 6.p0, Method: 6.pS 6(6.1\\u3, System.IO.BinaryReader, Boolean)

Assembly: NineRays.ILOMD, Type: 6.p0, Method: 6.pS 6(6.1\\u3)

Assembly: NineRays.ILOMD, Type: 6.1\\u3, Method: 6.pS 6()

Assembly: NineRays.ILOMD, Type: 6.1\\u3, Method: 6.p\\ue A()

Assembly: NineRays.ILOMD, Type: 6.p0+p, Method: System.String 6(6.ph, 6.p\\ue, Boolean, Boolean, Boolean)

Assembly: NineRays.ILOMD, Type: 6.w, Method: Boolean j()

[MD] Error: Exception occured on validating TypeDef: Type Token: 0x02000009, Method Token: 0x0600004d

[MD] Error: Message:Unknown element type: 74.

[MD] Error: Stack Trace:

Assembly: NineRays.ILOMD, Type: 6.p0, Method: 6.p\\ue 6(System.IO.BinaryReader, 6.pV)

Assembly: NineRays.ILOMD, Type: 6.p0, Method: 6.pS 6(6.1\\u3, System.IO.BinaryReader, Boolean)

Assembly: NineRays.ILOMD, Type: 6.p0, Method: 6.pS 6(6.1\\u3)

Assembly: NineRays.ILOMD, Type: 6.1\\u3, Method: 6.pS 6()

Assembly: NineRays.ILOMD, Type: 6.1\\u3, Method: 6.p\\ue A()

Assembly: NineRays.ILOMD, Type: 6.p0+p, Method: System.String 6(6.ph, 6.p\\ue, Boolean, Boolean, Boolean)

Assembly: NineRays.ILOMD, Type: 6.w, Method: Boolean j()

[MD] Error: Exception occured on validating TypeDef: Type Token: 0x0200000e, Method Token: 0x06000079

[MD] Error: Message:Unknown element type: 74.

[MD] Error: Stack Trace:

Assembly: NineRays.ILOMD, Type: 6.p0, Method: 6.p\\ue 6(System.IO.BinaryReader, 6.pV)

Assembly: NineRays.ILOMD, Type: 6.p0, Method: 6.pS 6(6.1\\u3, System.IO.BinaryReader, Boolean)

Assembly: NineRays.ILOMD, Type: 6.p0, Method: 6.pS 6(6.1\\u3)

Assembly: NineRays.ILOMD, Type: 6.1\\u3, Method: 6.pS 6()

Assembly: NineRays.ILOMD, Type: 6.1\\u3, Method: 6.p\\ue A()

Assembly: NineRays.ILOMD, Type: 6.p0+p, Method: System.String 6(6.ph, 6.p\\ue, Boolean, Boolean, Boolean)

Assembly: NineRays.ILOMD, Type: 6.w, Method: Boolean j()

[MD] Error: Exception occured on validating TypeDef: Type Token: 0x0200004e, Method Token: 0x06000269

[MD] Error: Message:Unable to read beyond the end of the stream.

[MD] Error: Stack Trace:

Assembly: mscorlib, Type: System.IO.__Error, Method: Void EndOfFile()

Assembly: mscorlib, Type: System.IO.BinaryReader, Method: Void FillBuffer(Int32)

Assembly: mscorlib, Type: System.IO.BinaryReader, Method: Byte ReadByte()

Assembly: NineRays.ILOMD, Type: 6.17+\\u16, Method: Int32 R(System.IO.BinaryReader)

Assembly: NineRays.ILOMD, Type: 6.p0, Method: 6.p\\ue 6(System.IO.BinaryReader, 6.pV)

Assembly: NineRays.ILOMD, Type: 6.p0, Method: 6.pS 6(6.1\\u3, System.IO.BinaryReader, Boolean)

Assembly: NineRays.ILOMD, Type: 6.p0, Method: 6.pS 6(6.1\\u3)

Assembly: NineRays.ILOMD, Type: 6.1\\u3, Method: 6.pS 6()

Assembly: NineRays.ILOMD, Type: 6.1\\u3, Method: 6.p\\ue A()

Assembly: NineRays.ILOMD, Type: 6.p0+p, Method: System.String 6(6.ph, 6.p\\ue, Boolean, Boolean, Boolean)

Assembly: NineRays.ILOMD, Type: 6.w, Method: Boolean j()

Verification exception:Unable to read beyond the end of the stream.

Stack trace:Assembly: mscorlib, Type: System.IO.__Error, Method: Void EndOfFile()

Assembly: mscorlib, Type: System.IO.BinaryReader, Method: Void FillBuffer(Int32)

Assembly: mscorlib, Type: System.IO.BinaryReader, Method: Byte ReadByte()

Assembly: NineRays.ILOMD, Type: 6.17+\\u16, Method: Int32 R(System.IO.BinaryReader)

Assembly: NineRays.ILOMD, Type: 6.p0, Method: 6.p\\ue 6(System.IO.BinaryReader, 6.pV)

Assembly: NineRays.ILOMD, Type: 6.p0, Method: 6.pS 6(6.1\\u3, System.IO.BinaryReader, Boolean)

Assembly: NineRays.ILOMD, Type: 6.p0, Method: 6.pS 6(6.1\\u3)

Assembly: NineRays.ILOMD, Type: 6.1\\u3, Method: 6.pS 6()

Assembly: NineRays.ILOMD, Type: 6.1\\u3, Method: 6.p\\ue A()

Assembly: NineRays.ILOMD, Type: 6.p0+p, Method: System.String 6(6.ph, 6.p\\ue, Boolean, Boolean, Boolean)

Assembly: NineRays.ILOMD, Type: 6.pl, Method: 6.pl 6(6.p\\ue, 6.p\\ue)

Assembly: NineRays.ILOMD, Type: 6.p\\ue, Method: 6.pl 6(6.p\\ue)

Assembly: NineRays.ILOMD, Type: 6.w, Method: Boolean j()

Assembly: NineRays.ILOMD, Type: 6.w, Method: Boolean 6(B.n)

Assembly: NineRays.ILOMD, Type: 6.Rm, Method: Void 6(System.String[], B.n, 6.\\u19)

Assembly: NineRays.ILOMD, Type: 6.p0+6, Method: Void 6(System.String[], B.n, 6.\\u19)

Assembly: NineRays.Obfuscator, Type: NineRays.ILOMD.ILOMDProvider, Method: Boolean Obfuscate(NineRays.ILOMD.Options.Project)


3.  When I attempt to execute the obfuscated assemblies, I receive a System.TypeLoadException with the message “Additional information: Error: Signature has invalid calling convention=0x”, which ends any further code execution.  What should I do to fix this?
Link Posted: 29-Oct-2007 10:18
1. First, I receive this consistency check. Can you explain what this message means?

Assembly Application1:Referenced assembly App2 contains in the project but have incorrect version (App2, Version=1.0.2.0, Culture=neutral).

Sorry for incorrect message. This message means that the current project contains assembly App2 that used another assemblies in the project(these assemblies have references to App2), but assemblies referenced to another version of App2.
In other words you've included incorrect version of App2. Please remove this assembly and add App2 with correct version or rebuild your project to refresh references in other assemblies to App2.

2. During the verification of assemblies, several errors are produced. I do not know what they mean or how to fix them. Can you provide guidance on what the problem is and how to fix it?
MD] Error: Message:Unknown element type: 74.

Seems verification procedure couldn't resolve one of the tokens in the assembly. Could you send us this assembly to operatively fix that problem? Please zip your file and change the extension of archive to .zap or .zip.txt before send.
Link Posted: 29-Oct-2007 11:13
Unfortunately, due to contractual obligations, I cannot send you the assembly.  Can you please explain how to debug these problems, so I can attempt to figure it out?

Also, when I attempt to execute some of the obfuscated assemblies, I receive a System.TypeLoadException with the message “Additional information: Error: Signature has invalid calling convention=0x”, which ends any further code execution.  How can I debug and fix this?
Link Posted: 29-Oct-2007 11:21
Unfortunately, due to contractual obligations, I cannot send you the assembly. Can you please explain how to debug these problems, so I can attempt to figure it out?

Please try to use the latest version of Spices.Net, probably that problem is solved in the latest version.
Also, when I attempt to execute some of the obfuscated assemblies, I receive a System.TypeLoadException with the message “Additional information: Error: Signature has invalid calling convention=0x”, which ends any further code execution. How can I debug and fix this?

Seems that problem connected to verification problem, because some type was unknown for Spices.Obfuscator. Could you send us your spices.project to give you recommendation to solve that problem?
Link Posted: 31-Oct-2007 10:27
I am going to try some different obfuscator options and update this post in a day or so.
Link Posted: 31-Oct-2007 11:06
Would better if you send us problem assembly, we guarantee that this assembly will used only for tests and deleted immediately when tests finished.
In that case we can operatively solve your problem.