tags:

views:

131

answers:

6

Hi,

I have heard some mutterings about C# being quite easy to "crack" and/or reverse engineer.

Is this the case and if so, how can I go about preventing this, if possible ? Or at least making it more difficult ?

Thanks, George.

+3  A: 

Obfuscate your assembly.

You can refer to this instituitional article to learn more about Obfuscation.

this. __curious_geek
+1  A: 

You could obfuscate the generated assembly.

Darin Dimitrov
+1  A: 

To some extent it is. The IL can be viewed and reverse-engineered. Some people use obfustators to scramble all of the names in the assembly, thus making it near impossible to derive any app logic.

David Neale
Ok thanks. Does this apply to other languages such as C++, VB etc too ??
George
Yes - all of the .NET compilers (C#, VB, C++, F#) will spit out language-agnostic IL which can be reverse engineered.
David Neale
+1  A: 

You can obfuscate your source code using for example Dotfuscator software which comes with Visual Studio. If you want to see reverse engineering in action - download Reflector, and open your exe in it. You'll be surprised :)

Sorantis
+1  A: 

There are a number of libraries to deal with this, I think Microsoft release (or at least endorse) Dotfuscator

pm_2
+1  A: 

.Net code is pretty easy to view even when compiled, because all the metadata (the information about classes, methods and properties) is all contained in the executable. Basically all you need to get at the code is Reflector.

Obfuscating will basically rearrange and rename everything to make tools like Reflector harder to use. There's a stackoverflow question asking about which particular obfuscater you could use.

Dave Arkell