c# - Protection offered by using assembly StrongName? -
i strongname don't prevent reflection - that's job of obfuscator. beyond creating rather unique names, cryptographic purpose or protection of using strongnames?
assume
myassembly
hasinternal
classes , methods, exposed via[assembly: internalsvisibleto("myassemblytest, publickey=realrsapublickey")]
tomyassemblytest
, testing assembly.
both assemblies have strongnames, perhaps using same rsa key pairs.
what prevents
- stripping signature on
myassembly
- creating fake/dummy rsa key pair
- modifying assembly attribute
[assembly: internalsvisibleto("myassemblytest, publickey=fakersapublickey")]
- re-signing
myassembly
own fake/dummy rsa key pair - consuming internals inside own assembly,
maliciousassembly
i guess i'm not clear strongnaming's real duties ... appreciate insight.
the primary purpose of giving assembly strong name preventing malicious users of else's code uses assembly substituting code own.
consider situation: make transmitsecret.dll
assembly give customers communicate server in secure way. if transmitsecret.dll
not signed, malicious users able write own module presents same interface yours, wrap code in own malicious code, intercept of "secure" transmissions of customer, , send copy own server. able without having access source code of customers, replacing dll
theirs.
if transmitsecret.dll
signed, however, , customers' code linked against it, trick swapping assemblies not going work: when customers' code try loading transmitsecret.dll
, .net notice change, , stop program starting up.
Comments
Post a Comment