Home - Forums-.NET - Spices.Net - Obfuscation attributes not working?

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 attributes not working?
Link Posted: 05-Jan-2007 14:45
I have a project with a single class I do not want obfuscated, but no matter what I do it still stubs methods.  I've tried the exclusion list, no effect, I've now tried the attributes, still no effect - it stubs the method, here is how I coded it:

[NineRays.Obfuscator.DontStub, NineRays.Obfuscator.DontEncryptStrings, NineRays.Obfuscator.DontAnonymize]
    public void DataPortal_Update()
    {
...etc

I've included the ObfuscatorAttrs.cs from the sdk folder in my project.

Is this not the correct way to do it?

I can zip up the whole project and source files and email it in, it's over 17mb let me know if you want it.

In fact I'm not even sure why my code is failing when it's obfuscated, other similar classes have no issues with stubbed methods, the error I get at runtime is:
System.InvalidProgramException: Common Language Runtime detected an invalid program.
  at GZTW.AyaNova.BLL.NotifyDeliveryLog.LogDelivery(RootObjectTypes RootObjectType, Guid RootObjectID, Int32 EventType, Guid ToUserID, Boolean Delivered, Guid GuidValue, NotifyDeliveryMethods DeliveryMethod, String ErrorMessage, DateTime DeliveryDate)

I don't care at all if this class is obfuscated, it's a simple class for logging to a database, but it's holding up a whole release at this point.
Link Posted: 08-Jan-2007 11:26
Sorry for the long delays with answer.
If you want to exclude members of this class from stubbing and anonymization - please mark mentioned attributes attribute each member that you want to exclude.
If you wan to send us your assemblies for analysis - it is enough to send us your spices.project and original binaries used in spices.project.
Also - please change the extension of the .zip file to .zap or .zip.txt to prceed our mail-hosting.
Link Posted: 09-Jan-2007 07:25
[quote="NineRays"]Sorry for the long delays with answer.
If you want to exclude members of this class from stubbing and anonymization - please mark mentioned attributes attribute each member that you want to exclude.
If you wan to send us your assemblies for analysis - it is enough to send us your spices.project and original binaries used in spices.project.
Also - please change the extension of the .zip file to .zap or .zip.txt to prceed our mail-hosting.


Hello, sorry I thought it was clear in my message that I *did* do exactly what you suggested I should do.  

In any case I've sent in the project and assembly yesterday but not heard back yet.

I'm getting pretty close to a week late with this release at this point because of this one issue, when will someone be providing an answer?
Link Posted: 09-Jan-2007 08:41
Please confirm that you've received my today e-mail, as some e-mail providers block messages from 9rays.net as spam.
Link Posted: 09-Jan-2007 09:21
[quote="NineRays"]Please confirm that you've received my today e-mail, as some e-mail providers block messages from 9rays.net as spam.


I did however there seems to be some confusion, the email didn't respond at all to the original problem it only provided suggestions for performance, nothing about the issue I'm facing.
Link Posted: 09-Jan-2007 09:29
Yes, we've found that NineRays.Obfuscator.DontStubAttribute is not working and work on fix this problem. This problem will solved to the nearest Spices.Net update planned to the end of this week.
But I've analyzed your assembly and found that this assembly contains about 7500 methods. anonymization of this amount of method will significantly increase size of your assembly - I've recommended you to not use all features of Anonymizer.
Link Posted: 09-Jan-2007 09:31
[quote="NineRays"]Yes, we've found that NineRays.Obfuscator.DontStubAttribute is not working and work on fix this problem. This problem will solved to the nearest Spices.Net update planned to the end of this week.
But I've analyzed your assembly and found that this assembly contains about 7500 methods. anonymization of this amount of method will significantly increase size of your assembly - I've recommended you to not use all features of Anonymizer.



Are you aware that the exclude feature does not work either?  This leaves me in a bad situation, I have a product with thousands of features that *are* working obfuscated but one and it's delaying a release that is already approaching a week late.  If neither feature can be used to exclude the class and it's methods in question how about a resolution to the root of the problem which is that I'm getting an invalid program exception on the method and class I mentioned in my direct email?
Link Posted: 09-Jan-2007 09:39
Are you aware that the exclude feature does not work either?

As I've understood - if you use Anonymizer.StringEncryption = true only - your assembly is still not correctly work?
Link Posted: 09-Jan-2007 11:28
[quote="NineRays"]
Are you aware that the exclude feature does not work either?

As I've understood - if you use Anonymizer.StringEncryption = true only - your assembly is still not correctly work?


Don't know yet, I'm very dubious about the level of protection I'm going to get with that, but it takes around 45 minutes to run the obfuscation project and then some time to setup a test station so I'll check it out and report back here.

In fact there is only about 20% of all the methods and classes in most of the assemblies that I need the best protection for.  Ideally I'd like to be able to set a default of no obfuscation or changes and only process the ones that are decorated with the appropriate obfuscator attributes (if they worked).
Link Posted: 09-Jan-2007 13:41
[quote="NineRays"]
Are you aware that the exclude feature does not work either?

As I've understood - if you use Anonymizer.StringEncryption = true only - your assembly is still not correctly work?


Ok, it's tested and now works properly and *is* obfuscated enough for our immediate purposes.  As a bonus it now takes only a few minutes to obfuscate versus 45 minutes previously.

We haven't tested *everything* yet, that will take some time, but the problematic class now functions properly without the invalid program exception.

Thank you for your help.