Hiding information of Application in C# from Disassembler
On opening my executable file in MSIL disassemb开发者_开发技巧ler it shows information of my application(like literals, function, properties, resources,...) even after I assigned them private.
How can I hide these information from disassembler.
You want to look for an obfuscation solution. Remember that while private members cannot be accessed by other code, they still do exist. However, obfuscation can make it more difficult to discern what your code is doing.
An obfuscater. The information will still be there but the names will be nonsense designed to be as confusing as possible.
Generally speaking you can't. Your best bet if you are worried about someone reverse engineering your code is to consider the following techniques:
- Obfuscate the code
- Assembly encryption (Note: I have no experience or working knowledge of this or the details of how it works).
- Compile to a native assembly instead of a MSIL assembly.
The last option pretty much defeats the purpose of .NET assemblies however it will be much harder to reverse engineer from the native assembly to C# code than from MSIL to C#. The reality is though that if someone has your DLL(s) then given enough effort and/or time the original (or fairly close) source can be developed.
精彩评论