Re: How to protect your dll's best?

From: Hernan de Lahitte (hernan_at_lagash.com)
Date: 02/24/04


Date: Tue, 24 Feb 2004 10:20:43 -0300


 1) Simple Public method of a Public Class. (You might use the APTA
attribute: See
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/h
tml/THCMCh08.asp?frame=true#c08618429_005) )

 2) Public classes with LinkDemand to a StrongName.
     See articles:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/THCMCh08.asp?frame=true#c08618429_008

http://msdn.microsoft.com/netframework/?pull=/library/en-us/dnnetsec/html/strongNames.asp

 Sample:
public sealed class Utility
{
    // Although SomeOperation() is a public method, the following
    // permission demand means that it can only be called by assemblies
    // with the specified public key.
    [StrongNameIdentityPermission(SecurityAction.LinkDemand,
PublicKey="00240000048...97e85d098615")]
    public static void SomeOperation() {}
}

 Recall that for simple "asembly scope" you might use the "internal"
keyword.

"David Lindgren" <david.lindgren@hogia.se.REMOVE!> wrote in message
news:elZcArr%23DHA.1844@TK2MSFTNGP11.phx.gbl...
> Hello!
>
> I have written some code which I would like to protect so that other
people
> cannot use my methods etc. All of the code is inside a set of classes in a
> dll. I would like to protect it so that all classes inside the dll shall
be
> able to "communicate" but it should not be possible to create objects of
my
> classes from an outside dll or exe. There are two exceptions:
> 1) One of the methods returns an object of a class. Everyone should be
able
> to call this method. It is not static.
> 2) From a program that I have written I need to be able to initiate a few
> objects and access some methods. Only "my" programs shall be able to do
> this.
>
> Question: What options do I have to protect my dll like I described above?
>
> Thank you for helping out.
>
> Regards,
> David.
>
>



Relevant Pages

  • Re: ASP.NET 2005 hack-proof?
    ... Obfuscation is not fool-proof once the DLL is obtained. ... So, the amount of trouble, time, and expense to protect intellectual ... >> It will deter the casual decompiler, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Word VBA obfuscation?
    ... > reason to protect your efforts. ... > Takes less than 5 minutes, without a password cracker. ... > Write code that installs the DLL, ... How do I create a DLL from a Word VBA project in Word? ...
    (microsoft.public.word.vba.general)
  • Re: Program protection - can not be copied
    ... The reason I cannot retrieve a dll from the image, ... That kind of thing might involve a filter driver or something ... I am trying to extract a DLL from an existing build. ... It seems that there is no any direct method to protect the program from ...
    (microsoft.public.windowsce.platbuilder)
  • Re: How do I stop my software from getting cracked?
    ... cracking it quite difficult for an inexperienced cracker. ... Write that DLL in a good ole C. Make calls into that DLL ... And it all depends on the software that you try to protect. ... commercial obfuscator for missile defence system software... ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Decompiling C#?!?!? Where is the privacy?
    ... > C# back as a managed C++ DLL because he thinks that he can protect the ... No one will want to decompile *all* of your code, ... lengthen the amount of time, it will not remove it completely. ... > like that even his DLL will be reverse engineerable. ...
    (microsoft.public.dotnet.languages.csharp)