Detecting Keyboard Hooks
Does anybody know of a way to detect global keyboard hooks? I want to be able to detect keyboard hooks and possibly remove them from the system.
Basically, a way to stop key loggers from stealing passwords. At the very least, this could be used to inform the user that the keyboard is being monitored. At best, it could identify the hooks and remove them. Also, being able to identify the process that loaded the hook would be very helpful.
If you have any ideas on the subject, or a link to a site with info, please respond.
i dont know much about keyboard hooks, but maybe if you research on how to implement one, you'll find out how to detect it as well. ie, if you know how it works, you'll know what to look for when detecting it.
The way I would try detect a hook is with.....
.....wait for it.....
.....another hook!!!!!!!!!!!!!!! :)
There is a debug hook (see SetWindowsHook with the WH_DEBUG param) that is called before any other hook...the callback you specify recieves the types of hook as well as the params sent....
See msdn for info