Panoptes
1.0.0
Endpoint Detection and Response
Loading...
Searching...
No Matches
src
hook
src
dllmain.cpp
Go to the documentation of this file.
1
#include <Windows.h>
2
#include "
hook.hpp
"
3
#include "
hook_trace.hpp
"
4
5
BOOL APIENTRY
DllMain
(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
6
{
7
switch
(ul_reason_for_call)
8
{
9
case
DLL_PROCESS_ATTACH:
10
DisableThreadLibraryCalls(hModule);
11
// Register before the hooks are placed so the first detection is not lost
12
HookTraceInit
();
13
PlaceHooks
();
14
15
break
;
16
case
DLL_PROCESS_DETACH:
17
UnHook
();
18
HookTraceUninit
();
19
break
;
20
}
21
return
TRUE;
22
}
23
DllMain
BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID reserved)
Definition
dllmain.cpp:60
hook.hpp
UnHook
VOID UnHook()
The UnHook function removes the hooks from the NTDLL functions.
Definition
hook.cpp:1052
PlaceHooks
VOID PlaceHooks()
The PlaceHooks function places the hooks on the NTDLL functions.
Definition
hook.cpp:1019
hook_trace.hpp
HookTraceInit
VOID HookTraceInit()
Registers the provider. Call before placing the hooks.
Definition
hook_trace.cpp:13
HookTraceUninit
VOID HookTraceUninit()
Unregisters the provider. Call after removing the hooks.
Definition
hook_trace.cpp:18
Generated by
1.15.0