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  {
85 
86  struct
87  {
91 
94 
97 
101 
103 
104 void
106  _Inout_ WIN_PROCESS_OBJECT *Process,
107  _In_ WIN_PROCESS_OBJECT *Parent,
108  _In_ QWORD DebugHandle
109  );
110 
113  _In_ WIN_PROCESS_OBJECT *Child,
114  _In_ WIN_PROCESS_OBJECT *RealParent
115  );
116 
117 #endif // _WINDPI_H_
struct _DPI_EXTRA_INFO::@206::@210 HeapPages[HEAP_SPRAY_NR_PAGES]
QWORD OldPtrValue
Old value.
Definition: windpi.h:92
#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:1517
struct _DPI_EXTRA_INFO::@204 DpiPivotedStackExtraInfo
struct _DPI_EXTRA_INFO::@209 DpiSecDescAclExtraInfo
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
ACL OldDacl
The old DACL header.
Definition: windpi.h:96
QWORD StolenFromEprocess
The EPROCESS address from which the token was stolen.
Definition: windpi.h:49
struct _DPI_EXTRA_INFO * PDPI_EXTRA_INFO
ACL NewSacl
The new SACL header.
Definition: windpi.h:98
QWORD Wow64StackBase
The known stack base in WoW64 mode. Valid only if the process is WoW64.
Definition: windpi.h:43
An access control list.
Definition: wddefs.h:637
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
#define _Inout_
Definition: intro_sal.h:20
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 SecDescStolenFromEproc
If the parent security descriptor has been stolen, this variable may indicate (in case we find it) th...
Definition: windpi.h:90
QWORD NewPresent
The new value from parent's token Privileges.Present field, which was deemed malicious.
Definition: windpi.h:77
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:749
ACL OldSacl
The old SACL header.
Definition: windpi.h:95
struct _DPI_EXTRA_INFO::@205 DpiStolenTokenExtraInfo
QWORD OldEnabled
Definition: windpi.h:72
ACL NewDacl
The new DACL header.
Definition: windpi.h:99
uint32_t DWORD
Definition: intro_types.h:49
struct _DPI_EXTRA_INFO::@208 DpiThreadStartExtraInfo
QWORD StackBase
The known stack base present in TIB at the moment of process creation.
Definition: windpi.h:37
struct _DPI_EXTRA_INFO::@206 DpiHeapSprayExtraInfo
enum _INTRO_ACTION INTRO_ACTION
Event actions.
QWORD NewPtrValue
New value.
Definition: windpi.h:93
QWORD OldPresent
Definition: windpi.h:75
DWORD Mapped
Definition: windpi.h:56
struct _DPI_EXTRA_INFO::@207 DpiTokenPrivsExtraInfo
struct _DPI_EXTRA_INFO::@203 DpiDebugExtraInfo
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:83