473,405 Members | 2,187 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

How to secure DLL code

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
Nov 17 '05 #1
7 8418
"Augie" <au************@hotmail.com> wrote in message
news:OM**************@TK2MSFTNGP12.phx.gbl...
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
Nov 17 '05 #2
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

"William DePalo [MVP VC++]" <wi***********@mvps.org> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
"Augie" <au************@hotmail.com> wrote in message
news:OM**************@TK2MSFTNGP12.phx.gbl...
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

Nov 17 '05 #3
"Augie" <au************@hotmail.com> wrote in message
news:uK*************@tk2msftngp13.phx.gbl...
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
Nov 17 '05 #4
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

"Augie" <au************@hotmail.com> wrote in message
news:OM**************@TK2MSFTNGP12.phx.gbl...
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

Nov 17 '05 #5
Will,

NetModules?

Augie

"William DePalo [MVP VC++]" <wi***********@mvps.org> wrote in message
news:ub****************@TK2MSFTNGP09.phx.gbl...
"Augie" <au************@hotmail.com> wrote in message
news:uK*************@tk2msftngp13.phx.gbl...
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

Nov 17 '05 #6
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
"Michael Viking" <Th*******@sweden.se> wrote in message
news:e8*************@TK2MSFTNGP11.phx.gbl...
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

"Augie" <au************@hotmail.com> wrote in message
news:OM**************@TK2MSFTNGP12.phx.gbl...
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


Nov 17 '05 #7
"Augie" <au************@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
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/de...ompilation.asp

Regards,
Will
Nov 17 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: debedb | last post by:
Hi all, I have a link, <A onClick="javascript:foo()">. The foo() function does w = window.open('', fieldid+'mywindow', prop); w.document.open(); d = w.document; And proceeds to write...
68
by: Roman Ziak | last post by:
Hello, I just downloaded MS Visual Studio 2005 Express Beta. When I tried to compile existing valid project, I get a lot of warnings like 'sprintf' has been deprecated, 'strcpy' has been...
3
by: Bill | last post by:
I'm running a C#.Net application that is using the HttpWebRequest to upload an xml file to a https site with FIPS complicancy turned on. On the "GetRequestStream()" method I get: "The underlying...
8
by: todd.freed | last post by:
Hey all, I have been racking my brain all morning to find a solution to this, and I am having no luck. Our webpage is created with Visual Studio C# and ASP.Net, hosted in-house using HTTPS with...
14
by: Usman | last post by:
Hi I'm working on an application that contains classes for licensing, authentication etc, including all the algorithms of encryption/decryption etc. I wanted to secure this code, but after...
40
by: Robert Seacord | last post by:
The CERT/CC has released a beta version of a secure integer library for the C Programming Language. The library is available for download from the CERT/CC Secure Coding Initiative web page at:...
7
by: Robert Seacord | last post by:
The CERT/CC has just deployed a new web site dedicated to developing secure coding standards for the C programming language, C++, and eventually other programming language. We have already...
5
by: walterbyrd | last post by:
I honestly don't know. But, I have seen articles and posts about how PHP is terribly insecure. I don't usually see comparisons to other common web languages. I think the big vulnerablity is...
0
by: amitvps | last post by:
Secure Socket Layer is very important and useful for any web application but it brings some problems too with itself. Handling navigation between secure and non-secure pages is one of the cumbersome...
3
by: zr | last post by:
Hi, Does usage of checked iterators and checked containers make code more secure? If so, can that code considered to be reasonably secure?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.