Obfuscation in .net C# RRS feed

  • Question

  • I am new to .net obfuscation. Can anyone please demonstrate obfuscation with a simple example using c#.

    Sunday, June 21, 2009 9:37 PM


  • I'm not sure there's any way to demonstrate obfuscation in C# over a forum.  I do know, however, that there are programs out there that are obfuscated using obfuscators such as Dotfuscator. 

    Try this:

    1. Download Xobni.  It's an Outlook Add-In that's written entirely in .NET code.  You can find it at http://www.xobni.com/.  (By the way, I'm not trying to advertise, this is for the purposes of showing you what obfuscated code looks like.  I used the product for a while, then quit, even though it's not a bad product.)

    2. Download .NET Reflector from RedGate.  You can find it at http://www.red-gate.com/products/reflector/.  Install it as well.

    3. Open Reflector, then go to the file menu -> Open, and select one of the files from the Xobni directory where you installed the application.   Now, browse the assembly.  You'll notice that very few things are understandable.  Most of the class names and variable names have been changed and reduced to things like "a1", "b3", and "cc", etc.  In other words, the disassembled code is entirely unreadable.   Not only that, but particular algorithms that would have returned simple values are changed so much as to be completely and totally confusing.  That's the point of obfuscation. 

    It's intellectual property protection via confusion. 
    David Morton - http://blog.davemorton.net/ - @davidmmorton - ForumsBrowser, a WPF MSDN Forums Client
    • Marked as answer by nobugz Monday, June 22, 2009 12:39 PM
    Sunday, June 21, 2009 9:43 PM