E
E
estry2020-11-18 20:59:51
C++ / C#
estry, 2020-11-18 20:59:51

How to obfuscate code in dll?

Hello.
I am compiling my lib and I want to make sure that it cannot be decompiled (either so that after decompilation there is simply no code in the output, or so that it gives an error during decompilation at all). Are there any tools for this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Korotenko, 2020-11-18
@estry

There is an obfuscator community edition in the standard distribution.
But you need to understand that any obfuscation will only increase the time for decompiling.

B
basrach, 2020-11-19
@basrach

when decompiling gave an error

It's impossible. The IL contained in the .dll, with the exception of syntactic sugar, is almost 1:1 consistent with C# language constructs. IL stores almost all the necessary information about the source code. And this is not easy - it needs a CRL, otherwise the runtime will not be able to execute the code.
You can only hinder reverse engineering to some extent by obfuscating the flow of execution, or by replacing all the names of classes, methods, etc. with random strings. But it will save only from schoolchildren, for a sufficiently qualified specialist it will add an hour or two of work and that's it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question