11 #define MAX_MEM_TABLE_SIZE 256 25 #define MEM_TABLE_HEADER_SIZE 47 26 #define MEM_TABLE_ENTRY_SIZE 11u 27 #define MAX_MEM_TABLE_SLACK_SIZE ((MEM_TABLE_HEADER_SIZE) + (MEM_TABLE_ENTRY_SIZE) * (MAX_MEM_TABLE_SIZE)) 88 #endif // _MEM_TABLES_H_
void * SlackCloak
Slack handler cloak handle.
INTSTATUS IntMtblCheckAccess(void)
Check if the current instruction is like a switch-case table access instruction.
BOOLEAN IntMtblIsPtrInReloc(QWORD Ptr, THS_PTR_TYPE Type, QWORD *Table)
Check if the given pointer is inside a mem-table relocation handler.
BOOLEAN InAgent
True if we relocated the instruction inside the PT filter agent.
int INTSTATUS
The status data type.
struct _MEM_TABLE_RELOC * PMEM_TABLE_RELOC
struct _MEM_TABLE_RELOC MEM_TABLE_RELOC
BOOLEAN IntMtblInsRelocated(QWORD Rip)
Check if the instruction at the provided RIP is instrumented.
void IntMtblDisable(void)
Disables mem-table instructions instrumentation.
BOOLEAN Patched
True if the instruction has been instrumented.
QWORD SlackAddress
Slack address where the handler was allocated.
void * InsCloak
Instrumented instruction cloak handle.
BOOLEAN Ignored
True if we didn't manage to hook it.
QWORD TableGva
Guest virtual address of the switch-case table accessed by the instruction.
QWORD Rip
RIP of the instrumented instruction.
BOOLEAN Dumped
TRUE if it's a problematic table and we dumped it's content in an error.
INTSTATUS IntMtblRemoveAgentEntries(void)
Removes only the mem-table entries that were relocated inside the PT filter.
THS_PTR_TYPE
The type of pointer to be checked.
DWORD SlackSize
Size of the allocated slack buffer.
QWORD Hits
Number of times this instruction generated a read EPT violation.
INTSTATUS IntMtblUninit(void)
Completely uninit the mem-tables, removing all the handlers from the NT slack space.
LIST_ENTRY Link
List element link.