Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > assembly protection

Reply
Thread Tools

assembly protection

 
 
Fabio R.
Guest
Posts: n/a
 
      03-24-2006
Hi all,
what can I do to avoid that someone replace a dll of my asp.net project with
another one?
Example: in check.dll there's the method VerifyUrl to check if the current
domain name is www.site.com, otherwise it return false.
I don't want that someone replaces check.dll with another one with VerifyUrl
that always return true...
I'm not so expert, so probably I miss something...
Thanks to anyone can help me,
Fabio


 
Reply With Quote
 
 
 
 
Karl Seguin [MVP]
Guest
Posts: n/a
 
      03-24-2006
Sign your assembly (you'll need to sign all other assemblies that reference
it as well).

You can generate a key by doing

sn -k SomeKeyName.snk in a VS.NET command prompt

You can then add the key to your project via the assemblyKeyFile attribute:

[assembly: AssemblyKeyFile("..\\..\\..\\SomeKeyName.key")]

Here's some references:
http://blogs.msdn.com/junfeng/archiv...11/549355.aspx

or simply google "assembly signing" or "assembly strong naming"

Karl


--
http://www.openmymind.net/
http://www.fuelindustries.com/


"Fabio R." <fabio71 _ at _ yahoo.it> wrote in message
news:(E-Mail Removed)...
> Hi all,
> what can I do to avoid that someone replace a dll of my asp.net project
> with another one?
> Example: in check.dll there's the method VerifyUrl to check if the current
> domain name is www.site.com, otherwise it return false.
> I don't want that someone replaces check.dll with another one with
> VerifyUrl that always return true...
> I'm not so expert, so probably I miss something...
> Thanks to anyone can help me,
> Fabio
>



 
Reply With Quote
 
 
 
 
Fabio R.
Guest
Posts: n/a
 
      03-24-2006
So I need to sign with the same assemblykey all my dll...
After this, the application stops to work if a dll is replaced with a
disassembled one?
Thansks,
Fabio

"Karl Seguin [MVP]" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME
net> ha scritto nel messaggio news:(E-Mail Removed)...
> Sign your assembly (you'll need to sign all other assemblies that
> reference it as well).
>
> You can generate a key by doing
>
> sn -k SomeKeyName.snk in a VS.NET command prompt
>
> You can then add the key to your project via the assemblyKeyFile
> attribute:
>
> [assembly: AssemblyKeyFile("..\\..\\..\\SomeKeyName.key")]
>
> Here's some references:
> http://blogs.msdn.com/junfeng/archiv...11/549355.aspx
>
> or simply google "assembly signing" or "assembly strong naming"
>
> Karl
>
>
> --
> http://www.openmymind.net/
> http://www.fuelindustries.com/
>
>
> "Fabio R." <fabio71 _ at _ yahoo.it> wrote in message
> news:(E-Mail Removed)...
>> Hi all,
>> what can I do to avoid that someone replace a dll of my asp.net project
>> with another one?
>> Example: in check.dll there's the method VerifyUrl to check if the
>> current domain name is www.site.com, otherwise it return false.
>> I don't want that someone replaces check.dll with another one with
>> VerifyUrl that always return true...
>> I'm not so expert, so probably I miss something...
>> Thanks to anyone can help me,
>> Fabio
>>

>
>



 
Reply With Quote
 
Karl Seguin [MVP]
Guest
Posts: n/a
 
      03-24-2006
A signed assembly isn't fully tamper proof...but it's a step in the right
direction. You might also want to take a look at:
http://msdn.microsoft.com/msdnmag/is...asicInstincts/

Karl

--
http://www.openmymind.net/



"Fabio R." <fabio71 _ at _ yahoo.it> wrote in message
news:%(E-Mail Removed)...
> So I need to sign with the same assemblykey all my dll...
> After this, the application stops to work if a dll is replaced with a
> disassembled one?
> Thansks,
> Fabio
>
> "Karl Seguin [MVP]" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME
> net> ha scritto nel messaggio
> news:(E-Mail Removed)...
>> Sign your assembly (you'll need to sign all other assemblies that
>> reference it as well).
>>
>> You can generate a key by doing
>>
>> sn -k SomeKeyName.snk in a VS.NET command prompt
>>
>> You can then add the key to your project via the assemblyKeyFile
>> attribute:
>>
>> [assembly: AssemblyKeyFile("..\\..\\..\\SomeKeyName.key")]
>>
>> Here's some references:
>> http://blogs.msdn.com/junfeng/archiv...11/549355.aspx
>>
>> or simply google "assembly signing" or "assembly strong naming"
>>
>> Karl
>>
>>
>> --
>> http://www.openmymind.net/
>> http://www.fuelindustries.com/
>>
>>
>> "Fabio R." <fabio71 _ at _ yahoo.it> wrote in message
>> news:(E-Mail Removed)...
>>> Hi all,
>>> what can I do to avoid that someone replace a dll of my asp.net project
>>> with another one?
>>> Example: in check.dll there's the method VerifyUrl to check if the
>>> current domain name is www.site.com, otherwise it return false.
>>> I don't want that someone replaces check.dll with another one with
>>> VerifyUrl that always return true...
>>> I'm not so expert, so probably I miss something...
>>> Thanks to anyone can help me,
>>> Fabio
>>>

>>
>>

>
>



 
Reply With Quote
 
LogicNP LogicNP is offline
Junior Member
Join Date: Oct 2009
Posts: 3
 
      07-14-2010
This is a step in the right direction but it is very easy to disable .Net's strong name verification on a machine. CryptoLicensing is a licensing scheme which has setting to enforce brute force strong name verification even if its disabled or bypassed on the system. Don't know if you need the licensing features in that tool, but this particular feature is also there.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy protection / IP protection g Java 69 04-25-2006 04:10 PM
ASP.NET 2.0: What is the namespace and assembly name of generated assembly SA ASP .Net 0 08-09-2004 05:09 PM
Referencing assembly from GAC using @assembly fails Brent ASP .Net 1 01-23-2004 08:23 PM
can a strongly named assembly reference a regular assembly? Prasanna Padmanabhan ASP .Net 1 11-19-2003 06:21 AM



Advertisments