Should I be worried about obfuscating my .NET code

2019-01-14 11:31发布

I'm sure many readers on SO have used Lutz Roeder's .NET reflector to decompile their .NET code. I was amazed just how accurately our source code could be recontructed from our compiled assemblies.

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

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.

10条回答
姐就是有狂的资本
2楼-- · 2019-01-14 11:53

easy for me - if you need to protect intellectual property - obfuicate - if not dont.

Easy to do with the right tools.

查看更多
放我归山
3楼-- · 2019-01-14 11:59

I think to some extent we should ALL be worrying about our IP :)

Good question though as its something I am keen to know more about (I currently do not obfuscate).

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 :)

Good question :) +1

查看更多
Summer. ? 凉城
4楼-- · 2019-01-14 12:01

@Rob Cooper

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 :)

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.

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.

Ngen is for performance, not security, and does nothing to prevent disassembly or make it even slightly more difficult.

查看更多
霸刀☆藐视天下
5楼-- · 2019-01-14 12:02

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.

查看更多
登录 后发表回答