<p>I'm sure many readers on SO have used <a href="https://www.lutzroeder.com/dotnet/" rel="nofollow noreferrer">Lutz Roeder</a>'s <a href="http://www.reflector.net/" rel="nofollow noreferrer">.NET reflector</a> to decompile their .NET code. 
I was amazed just how accurately our source code could be recontructed from our compiled assemblies.</p>

<p>I'd be interested in hearing how many of you use obfuscation, and for what sort of products? </p>

<p>I'm sure that this is a much more important issue for, say, a .NET application that you offer for download over the internet as opposed to something that is built bespoke for a particular client. </p>

[{'answer_id': 12077, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': '<p>easy for me - if you need to protect intellectual property - obfuicate - if not dont.</p>\n\n<p>Easy to do with the right tools.</p>\n'}, {'answer_id': 12079, 'author': 'Rob Cooper', 'author_id': 832, 'author_profile': 'https://Stackoverflow.com/users/832', 'pm_score': 2, 'selected': False, 'text': "<p>I think to some extent we should ALL be worrying about our IP :)</p>\n\n<p>Good question though as its something I am keen to know more about (I currently do <strong>not</strong> obfuscate).</p>\n\n<p>Having had some discussions with my manager at work, he said he doesn't obfuscate, but does NGEN on install, apparantly that should be enough to stop Reflector working on your assemblies, but I have no idea if this is true and to what extent, so please don't take it as gospel :)</p>\n\n<p>Good question :) +1</p>\n"}, {'answer_id': 12080, 'author': 'Chris Bunch', 'author_id': 422, 'author_profile': 'https://Stackoverflow.com/users/422', 'pm_score': 5, 'selected': True, 'text': "<p>I wouldn't worry about it too much. I'd rather focus on putting out an awesome product, getting a good user base, and treating your customers right than worry about the minimal percentage of users concerned with stealing your code or looking at the source.</p>\n"}, {'answer_id': 12091, 'author': 'Martin', 'author_id': 770, 'author_profile': 'https://Stackoverflow.com/users/770', 'pm_score': 3, 'selected': False, 'text': '<p>We currently obfuscate all our output, even though we are a small outfit who sells specialist software to a small number of clients.</p>\n\n<p>We made this decision for one simple reason - we discovered a disgruntled ex-employee was actively approaching our clients requesting binaries - there was some some concern he was intending to reverse engineer newer features in order to offer competing functionality.</p>\n\n<p>Of course he is still able to do this if he uses the software, but there is no reason to make it easy for him.</p>\n'}, {'answer_id': 12093, 'author': 'Keith', 'author_id': 905, 'author_profile': 'https://Stackoverflow.com/users/905', 'pm_score': 3, 'selected': False, 'text': "<p>No new obfuscation, but lots of compiler tricks since 1.1</p>\n\n<p>For instance every time you use an anonymous type you get IL that compiles back with a pretty obscure name. Every time you use yield you get a whole new class that implements both IEnumerable and IEnumerator (clever optimisation, unreadable code). Every time you use an anonymous delegate you get a new method with a name that's invalid in every .Net language that I know of, but that's fine in the IL.</p>\n"}, {'answer_id': 12207, 'author': 'Brian Ensink', 'author_id': 1254, 'author_profile': 'https://Stackoverflow.com/users/1254', 'pm_score': 2, 'selected': False, 'text': "<p>@Rob Cooper</p>\n\n<blockquote>\n  <p>Having had some discussions with my\n  manager at work, he said he doesn't\n  obfuscate, but does NGEN on install,\n  apparantly that should be enough to\n  stop Reflector working on your\n  assemblies, but I have no idea if this\n  is true and to what extent, so please\n  don't take it as gospel :)</p>\n</blockquote>\n\n<p>This doesn't offer any kind of protection against disassembly.  First I imagine its quite possible to extract raw files from any installation package like an MSI or a CAB file.</p>\n\n<p>But more importantly, Ngen runs on the client machine after the assembly has been installed.  Ngen just forces the assembly to compile now instead of later using the JIT. The original assembly remains and is unmodified and it must remain because Ngen might not be able to compile the entire assembly.  </p>\n\n<p>Ngen is for performance, not security, and does nothing to prevent disassembly or make it even slightly more difficult.</p>\n"}, {'answer_id': 12468, 'author': 'Martin', 'author_id': 1529, 'author_profile': 'https://Stackoverflow.com/users/1529', 'pm_score': 3, 'selected': False, 'text': '<p>Remember, obfuscation is not encryption.  IMHO, if somebody perceives value in reverse-engineering your code, they will do it.  That\'s true for managed code or native code, obfuscated or not.  Sure, obfuscation deters the casual observer, but is your business actually threatened by such people?  Every .NET obfuscation method I\'ve seen makes your life as a developer harder.</p>\n\n<p>There are services that offer true encryption, such as SLPS from Microsoft. See <a href="http://www.microsoft.com/slps/default.aspx" rel="noreferrer">http://www.microsoft.com/slps/default.aspx</a></p>\n'}, {'answer_id': 12480, 'author': 'Jim', 'author_id': 1208, 'author_profile': 'https://Stackoverflow.com/users/1208', 'pm_score': 0, 'selected': False, 'text': "<p>Obsfucation is limited in it's effectiveness, it might keep the casual guy away.  The most effective obsfucation is making only the smallest amount of code available to the user.  If you can, make your app run depend heavily on a fat server.</p>\n"}, {'answer_id': 64704, 'author': 'JRoppert', 'author_id': 6777, 'author_profile': 'https://Stackoverflow.com/users/6777', 'pm_score': 2, 'selected': False, 'text': '<p>We don\'t use obfuscation for "non public" applications but we use it for public available applications. The obfuscated app contains plenty of highly sophisticated code which took us an exorbitant amount of time to write and that\'s the reason that let me think that obfuscation is a must - at least in that case. </p>\n'}, {'answer_id': 2119965, 'author': 'Drupad Panchal', 'author_id': 185130, 'author_profile': 'https://Stackoverflow.com/users/185130', 'pm_score': 0, 'selected': False, 'text': '<p>Agree, most people who know how to code even a little bit do not need to steal your code!</p>\n'}]
['https://Stackoverflow.com/questions/12075', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1078/']