Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / May 2004

Tip: Looking for answers? Try searching our database.

How to secure DLL code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Augie - 12 May 2004 14:19 GMT
Hi All.

This might not be the correct place to ask this question...  Then again I'm
not sure where else to ask this...

When you build a DLL to use with "OUR" code... How do you prevent others
from using the DLL?

Thanks.

Regards.

Augie
William DePalo [MVP VC++] - 12 May 2004 19:50 GMT
> This might not be the correct place to ask this question...  Then again I'm
> not sure where else to ask this...
>
> When you build a DLL to use with "OUR" code... How do you prevent others
> from using the DLL?

On some fine (or terrible, depending on your point of view) day there may be
a "secure" version of Windows which allows only "trusted" applications to
run.

Until then, your are pretty much on your own. In the DLL you can call
GetModuleFilename() or something to find out who is calling you and perhaps
decide to accommodate him or not but nothing you can come up with is going
to be foolproof.

You might want to look into hardware "dongles" like the ones sold by Hasp
and Sentinel which don't out of the box restrict the caller's per se but try
to insure that only licensed end-users run the application.

Regards,
Will
Augie - 12 May 2004 20:06 GMT
Will,

Thanks...  We can see there was a lot of effort put on this by MS part...
:-)

Is it possible to build *.lib files instead of *.dll instead (.Net code)?

Augie

> > This might not be the correct place to ask this question...  Then again
> I'm
[quoted text clipped - 18 lines]
> Regards,
> Will
William DePalo [MVP VC++] - 12 May 2004 22:15 GMT
> Thanks...  We can see there was a lot of effort put on this by MS part...

The world hasn't seen a lot of secure operating systems. The DoD has spent
about a half a billion dollars on the likes of the old Blacker but they
aren't talking much.

> Is it possible to build *.lib files instead of *.dll instead (.Net code)?

Good question for which I don't have an answer. Do you know about
NetModules?

Regards,
Will
Augie - 13 May 2004 13:45 GMT
Will,

NetModules?

Augie

> > Thanks...  We can see there was a lot of effort put on this by MS part...
>
[quoted text clipped - 9 lines]
> Regards,
> Will
William DePalo [MVP VC++] - 13 May 2004 18:38 GMT
> NetModules?

Your initial question asked about libraries.

You can look at a Net Module as a very loose equivalent of a library in the
sense that it is not meant to stand on its own but rather become part of a
larger assembly to be linked later.

Take a look at this link, especially the discussion of the NOASSEMBLY
option:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcr
efEECOMCompilation.asp


Regards,
Will
Michael Viking - 12 May 2004 23:20 GMT
Don't know if this would help, but one technique we've used is to create a
small segment of shared memory and then have "OUR" app write magic bits to
it.  If the DLL doesn't see the correct bits, then it won't provide any
functionality.

-Michael Viking

> Hi All.
>
[quoted text clipped - 9 lines]
>
> Augie
Augie - 13 May 2004 13:48 GMT
Thanks.

That's a good idea.  We plan on using a security key with our software.  I
just didn't want to have a check in every function/class.  So I'm going to
have to look for a way to validation here and there and then fail if the key
is not present.

Regards,

Augie

> Don't know if this would help, but one technique we've used is to create a
> small segment of shared memory and then have "OUR" app write magic bits to
[quoted text clipped - 17 lines]
> >
> > Augie

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.