21 _In_ void *IntegrityRegion
67 _Out_ void **Descriptor
95 #endif // _INTEGRITY_H_
INTSTATUS IntIntegrityAddRegion(QWORD VirtualAddress, DWORD Length, INTRO_OBJECT_TYPE Type, void *Context, PFUNC_IntegrityViolationCallback Callback, BOOLEAN CopyContent, void **Descriptor)
Creates an INTEGRITY_REGION object and adds it to the gIntegrityRegions list.
void * Context
User supplied context, see IntIntegrityAddRegion for an example.
PFUNC_IntegrityViolationCallback Callback
The callback to be called when a violation occurs.
int INTSTATUS
The status data type.
INTSTATUS(* PFUNC_IntegrityViolationCallback)(void *IntegrityRegion)
Integrity violation callback.
INTSTATUS IntIntegrityDeleteRegion(void *Descriptor)
Marks the given integrity region for deletion. It will be removed after calling all the integrity cal...
LIST_ENTRY Link
Link to the next integrity region.
DWORD ViolationCount
The number of detected modifications on the given region.
struct _INTEGRITY_REGION * PINTEGRITY_REGION
INTRO_OBJECT_TYPE Type
The associated INTRO_OBJECT_TYPE with the protected region.
enum _INTRO_OBJECT_TYPE INTRO_OBJECT_TYPE
The type of the object protected by an EPT hook.
INTSTATUS IntIntegrityRecalculate(INTEGRITY_REGION *IntegrityRegion)
Recalculates the hash and reads the original content again for a given region.
INTSTATUS IntIntegrityUninit(void)
Uninits the integrity mechanism by removing every integrity region from the list. ...
BOOLEAN Deleted
Set TRUE for postpone deleting of integrity regions (e.g. deleting from callback) ...
DWORD ModifiedHash
The newly computed hash when a modification is detected.
QWORD Gva
The guest virtual address where the region starts.
INTSTATUS IntIntegrityRemoveRegion(void *Descriptor)
Removes an integrity region from the gIntegrityRegions list.
void IntIntegrityDump(void)
Dumps all the INTEGRITY_REGION structures from gIntegrityRegions. Used mainly for debugging...
void * OriginalContent
A buffer containing the original bytes of the associated region.
struct _INTEGRITY_REGION INTEGRITY_REGION
DWORD Length
The length of the current region, in bytes.
INTSTATUS IntIntegrityCheckAll(void)
The function which is called once every second and checks all the integrity regions.