Panoptes 1.0.0
Endpoint Detection and Response
Loading...
Searching...
No Matches
dllmain.cpp
Go to the documentation of this file.
1#include <Windows.h>
2#include "hook.hpp"
3#include "hook_trace.hpp"
4
5BOOL 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
13 PlaceHooks();
14
15 break;
16 case DLL_PROCESS_DETACH:
17 UnHook();
19 break;
20 }
21 return TRUE;
22}
23
BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID reserved)
Definition dllmain.cpp:60
VOID UnHook()
The UnHook function removes the hooks from the NTDLL functions.
Definition hook.cpp:1052
VOID PlaceHooks()
The PlaceHooks function places the hooks on the NTDLL functions.
Definition hook.cpp:1019
VOID HookTraceInit()
Registers the provider. Call before placing the hooks.
VOID HookTraceUninit()
Unregisters the provider. Call after removing the hooks.