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

  1. myassembly has internal classes , methods, exposed via [assembly: internalsvisibleto("myassemblytest, publickey=realrsapublickey")] to

  2. myassemblytest, testing assembly.

both assemblies have strongnames, perhaps using same rsa key pairs.

what prevents

  1. stripping signature on myassembly
  2. creating fake/dummy rsa key pair
  3. modifying assembly attribute [assembly: internalsvisibleto("myassemblytest, publickey=fakersapublickey")]
  4. re-signing myassembly own fake/dummy rsa key pair
  5. 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

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -