Bitdefender Hypervisor Memory Introspection
winummoduleblock.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020 Bitdefender
3  * SPDX-License-Identifier: Apache-2.0
4  */
11 
12 #ifndef _WINUMMODULEBLOCK_H_
13 #define _WINUMMODULEBLOCK_H_
14 
15 #include "winpe.h"
16 
21 #define WINMODBLOCK_INVALID_VALUE 0xFFFFFFFF
22 
23 
27 typedef enum _WIN_MOD_BLOCK_FLAG
28 {
34 
35 
51 typedef INTSTATUS
53  _In_ WIN_PROCESS_MODULE *Module,
54  _In_ void *BlockObject,
55  _In_ QWORD DllHandle,
56  _In_ QWORD Reason,
57  _In_ QWORD Reserved,
58  _In_ QWORD RetAddress,
59  _Inout_ INTRO_ACTION *Action
60  );
61 
68 typedef INTSTATUS
71  _In_ BYTE *Headers
72  );
73 
80 typedef INTSTATUS
83  _In_ const void *BlockObject
84  );
85 
86 
89  _In_ WIN_PROCESS_MODULE *Module,
93  _In_opt_ PFUNC_IntWinModBlockCleanup CleanupCallback,
94  _Inout_ void **BlockObject
95  );
96 
97 
100  _In_ void *BlockObject,
101  _In_ DWORD Reason,
103  );
104 
105 
106 INTSTATUS
108  _Inout_ void *BlockObject
109  );
110 
111 #endif
#define _In_opt_
Definition: intro_sal.h:16
enum _WIN_MOD_BLOCK_FLAG WIN_MOD_BLOCK_FLAG
Used to provided blocking options.
uint8_t BYTE
Definition: intro_types.h:47
#define _In_
Definition: intro_sal.h:21
Do not unload the module.
INTSTATUS(* PFUNC_IntWinModBlockCleanup)(WIN_PROCESS_MODULE *Module, const void *BlockObject)
This callback type will be invoked when IntWinModBlockRemoveBlockObject is called for cleanup purpose...
int INTSTATUS
The status data type.
Definition: introstatus.h:24
_WIN_MOD_BLOCK_FLAG
Used to provided blocking options.
#define _Inout_
Definition: intro_sal.h:20
unsigned long long QWORD
Definition: intro_types.h:53
INTSTATUS(* PFUNC_IntWinModBlockCallback)(WIN_PROCESS_MODULE *Module, void *BlockObject, QWORD DllHandle, QWORD Reason, QWORD Reserved, QWORD RetAddress, INTRO_ACTION *Action)
This callbacks provided detection logic for Windows module loads.
uint32_t DWORD
Definition: intro_types.h:49
enum _INTRO_ACTION INTRO_ACTION
Event actions.
Force the module to unload by returning FALSE.
INTSTATUS IntWinModBlockBlockModuleLoad(WIN_PROCESS_MODULE *Module, WIN_MOD_BLOCK_FLAG Flags, PFUNC_IntWinModBlockCallback Callback, PFUNC_IntWinModBlockHeadersCallback HeadersCallback, PFUNC_IntWinModBlockCleanup CleanupCallback, void **BlockObject)
This function is invoked when a suspicious dll is loaded in order to analyze and block the dll load i...
INTSTATUS IntWinModBlockRegisterCallbackForReason(void *BlockObject, DWORD Reason, PFUNC_IntWinModBlockCallback Callback)
Registers a callback that is invoked when the blocked module's DllMain function is called with a give...
INTSTATUS(* PFUNC_IntWinModBlockHeadersCallback)(WIN_PROCESS_MODULE *Module, BYTE *Headers)
This callback type will be called for the suspicious module headers when they are swapped in...
INTSTATUS IntWinModBlockRemoveBlockObject(void *BlockObject)
This function is used in order to destroy a WIN_MOD_BLOCK_OBJECT structure.