Bitdefender Hypervisor Memory Introspection
windpi.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 _WINDPI_H_
13 #define _WINDPI_H_
14 
15 #include "winguest.h"
16 
18 
22 #define HEAP_SPRAY_NR_PAGES 0xF
23 
27 typedef struct _DPI_EXTRA_INFO
28 {
29  struct
30  {
33 
34  struct
35  {
46 
47  struct
48  {
51 
52  struct
53  {
54  struct
55  {
56  DWORD Mapped : 1;
57  DWORD Detected : 1;
62  DWORD Offset : 12;
66 
69 
70  struct
71  {
79 
80  struct
81  {
86 
87 void
89  _Inout_ WIN_PROCESS_OBJECT *Process,
90  _In_ WIN_PROCESS_OBJECT *Parent,
91  _In_ QWORD DebugHandle
92  );
93 
96  _In_ WIN_PROCESS_OBJECT *Child,
97  _In_ WIN_PROCESS_OBJECT *RealParent
98  );
99 
100 #endif // _WINDPI_H_
#define HEAP_SPRAY_NR_PAGES
Definition: windpi.h:22
#define _In_
Definition: intro_sal.h:21
void IntWinDpiGatherDpiInfo(WIN_PROCESS_OBJECT *Process, WIN_PROCESS_OBJECT *Parent, QWORD DebugHandle)
Gathers all the necessary DPI (Deep Process Inspection) information that will later be used to decide...
Definition: windpi.c:1293
QWORD TrapFrameAddress
The address of the trap frame. Used for more information gathering when sending the alert...
Definition: windpi.h:40
QWORD Wow64StackLimit
The known stack limit in WoW64 mode. Valid only if the process is WoW64.
Definition: windpi.h:44
QWORD NewEnabled
The new value from parent's token Privileges.Enabled field, which was deemed malicious.
Definition: windpi.h:74
QWORD StartAddress
The address on which the parent's thread started execution.
Definition: windpi.h:82
QWORD StolenFromEprocess
The EPROCESS address from which the token was stolen.
Definition: windpi.h:49
struct _DPI_EXTRA_INFO * PDPI_EXTRA_INFO
struct _DPI_EXTRA_INFO::@199 DpiDebugExtraInfo
QWORD Wow64StackBase
The known stack base in WoW64 mode. Valid only if the process is WoW64.
Definition: windpi.h:43
DWORD Offset
The offset where the detection on the given page was given, if Detection is equal to 1...
Definition: windpi.h:62
DWORD Reserved
Reserved for further use.
Definition: windpi.h:64
struct _DPI_EXTRA_INFO::@202 DpiHeapSprayExtraInfo
#define _Inout_
Definition: intro_sal.h:20
struct _DPI_EXTRA_INFO::@200 DpiPivotedStackExtraInfo
unsigned long long QWORD
Definition: intro_types.h:53
QWORD CurrentWow64Stack
The current stack of the process in WoW64 mode. Valid only if the process is WoW64.
Definition: windpi.h:42
QWORD NewPresent
The new value from parent's token Privileges.Present field, which was deemed malicious.
Definition: windpi.h:77
struct _DPI_EXTRA_INFO::@204 DpiThreadStartExtraInfo
QWORD CurrentStack
The current stack of the process at the point of process creation.
Definition: windpi.h:36
INTRO_ACTION IntWinDpiCheckCreation(WIN_PROCESS_OBJECT *Child, WIN_PROCESS_OBJECT *RealParent)
Analyzes all the process creations rules in order to decided if the process creation should be allowe...
Definition: windpi.c:641
QWORD OldEnabled
Definition: windpi.h:72
uint32_t DWORD
Definition: intro_types.h:49
QWORD StackBase
The known stack base present in TIB at the moment of process creation.
Definition: windpi.h:37
struct _DPI_EXTRA_INFO::@202::@205 HeapPages[HEAP_SPRAY_NR_PAGES]
enum _INTRO_ACTION INTRO_ACTION
Event actions.
struct _DPI_EXTRA_INFO::@201 DpiStolenTokenExtraInfo
struct _DPI_EXTRA_INFO::@203 DpiTokenPrivsExtraInfo
QWORD OldPresent
Definition: windpi.h:75
DWORD Mapped
Definition: windpi.h:56
DWORD HeapValCount
The number of heap values in the page. Since the max value can be 1024, 11 bits are needed...
Definition: windpi.h:60
DWORD Detected
The bit is set if the i-th page was detected as malicious by shemu.
Definition: windpi.h:58
QWORD _Reserved
Reserved for further use.
Definition: windpi.h:31
QWORD StackLimit
Definition: windpi.h:38
QWORD ShellcodeFlags
Contains the flags on the first page which was detected through shemu.
Definition: windpi.h:67
struct _WIN_PROCESS_OBJECT * PWIN_PROCESS_OBJECT
Definition: windpi.h:17
struct _DPI_EXTRA_INFO DPI_EXTRA_INFO
DWORD Executable
True if the page is executable in the translation.
Definition: windpi.h:63
This structure describes a running process inside the guest.
Definition: winprocess.h:81