HyperDbg Debugger
Loading...
Searching...
No Matches
Invept.c File Reference

Implementation of functions that perform different INVEPT functions. More...

#include "pch.h"

Functions

UCHAR EptInvept (_In_ UINT32 Type, _In_ INVEPT_DESCRIPTOR *Descriptor)
 Invoke the Invept instruction.
 
UCHAR EptInveptSingleContext (_In_ UINT64 EptPointer)
 Invalidates a single context in ept cache table.
 
UCHAR EptInveptAllContexts ()
 Invalidates all contexts in EPT cache table.
 

Detailed Description

Implementation of functions that perform different INVEPT functions.

Author
Sina Karvandi (sina@.nosp@m.hype.nosp@m.rdbg..nosp@m.org)
Version
0.1
Date
2020-04-11

Function Documentation

◆ EptInvept()

UCHAR EptInvept ( _In_ UINT32 Type,
_In_ INVEPT_DESCRIPTOR * Descriptor )

Invoke the Invept instruction.

Parameters
Type
Descriptor
Returns
UCHAR
23{
24 INVEPT_DESCRIPTOR ZeroDescriptor = {0};
25 if (!Descriptor)
26 {
27 Descriptor = &ZeroDescriptor;
28 }
29
30 return AsmInvept(Type, Descriptor);
31}
unsigned char AsmInvept(unsigned long Type, void *Descriptors)
INVEPT wrapper.

◆ EptInveptAllContexts()

UCHAR EptInveptAllContexts ( )

Invalidates all contexts in EPT cache table.

Returns
UCHAR
55{
56 return EptInvept(InveptAllContext, NULL);
57}
UCHAR EptInvept(_In_ UINT32 Type, _In_ INVEPT_DESCRIPTOR *Descriptor)
Invoke the Invept instruction.
Definition Invept.c:22

◆ EptInveptSingleContext()

UCHAR EptInveptSingleContext ( _In_ UINT64 EptPointer)

Invalidates a single context in ept cache table.

Parameters
EptPointer
Returns
UCHAR
41{
42 INVEPT_DESCRIPTOR Descriptor = {0};
43 Descriptor.EptPointer = EptPointer;
44 Descriptor.Reserved = 0;
45 return EptInvept(InveptSingleContext, &Descriptor);
46}