Bitdefender Hypervisor Memory Introspection
wintoken.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020 Bitdefender
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 #ifndef _WINTOKEN_H_
6 #define _WINTOKEN_H_
7 
8 #include "guests.h"
9 
11 
14  void
15  );
16 
19  _In_ WIN_PROCESS_OBJECT *Process
20  );
21 
25  );
26 
29  _In_ WIN_PROCESS_OBJECT *Process
30  );
31 
34  _In_ WIN_PROCESS_OBJECT *Process
35  );
36 
37 _Success_(return == TRUE)
38 BOOLEAN
40  _In_ WIN_PROCESS_OBJECT *Process,
41  _In_ BOOLEAN Check,
42  _Out_opt_ WIN_PROCESS_OBJECT **FromProcess,
43  _Out_opt_ QWORD *OldValue,
44  _Out_opt_ QWORD *NewValue
45  );
46 
49  void
50  );
51 
54  void
55  );
56 
59  _In_ WIN_PROCESS_OBJECT *Process,
60  _In_ QWORD TokenPtr,
61  _In_ BOOLEAN IntegrityCheck,
62  _Out_ BOOLEAN *PresentIncreased,
63  _Out_ BOOLEAN *EnabledIncreased,
64  _Out_opt_ QWORD *Present,
65  _Out_opt_ QWORD *Enabled
66  );
67 
68 #endif
#define _Out_
Definition: intro_sal.h:22
_Bool BOOLEAN
Definition: intro_types.h:58
#define _In_
Definition: intro_sal.h:21
INTSTATUS IntWinTokenPrivsCheckIntegrityOnProcess(WIN_PROCESS_OBJECT *Process)
This function checks if the privileges bitfields for the given process have been changed in a malicio...
Definition: wintoken.c:958
#define _Success_(expr)
Definition: intro_sal.h:47
INTSTATUS IntWinTokenUnprotectPrivs(void)
Unprotects all the currently protected tokens belonging to processes against privileges manipulation...
Definition: wintoken.c:1299
INTSTATUS IntWinTokenProtectPrivs(void)
Protects all the currently unprotected tokens belonging to processes against privileges manipulation...
Definition: wintoken.c:1258
int INTSTATUS
The status data type.
Definition: introstatus.h:24
INTSTATUS IntWinTokenPrivsProtectOnProcess(WIN_PROCESS_OBJECT *Process)
Updates the stored original Privileges bitfields (Present and Enabled) and hooks through EPT the Priv...
Definition: wintoken.c:1163
#define _Inout_
Definition: intro_sal.h:20
#define _Out_opt_
Definition: intro_sal.h:30
unsigned long long QWORD
Definition: intro_types.h:53
BOOLEAN IntWinTokenPtrIsStolen(WIN_PROCESS_OBJECT *Process, BOOLEAN Check, WIN_PROCESS_OBJECT **FromProcess, QWORD *OldValue, QWORD *NewValue)
This function checks if the security token of a given process has been stone from another process...
Definition: wintoken.c:625
#define TRUE
Definition: intro_types.h:30
#define TIMER_FRIENDLY
Definition: introdefs.h:83
INTSTATUS IntWinTokenCheckCurrentPrivileges(WIN_PROCESS_OBJECT *Process, QWORD TokenPtr, BOOLEAN IntegrityCheck, BOOLEAN *PresentIncreased, BOOLEAN *EnabledIncreased, QWORD *Present, QWORD *Enabled)
Verifies the current token if the current Privileges.Present and Privileges.Enabled fields were not a...
Definition: wintoken.c:811
INTSTATUS IntWinTokenPtrCheckIntegrityOnProcess(WIN_PROCESS_OBJECT *Process)
This function checks if the security token of a given process has been stone from another process...
Definition: wintoken.c:719
INTSTATUS IntWinTokenPrivsUnprotectOnProcess(WIN_PROCESS_OBJECT *Process)
Definition: wintoken.c:1224
struct _WIN_PROCESS_OBJECT * PWIN_PROCESS_OBJECT
Definition: wintoken.h:10
TIMER_FRIENDLY INTSTATUS IntWinTokenCheckIntegrity(void)
This function checks the integrity of the security token for all the processes inside gWinProcesses...
Definition: wintoken.c:1097
This structure describes a running process inside the guest.
Definition: winprocess.h:83