Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Yohomyth

Secure DLLs

This topic is 5318 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there a way to make so in a dll the executable needs to execute a specific function with specific param values before it exports anything else? Kind of like entering a password to access a web page "Solutions are not the answer." - Richard Nixon

Share this post


Link to post
Share on other sites
Advertisement
Try having all your functionality in an interface and exporting one function, a ''CreateInterface'' function which takes your key as a parameter.

If all is well, this should return a pointer to an instance of your DLL interface. If not, return null.

eg: Pseudocode follows for example


class IDllBase
{
public:
VOID AClassFunc();
VOID AndAnotherFunc();
... etc

};

(dll code)
DLL_EXPORT IDllBase *CreateInterface(.... your l33t key params etc...)
{
// do your check here

if (checks == TRUE)
{
IDllBase *pDLL = new IDllBase();
return pDLL;
}
//

return NULL;
};

Share this post


Link to post
Share on other sites
If the cracker has a debugger and your code can call the DLL function, there''s basically no way you can stop him from doing what your code does. This particular scheme affords about 1 minute of protection I thought of a few schemes involving hidden function pointers set by the app differently if a debugger is present, but all of that unravels with a breakpoint in the DLL''s address space (the cracker only has to determine what is protected, and bpx that).
In short, forget it. What are you writing, anyway?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!