crassy
January 22nd, 2003, 14:36
Hi all!
I've got an add-in for VS.NET that I'm trying to fix...
The app itself is written in C# and is easily decompileable.
It uses 512-bit RSA for the serial. As I couldn't find any way to
get the private key I patched the target dll with a new public key that I generated.
Now to the problem:
As soon as I change a byte in the dll it fails to load giving me "Strong name validation failed" error. After looking around a bit I found that the problem probably is that .net assemblies can be signed so that they won't be played with. The utility for signing is called sn and is included in VS.NET.
I've found a site that seems to have some info on this but unfortunately it's in some strange language (Jewish?).
The URL is http://www.twoguru.com/playground/cs_tutorial/other/assembly3.htm .
Anyway, I've tried skipping strong name verification (sn -Vr x.dll), generating a new key pair and signing with it (sn -k and sn -R), but came nowhere...
If you want to test this I attach a test dll where i recreated the problem. Just set a reference to it and do. It prints "Haj Haj". Now change this message at offset 68Eh in the dll and rerun. Voila!
I'm really in need of ideas here.. IMO we'll see this kind of protections more and more now that .net is on the rise.
Thanks!
I've got an add-in for VS.NET that I'm trying to fix...
The app itself is written in C# and is easily decompileable.
It uses 512-bit RSA for the serial. As I couldn't find any way to
get the private key I patched the target dll with a new public key that I generated.
Now to the problem:
As soon as I change a byte in the dll it fails to load giving me "Strong name validation failed" error. After looking around a bit I found that the problem probably is that .net assemblies can be signed so that they won't be played with. The utility for signing is called sn and is included in VS.NET.
I've found a site that seems to have some info on this but unfortunately it's in some strange language (Jewish?).
The URL is http://www.twoguru.com/playground/cs_tutorial/other/assembly3.htm .
Anyway, I've tried skipping strong name verification (sn -Vr x.dll), generating a new key pair and signing with it (sn -k and sn -R), but came nowhere...
If you want to test this I attach a test dll where i recreated the problem. Just set a reference to it and do
Code:
Console.WriteLine(TestLib1.Class1.STR);
I'm really in need of ideas here.. IMO we'll see this kind of protections more and more now that .net is on the rise.
Thanks!