Secure DLLs
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
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
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?
In short, forget it. What are you writing, anyway?
"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 |
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement