Secure DLLs

Started by
2 comments, last by Yohomyth 20 years, 3 months ago
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
------------------------------------------------------------"Many combilations elizagerth. I hope you see my particles." - Senor Cardgage
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;};
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?
E8 17 00 42 CE DC D2 DC E4 EA C4 40 CA DA C2 D8 CC 40 CA D0 E8 40E0 CA CA 96 5B B0 16 50 D7 D4 02 B2 02 86 E2 CD 21 58 48 79 F2 C3
"Secure DLLs" is an oxymoron...

| C++ Debug Kit :: GameDev Kit :: DirectX Tutorials :: 2D DX Engine | TripleBuffer Software |
| Plug-in Manager :: System Information Class :: D3D9 Hardware Enum | DevMaster :: FlipCode |

[size=2]aliak.net

This topic is closed to new replies.

Advertisement