Click here to Skip to main content
15,914,419 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDetecting Hooks [modified] Pin
hxhl9510-Mar-10 13:01
hxhl9510-Mar-10 13:01 
AnswerRe: Detecting Hooks Pin
Baltoro10-Mar-10 13:55
Baltoro10-Mar-10 13:55 
GeneralRe: Detecting Hooks Pin
hxhl9510-Mar-10 14:25
hxhl9510-Mar-10 14:25 
GeneralRe: Detecting Hooks Pin
Baltoro11-Mar-10 9:39
Baltoro11-Mar-10 9:39 
GeneralRe: Detecting Hooks Pin
Baltoro11-Mar-10 9:49
Baltoro11-Mar-10 9:49 
GeneralLooking for Hooks Pin
Baltoro11-Mar-10 10:34
Baltoro11-Mar-10 10:34 
GeneralRe: Detecting Hooks Pin
hxhl9511-Mar-10 13:29
hxhl9511-Mar-10 13:29 
GeneralRe: Detecting Hooks Pin
Baltoro13-Mar-10 10:47
Baltoro13-Mar-10 10:47 
hxhl95,
The chapter about hooks from the Rootkits book by Hoglund is lengthy, and goes into great detail describing the most common hooking techniques used by malicious code. Rather than post the entire chapter (which would be HUGE), I just copied brief selections to give you an idea of what the general concept is. I left out a bunch of explanatory material. Alot of interesting information about the techniques used by malicious software are explained on: Rootkit[^]
But, if you are trying to detect unauthorized hooks in your process address space (or others on the Local Machine), the concept is examine the address range of the DLL that exports the function called in the IAT of your process (the DLLs are all dynamically loaded by the system into your process address space), and determine if the address actually listed in the IAT corresponds to that range.
If the process instead calls LoadLibrary and GetProcAddress to load the DLL on demand, the address entry in the IAT will NOT exist, so any malicious injected DLL code could not possibly overwrite the IAT address. (Actually, I'm unsure if the Operating System creates a temporary IAT entry at this point, but, I assume that it doesn't.)
Go to SysInternals and download Process Explorer[^](FREE) to get a graphic representation of which dynamically loaded DLLs exist in your Process addesss space. Also,VMMap[^] is a very useful utility for understanding process address space memory allocations.
An excellent overview of the Portable Executable format and its structures when loaded into memory is located at: Peering Inside the Portable Executable, Matt Pietrek[^]
GeneralRe: Detecting Hooks Pin
hxhl9513-Mar-10 10:49
hxhl9513-Mar-10 10:49 
QuestionVS2005 & VS2008 DLL Compilation issues Pin
masnu10-Mar-10 7:56
masnu10-Mar-10 7:56 
AnswerRe: VS2005 & VS2008 DLL Compilation issues Pin
CPallini10-Mar-10 8:01
mveCPallini10-Mar-10 8:01 
GeneralRe: VS2005 & VS2008 DLL Compilation issues Pin
masnu10-Mar-10 9:19
masnu10-Mar-10 9:19 
QuestionRe: VS2005 & VS2008 DLL Compilation issues Pin
CPallini10-Mar-10 10:24
mveCPallini10-Mar-10 10:24 
AnswerRe: VS2005 & VS2008 DLL Compilation issues Pin
Chris Losinger10-Mar-10 8:13
professionalChris Losinger10-Mar-10 8:13 
GeneralRe: VS2005 & VS2008 DLL Compilation issues Pin
masnu10-Mar-10 9:21
masnu10-Mar-10 9:21 
QuestionAdministration Rights for my Application by Token Pin
Joschwenk66610-Mar-10 2:58
Joschwenk66610-Mar-10 2:58 
AnswerRe: Administration Rights for my Application by Token Pin
Eugen Podsypalnikov10-Mar-10 3:17
Eugen Podsypalnikov10-Mar-10 3:17 
QuestionWM_GETFONT returns NULL Pin
sashoalm10-Mar-10 1:53
sashoalm10-Mar-10 1:53 
AnswerRe: WM_GETFONT returns NULL Pin
Steve Thresher10-Mar-10 2:24
Steve Thresher10-Mar-10 2:24 
GeneralRe: WM_GETFONT returns NULL Pin
sashoalm10-Mar-10 2:50
sashoalm10-Mar-10 2:50 
QuestionHTML Editing Control for Win32 Pin
Steve Thresher10-Mar-10 0:08
Steve Thresher10-Mar-10 0:08 
AnswerRe: HTML Editing Control for Win32 Pin
KingsGambit10-Mar-10 0:37
KingsGambit10-Mar-10 0:37 
GeneralRe: HTML Editing Control for Win32 Pin
Steve Thresher10-Mar-10 1:07
Steve Thresher10-Mar-10 1:07 
GeneralRe: HTML Editing Control for Win32 Pin
KingsGambit10-Mar-10 7:28
KingsGambit10-Mar-10 7:28 
AnswerRe: HTML Editing Control for Win32 Pin
cmk10-Mar-10 7:32
cmk10-Mar-10 7:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.