diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2019-09-16 22:28:57 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2019-09-16 22:28:57 +0200 |
commit | f3a6fea21c4ea86101e9b593a3a2245ed5da407a (patch) | |
tree | c400936fdb2c8b54f5be197ca4eaf067a88ec79c /include | |
parent | 6ca45bb8c15713521134bbf61b7bcaa49e4ef229 (diff) |
added MEM_ALLOC, MEM_FREE and MEM_UNLINK to the kernel module interface (needs to be implemented though)
Diffstat (limited to 'include')
-rw-r--r-- | include/KMemDriver.h | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/include/KMemDriver.h b/include/KMemDriver.h index 031947d..5b11642 100644 --- a/include/KMemDriver.h +++ b/include/KMemDriver.h @@ -25,7 +25,10 @@ typedef _Return_type_success_(return >= 0) LONG NTSTATUS; #define MEM_PAGES 0x803 #define MEM_RPM 0x804 #define MEM_WPM 0x805 -#define MEM_EXIT 0x806 +#define MEM_ALLOC 0x806 +#define MEM_FREE 0x807 +#define MEM_UNLINK 0x808 +#define MEM_EXIT 0x809 typedef struct _KERNEL_HEADER { @@ -103,6 +106,38 @@ typedef struct _KERNEL_WRITE_REQUEST SIZE_T SizeRes; } KERNEL_WRITE_REQUEST, *PKERNEL_WRITE_REQUEST; +typedef struct _KERNEL_ALLOC_REQUEST +{ + KERNEL_HEADER hdr; + HANDLE ProcessId; + PVOID AddressReq; + SIZE_T SizeReq; + ULONG Protection; + + NTSTATUS StatusRes; + PVOID AddressRes; + SIZE_T SizeRes; +} KERNEL_ALLOC_REQUEST, *PKERNEL_ALLOC_REQUEST; + +typedef struct _KERNEL_FREE_REQUEST +{ + KERNEL_HEADER hdr; + HANDLE ProcessId; + PVOID Address; + SIZE_T Size; + + NTSTATUS StatusRes; +} KERNEL_FREE_REQUEST, *PKERNEL_FREE_REQUEST; + +typedef struct _KERNEL_UNLINK_REQUEST +{ + KERNEL_HEADER hdr; + HANDLE ProcessId; + PVOID Address; + + NTSTATUS StatusRes; +} KERNEL_UNLINK_REQUEST, *PKERNEL_UNLINK_REQUEST; + #ifndef KERNEL_MODULE static inline VOID prepareRequest(PVOID buf, UINT32 type) @@ -131,6 +166,9 @@ validateRequest case MEM_MODULES: case MEM_RPM: case MEM_WPM: + case MEM_ALLOC: + case MEM_FREE: + case MEM_UNLINK: case MEM_EXIT: return hdr->type; default: |