Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Managed assemblies are relatively easy to reverse engineer, predominantly because the IL code omitted by the compiler is already very readable but you can read more about that <a href="https://stackoverflow.com/questions/671407/why-is-it-so-easy-to-decompile-net-il-code">elsewhere</a>.</p> <p>A common approach to preventing, or rather <em>attempting</em> to prevent, somebody from reverse engineering a managed assembly is <em>obfuscation</em>. An obfuscator will load meaningful data from the assembly and then make it difficult to read by using a variety of techniques such as scrambling identifiers and replacing string literals with verbose arithmetic functions. </p> <p>The best obfuscator that I have come across, and I deem it the best because it is the obfuscator that I see reverse engineers complaining about the most, is <a href="http://confuser.codeplex.com/" rel="nofollow noreferrer">Confuser</a> (open source). </p> <p>The Confuser UI is based on a somewhat <em>pluggable</em> core API that you can reference from your application to <em>confuse</em> the assembly that your program ommits. I suppose you could copy and credit some of the code in order to obfuscate your string of code in memory but as far as I know you will need to parse the code so that you can identify members and such as where <a href="http://www.mono-project.com/Cecil" rel="nofollow noreferrer">Mono.Cecil</a> (also open source and used by confuser) will be able to identify members and such in your code using the assembly metadata. </p> <p>Obfuscation is <em>okay</em> and will likely protect your assembly from a rookie or lazy reverse engineer if the obfuscator is up to date. Open source tools like <a href="https://bitbucket.org/0xd4d/de4dot/downloads" rel="nofollow noreferrer">de4dot</a> make light work of reversing the effects of popular obfuscators.</p> <p>But remember <em>"protection through obfuscation is no protection at all"</em></p> <h2>Update</h2> <p>In order to obfuscate the code before the assembly is built, you will need a parser that will present to you all of the identifiers and expressions in your code. From there you can work to generate random meaningless names for identifiers and amend the expressions to make as little sense as possible. </p> <p>For example <code>Console.Writeline("Hi")</code> becomes:</p> <p><code>Console.WriteLine("{0}{1}", (char) (36 &lt;&lt; 1), (char) ((26 &lt;&lt; 2) + 1));</code></p> <p>which is very difficult to read. I made that up on the spot and obviously doesn't conform to any algorithm because the bit shifting will likely lose important bits. But like I said before, go check out some other sources for algorithms you can copy and credit. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload