-
December 12th, 2012, 05:01 AM
#1
Prevent a DLL from being loaded/injected
If you're writing a .dll you can prevent that dll from getting loaded into some processes by returning false from the dllmain.
I'm looking for a way to do it the other ay around. I have an exe, and I want to prevent a certain hook dll from getting loaded/injected into my exe.
A customer is running some software which loads a hook dll into our exe, and this is subsequently preventing our application from running as intended. Both our software as well as the third party app is required, and there is no way to get the third party dll changed. (no longer supported).
-
December 12th, 2012, 05:52 AM
#2
Re: Prevent a DLL from being loaded/injected
Originally Posted by OReubens
I'm looking for a way to do it the other ay around. I have an exe, and I want to prevent a certain hook dll from getting loaded/injected into my exe.
Not sure if this will work, but maybe you could load the library from your exe manually by calling
Code:
LoadLibraryEx(fileName, NULL, LOAD_LIBRARY_AS_DATAFILE);
Maybe that will prevent the DLL from being loaded again as an executable library.
Cheers, D Drmmr
Please put [code][/code] tags around your code to preserve indentation and make it more readable.
As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky
-
January 3rd, 2013, 06:09 PM
#3
Re: Prevent a DLL from being loaded/injected
In your case, the question to ask is: is this hook dll preventing only one (yours) application from running, or others too?
If yours is the only one, it is most likely your application is a culprit.
I really do not think any hook that is properly implemented can prevent any module from running correctly.
Are you using any hooks in your project?
There are only 10 types of people in the world:
Those who understand binary and those who do not.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|