1

We have a Installer build server for obfuscate and build installation file for our .Net project.

When developers commit dll files, we want to obfuscate automatically.

But the problem is; sometimes developers are able to obfuscate before committing. If a file is obfuscate 2 times, it causes an error.

For this reason, we need to understand if the incoming file is obfuscated or not.

We are using dotNET_Reactor.Console.exe for obfuscation.

So How can we detect The ".Net assembly" is already ofbuscated.

Thanks in advance.

Edit-Explanation: Thank you for the negative points you gave to such a clear question. (for my previous question)

if you don't understand then let me explain.

I don't know how much more descriptive I can be.

  1. There is a program called Net Reactor.
  2. This program works to Obfuscate .Net Assembly files (duh!)
  3. Once we obfbuscate the file if that was once obfuscated, the file is corrupted.
  4. Therefore, we need to perceive this progmatically.
  5. dotNET_Reactor.Console.exe is Comand Line Interface tool for this.
  6. I can't believe it, I wrote for more explanation for such a clear question.
  7. I think this explanation is an insult to the brains of those here.
Fatih
  • 945
  • 15
  • 26
  • Posting the same problematic question twice won't make the problem go away. Instead of trying to imply that all readers are ... not quite clever, explain what the problem is. What does `Once we obfbuscate the file if that was once obfuscated` mean? That the tool failed altogether and produced a bad file from an un-obfuscated source? Or that the tool produces garbage if run on a file it already obfuscated? That sounds like a tool bug, not something that can be solved by SO readers – Panagiotis Kanavos Jul 28 '20 at 10:45
  • `Therefore, we need to perceive this progmatically.` do you mean *detect*? If the tool itself can't detect it, how do you expect everyone else to know how to do that? In any case, that's a commercial tool. Don't you have support for it? Why don't you ask the author? Have you tried their support form? – Panagiotis Kanavos Jul 28 '20 at 10:52

2 Answers2

1

From Eziris' Support

Hello Fatih,

If you tell .NET Reactor to directly replace the original assembly with the protected one (parameter -targetfile "<AssemblyFileName>") it will create a special file (with file extension .hash). The next time you try to protect the already protected assembly again, .NET Reactor will automatically recognize that the assembly was already protected and closes the process without throwing an exception.

If you require further information, please let me know.

Thank you.

Best regards, -- Denis Mierzwiak Chief Technical Officer

EZIRIZ | www.eziriz.com support@eziriz.com

To summarize; Using the CLI creates an .hash file. This file does not occur in GUI. This .hash file prevents the file from being obfuscated twice.

Fatih
  • 945
  • 15
  • 26
0

There is also a programmatically way to detect if obfuscation is applied to the current assembly:

    class ObfuscationCheck
    {
        internal static bool IsObfuscated()
        {
            return typeof(ObfuscationCheck).Name != "ObfuscationCheck ".Trim();
        }
    }
Eziriz
  • 331
  • 2
  • 5