[quoted text, click to view] WertmanTheMad wrote:
> The first is, should I take a "StrongNamed" assembely and edit it with
> a hex editor to change something in one of its resource files I need
> changed, it barks about the Signature not matching.
> No Suprise there,
When you sign an assembly the compiler takes a hash of the assembly and
signs it with the private key and then puts the signed hash and the public
key in the assembly. When .NET tries to load the assembly it will take a
hash of the assembly, extract the stored hash and decrypt it with the public
key and compare the two. If they are different it means that the assembly
has changed since it was signed. This is what you see.
[quoted text, click to view] > BUT I have a different process whereby I can modify a StongNamed
> assembely (not even my own) to me hearts content and there is NO
> PROBLEM and the Signature remains intact (The ORIGINAL Signature) sn
> -T returns the original value before AND after modification in this
> manner.
There's no surprise here too :-)
Now try to load that (tampered) signed assembly using the .NET loader.
You'll find that .NET will refuse.
[quoted text, click to view] > If it is just me misunderstanding the nature of SN Assy ?
yes, I don't quite understand how you think that the signature gets into the
assembly.
[quoted text, click to view] > If this is a BUG/Security Issue, what is the "Proper" way through MS
> Channels to report it and the correct time period for a fix to be
> applied before releasing the issue to the world abroad.
Report it here and someone will respond...
[quoted text, click to view] > The funny/sad part is this bug/feature is beneficial to me at the
> moment, but the ability to add any code I want to anyones assembely
> (MS Included) and have its SN Signature match what it did before it
> was modified seems a bit spooky.
You can change any assembly you like, but you will *not* be able to load
that assembly if it is signed and hence you will *not* be able to execute
code in it. If you change a signed assembly you are corrupting it, and
making it unusable.
Richard
--
..NET training, development, consulting and mentoring
my email evpuneqt@zicf.bet is encrypted with ROT13 (
www.rot13.org)
sign up for my free .NET newsletter at
http://www.wd-mag.com/newsletters/