Bitdefender Hypervisor Memory Introspection
winhal.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020 Bitdefender
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 #ifndef _WINHAL_H_
6 #define _WINHAL_H_
7 
8 #include "introtypes.h"
9 
13 typedef struct _WIN_HAL_DATA
14 {
23 
28 
31 
38 
46 
49 
52 
56 
60 
64 
65 
68  void
69  );
70 
71 void
73  void
74  );
75 
78  void
79  );
80 
83  void
84  );
85 
88  void
89  );
90 
93  void
94  );
95 
98  void
99  );
100 
101 INTSTATUS
103  void
104  );
105 
106 INTSTATUS
108  void
109  );
110 
111 INTSTATUS
113  void
114  );
115 
116 INTSTATUS
118  void
119  );
120 
121 #endif // _WINHAL_H_
void * HalHdrSwapHandle
HAL headers swap handle. Used only if HAL is not protected, and the headers are not read automaticall...
Definition: winhal.h:59
INTSTATUS IntWinHalUnprotectHalHeapExecs(void)
Deactivates the HAL heap execution protection.
Definition: winhal.c:812
struct _WIN_HAL_DATA * PWIN_HAL_DATA
uint8_t BYTE
Definition: intro_types.h:47
INTSTATUS IntWinHalProtectHalIntCtrl(void)
Protects the HAL interrupt controller against writes.
Definition: winhal.c:837
void * HalPerfIntegrityObj
The HAL Performance Counter integrity hook object.
Definition: winhal.h:62
INTSTATUS IntWinHalCreateHalData(void)
Initializes gHalData.
Definition: winhal.c:2270
LIST_ENTRY InitSwapHandles
A list containing the swap handles for the swapped out sections which should be read in HalBuffer...
Definition: winhal.h:55
void IntWinHalUninit(void)
Frees any resources held by gHalData and removes all the HAL protections.
Definition: winhal.c:2479
int INTSTATUS
The status data type.
Definition: introstatus.h:24
Describes a kernel driver.
Definition: drivers.h:30
INTSTATUS IntWinHalProtectHalDispatchTable(void)
Activates the HAL dispatch table protection.
Definition: winhal.c:914
DWORD HalBufferSize
The size of HAL buffer.
Definition: winhal.h:48
void * HalIntCtrlWriteHook
The HAL interrupt controller write hook object.
Definition: winhal.h:35
INTSTATUS IntWinHalUnprotectHalDispatchTable(void)
Deactivates the HAL dispatch table protection.
Definition: winhal.c:957
DWORD HalHeapSize
The size of the HAL heap.
Definition: winhal.h:22
void * HalDispatchIntegrityHook
The HAL dispatch table integrity hook object.
Definition: winhal.h:37
unsigned long long QWORD
Definition: intro_types.h:53
DWORD RemainingSections
The number of sections which are not yet read into HAL buffer.
Definition: winhal.h:51
BYTE * HalBuffer
A buffer containing the whole HAL image.
Definition: winhal.h:45
struct _WIN_HAL_DATA WIN_HAL_DATA
Hal information.
INTSTATUS IntWinHalUnprotectHalIntCtrl(void)
Deactivates the HAL interrupt controller write protection.
Definition: winhal.c:889
QWORD HalHeapAddress
The guest virtual address of the HAL heap.
Definition: winhal.h:16
uint32_t DWORD
Definition: intro_types.h:49
DWORD HalDispatchTableSize
The size of the HAL dispatch table.
Definition: winhal.h:27
KERNEL_DRIVER * OwnerHalModule
The hal.dll kernel module or ntoskrnl.exe.
Definition: winhal.h:30
INTSTATUS IntWinHalUpdateProtection(void)
Updates any of the HAL protections.
Definition: winhal.c:2405
QWORD HalDispatchTableAddress
The guest virtual address of the HAL dispatch table.
Definition: winhal.h:25
QWORD HalIntCtrlAddress
The guest virtual address of the HAL interrupt controller.
Definition: winhal.h:18
INTSTATUS IntWinHalProtectHalPerfCounter(void)
Enables protection on HalPerformanceCounter function pointer.
Definition: winhal.c:989
Hal information.
Definition: winhal.h:13
void * HalHeapExecHook
The HAL heap execution hook object.
Definition: winhal.h:33
INTSTATUS IntWinHalUnprotectHalPerfCounter(void)
Removes the protection on HalPerformanceCounter.
Definition: winhal.c:1035
QWORD HalPerfCounterAddress
The guest virtual address of the HAL performance counter.
Definition: winhal.h:20
INTSTATUS IntWinHalProtectHalHeapExecs(void)
Hooks the HAL heap against execution.
Definition: winhal.c:718