Home - Forums-.NET - Spices.Net - VS 2010 Interface Issues...

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

VS 2010 Interface Issues...
Link Posted: 27-Aug-2010 15:50
Hi!

First, I see differences when obfuscating with the Spices.Net IDE and Spices.Net from within the VS 2010 IDE. The statistics are totally different. I don't understand why this is or which one is right. I am using the "same" Spices.Net project file.

Second, the obfuscation from within the VS 2010 IDE copying the obfuscated file to the obj and bin directories, which prevents me from being able to debug my code. I don't see where it set to copy the obfuscated output or why. I'm finding it hard to use the VS 2010 integration becuase of this.

HERE ARE THE RESULTS I'M GETTING:

These are my obfuscation options in the Spices.Net project file:

{Anonymizer=High}{AntiILDASM=CompleteImproved}{StringEncryptionMode=Encrypt3DES}{SoftwareWatermark=IT Retail, Inc.}

When I take my project and run it the the Spices.Net IDE, my final lines of output are:

------------------------------------------------------
Obfuscation Statistics
------------------------------------------------------
Members             Assembly Obfuscation   Percentage
------------------------------------------------------
Namespaces:                7           3      42.86 %
Types:                    25          15      60.00 %
Fields:                   42          39      92.86 %
Methods:                 642         597      92.99 %
Properties:                6           0       0.00 %
Events:                    0           0       0.00 %
ManagedResource:           2           0       0.00 %
AssemblyRefs:             11           0       0.00 %
TypeRefs:                118           0       0.00 %
MemberRefs:              157           0       0.00 %
---------------Anonymizer and Encryption--------------
------------------------------------------------------
Encrypted strings:         -           0
Anonymized methods:        -         614
Method stubs:              -          25
------------------------------------------------------
MetaData Size:         18250       37282     204.28 %
------------------------------------------------------
----End of obfuscation C:\Users\ct\Desktop\New folder\SqlBackUp\bin\Debug\SQLBackup.exe ------------
Assembly C:\Users\ct\Desktop\New folder\Spices_output\SQLBackup.exe skipped from resigning as not signed originally.
Total obfuscated members 654
Finish time:3:06:43 PM
Finish obfuscating project.
Verification of assemblies:
File: C:\Users\ct\Desktop\New folder\Spices_output\SQLBackup.exe has no errors

When I do the same in the VS 2010 (running Spices.Net from within the VS 2010 IDE), my final output lines are:

------------------------------------------------------
Obfuscation Statistics
------------------------------------------------------
Members             Assembly Obfuscation   Percentage
------------------------------------------------------
Namespaces:                4           2      50.00 %
Types:                    10           4      40.00 %
Fields:                   36          36     100.00 %
Methods:                  46          13      28.26 %
Properties:                6           0       0.00 %
Events:                    0           0       0.00 %
ManagedResource:           2           0       0.00 %
AssemblyRefs:             11           0       0.00 %
TypeRefs:                107           0       0.00 %
MemberRefs:              146           0       0.00 %
---------------Anonymizer and Encryption--------------
------------------------------------------------------
Encrypted strings:         -          65
Anonymized methods:        -          29
Method stubs:              -          25
------------------------------------------------------
MetaData Size:         10672       18250     171.01 %
------------------------------------------------------
----End of obfuscation C:\Users\ct\Desktop\New folder\SqlBackUp\bin\Debug\SQLBackup.exe ------------
Assembly C:\Users\ct\Desktop\New folder\Spices_output\SQLBackup.exe skipped from resigning as not signed originally.
Total obfuscated members 55
Finish time:3:40:36 PM
Finish obfuscating project.
Verification of assemblies:
File: C:\Users\ct\Desktop\New folder\Spices_output\SQLBackup.exe has no errors
File C:\Users\ct\Desktop\New folder\SqlBackUp\bin\Debug\SQLBackup.exe updated.
Update files: File C:\Users\ct\Desktop\New folder\Spices_output\sqlbackup.exe copied to C:\Users\ct\Desktop\New folder\SqlBackUp\obj\Debug\SQLBackup.exe
Update files: File C:\Users\ct\Desktop\New folder\Spices_output\sqlbackup.exe copied to C:\Users\ct\Desktop\New folder\SqlBackUp\bin\Debug\sqlbackup.exe

Best regards,
ct
Link Posted: 30-Aug-2010 04:03
Actually I see the difference between these logs.
for example, the second log shows that you've used string encryption.
Link Posted: 30-Aug-2010 08:30
Actually you're correct. That brings up another issue, but I'll list that in a separate post. Additonally, the second question that I had in this post wasn't answered and it's an important one. I'll put it in a separte post as well. I've run the output again, this time making sure that the following was correctly set in both the Spices.Net IDE and the VS 2010 IDE:

{Anonymizer=High}{AntiILDASM=CompleteImproved}{StringEncryptionMode=Encrypt3DES}{SoftwareWatermark=IT Retail, Inc.}

The results actually are "almost" identical, except for the MetaData size. I'm not sure if this is an issue, but you can let me know. You will notice the following difference:

Spices.Net IDE     MetaData Size:         10632       18086     170.11 %
VS 2010 IDE        MetaData Size:         10632       18268     171.82 %

Here is the Spices.NET IDE output:

Spices.Net Obfuscator, 5.8.0.38, 9Rays.Net (c) 2010. All righs reserved
Start obfuscating project: C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SQLBackup.iloprj
Start time:8:17:45 AM

--- Checking consistency ----
Consistency checked successfully.
--- Checking consistency finished ----
---- Start preparing substitutions and excludes ----
---- Finish preparing substitutions (0 items) and excludes (0 items)----
----Start of obfuscation C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SqlBackUp\bin\Release\SQLBackup.exe ------------
--- Start obfuscate types of C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SqlBackUp\bin\Release\SQLBackup.exe
--- Start obfuscate fields of C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SqlBackUp\bin\Release\SQLBackup.exe
--- Start obfuscate methods of C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SqlBackUp\bin\Release\SQLBackup.exe
----Fixup References in C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SqlBackUp\bin\Release\SQLBackup.exe ----------------
File C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SqlBackUp\bin\Release\SQLBackup.exe successfully saved to C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\Spices_output\SQLBackup.exe
C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\Spices_output\SQLBackup.exe size before/after:348160/363520 bytes (ratio=1.04)
----Statistics for C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SqlBackUp\bin\Release\SQLBackup.exe ----------------
------------------------------------------------------
Obfuscation Statistics
------------------------------------------------------
Members             Assembly Obfuscation   Percentage
------------------------------------------------------
Namespaces:                4           2      50.00 %
Types:                    10           4      40.00 %
Fields:                   36          36     100.00 %
Methods:                  46          13      28.26 %
Properties:                6           0       0.00 %
Events:                    0           0       0.00 %
ManagedResource:           2           0       0.00 %
AssemblyRefs:             11           0       0.00 %
TypeRefs:                107           0       0.00 %
MemberRefs:              146           0       0.00 %
---------------Anonymizer and Encryption--------------
------------------------------------------------------
Encrypted strings:         -          65
Anonymized methods:        -          29
Method stubs:              -          25
------------------------------------------------------
MetaData Size:         10632       18086     170.11 %
------------------------------------------------------
----End of obfuscation C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SqlBackUp\bin\Release\SQLBackup.exe ------------
Assembly C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\Spices_output\SQLBackup.exe skipped from resigning as not signed originally.
Total obfuscated members 55
Finish time:8:17:51 AM
Finish obfuscating project.
Verification of assemblies:
File: C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\Spices_output\SQLBackup.exe has no errors
---- Start running AfterProjectObfuscation event ----

C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup>copy "C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SQLBackup\bin\Release\*.pdb"  "C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\Spices_output\"
C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SQLBackup\bin\Release\SQLBackup.pdb
        1 file(s) copied.
Command: AfterProjectObfuscation ["C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\CopyPDB.bat"] args: [] succesfully finished.
---- Finish running AfterProjectObfuscation event ----




Here's the VS 2010 ID output:

Spices.Net Obfuscator, 5.8.0.38, 9Rays.Net (c) 2010. All righs reserved
Start obfuscating project: C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SQLBackup.iloprj
Start time:8:21:42 AM

--- Checking consistency ----
Consistency checked successfully.
--- Checking consistency finished ----
---- Start preparing substitutions and excludes ----
---- Finish preparing substitutions (0 items) and excludes (0 items)----
----Start of obfuscation C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SqlBackUp\bin\Release\SQLBackup.exe ------------
--- Start obfuscate types of C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SqlBackUp\bin\Release\SQLBackup.exe
--- Start obfuscate fields of C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SqlBackUp\bin\Release\SQLBackup.exe
--- Start obfuscate methods of C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SqlBackUp\bin\Release\SQLBackup.exe
----Fixup References in C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SqlBackUp\bin\Release\SQLBackup.exe ----------------
File C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SqlBackUp\bin\Release\SQLBackup.exe successfully saved to C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\Spices_output\SQLBackup.exe
C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\Spices_output\SQLBackup.exe size before/after:348160/363520 bytes (ratio=1.04)
----Statistics for C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SqlBackUp\bin\Release\SQLBackup.exe ----------------
------------------------------------------------------
Obfuscation Statistics
------------------------------------------------------
Members             Assembly Obfuscation   Percentage
------------------------------------------------------
Namespaces:                4           2      50.00 %
Types:                    10           4      40.00 %
Fields:                   36          36     100.00 %
Methods:                  46          13      28.26 %
Properties:                6           0       0.00 %
Events:                    0           0       0.00 %
ManagedResource:           2           0       0.00 %
AssemblyRefs:             11           0       0.00 %
TypeRefs:                107           0       0.00 %
MemberRefs:              146           0       0.00 %
---------------Anonymizer and Encryption--------------
------------------------------------------------------
Encrypted strings:         -          65
Anonymized methods:        -          29
Method stubs:              -          25
------------------------------------------------------
MetaData Size:         10632       18268     171.82 %
------------------------------------------------------
----End of obfuscation C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SqlBackUp\bin\Release\SQLBackup.exe ------------
Assembly C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\Spices_output\SQLBackup.exe skipped from resigning as not signed originally.
Total obfuscated members 55
Finish time:8:21:46 AM
Finish obfuscating project.
Verification of assemblies:
File: C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\Spices_output\SQLBackup.exe has no errors
---- Start running AfterProjectObfuscation event ----

C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup>copy "C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SQLBackup\bin\Release\*.pdb"  "C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\Spices_output\"
C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SQLBackup\bin\Release\SQLBackup.pdb
        1 file(s) copied.
Command: AfterProjectObfuscation ["C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\CopyPDB.bat"] args: [] succesfully finished.
---- Finish running AfterProjectObfuscation event ----

File C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SqlBackUp\bin\Release\SQLBackup.exe updated.
Update files: File C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\Spices_output\sqlbackup.exe copied to C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SqlBackUp\obj\Release\SQLBackup.exe
Update files: File C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\Spices_output\sqlbackup.exe copied to C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SqlBackUp\bin\Release\sqlbackup.exe