.Net security noob is here ... What is the easiest way to prevent someone else from loading my assembly?
Background: Although I'm really only looking for “reasonably good” protection (with enough time / money / smart, someone can successfully hack, hack and attack), it seems like this is a problem, and I'm just Missing.
Here is what I (think) know:
While strong naming can be used at the security level, it did not have to be, according to the microsoft documentation (see Warning: do not rely on strong names for security. They provide unique uniqueness.)
In this note, I came across situations where I could not load a third-party assembly (suppose that it was so), because they did not sign their meetings, but all of mine were. So I had to ildasm build them, sign it with our own snk, then ilasm back) in order to use their library. So strong naming doesn't seem like a good security mechanism to me. HOWEVER ... how about a simple check in the code to make sure the calling assembly is signed with my public key token? How effective is it?
If a strong name should not be used for what I am trying to perform, does Authenticode digitally verify the dll for a better route (it seems wintrust.dll can help with this)?
I use the tools of several vendors for obfuscation and many come with licensing and all kinds of things. I most likely use a little obfuscation to hide some sensitive parts, however I would still like to have a mechanism to prevent someone from loading my sensitive library, without having to use features such as string and code encryption, which often come with ( and other) expenses.
So, back to the question: what is the easiest way to prevent my assembly from loading?
obfuscation strongname strong-named-key .net-security
Johnzaj
source share