User Mode (Windows): IAT and Inline Hooking
- IAT hooking: every PE has an Import Address Table — a list of pointers to imported functions. Overwrite the pointer for, say,
NtQueryDirectoryFileso calls jump to your code first. - Inline (trampoline) hooking: patch the first bytes of the target function itself with a
jmpto your handler; your handler does its work, then jumps back to the original bytes. - Usually delivered by DLL injection into target processes (e.g.
CreateRemoteThread+LoadLibrary).
Key Takeaway
User-mode hooks only affect the processes you inject into — a scanner running from a clean process still sees the truth.