cleanup repo
@@ -1,8 +1,8 @@
|
||||

|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
# evil-mhyprot-cli
|
||||
A PoC for vulnerable driver "mhyprot" that allows us to read/write memory in kernel/user from usermode.
|
||||
@@ -87,7 +87,7 @@ Since around ioctl functions and its functionalities are packed, to reverse engi
|
||||
but I can still easily find the function that registered at `DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL]` since the IOCTL handler must have an `IoCompleteRequest` or like `IofCompleteRequest` that exported by `ntoskrnl`.
|
||||
(Btw `IoCompleteRequest` is just a wrapper of `IofCompleteRequest`)
|
||||
|
||||

|
||||

|
||||
|
||||
As mhyprot imports `IofCompleteRequest` then go xrefs, and we will see there are many ioctl handlers.
|
||||
Concretely, I found two big subroutine in packed segment.
|
||||
@@ -271,13 +271,13 @@ PAGE:FFFFF800188CD31B jmp loc_FFFFF800188CD21C
|
||||
|
||||
Call map:
|
||||
|
||||

|
||||

|
||||
|
||||
### Proof
|
||||
|
||||
I have confirmed that by simply hooking mhyprot kernel module:
|
||||
|
||||

|
||||

|
||||
|
||||
## A Way of Read Kernel Memory
|
||||
|
||||
@@ -329,14 +329,14 @@ And the `sub_FFFFF800188C63A8` is like:
|
||||
|
||||
Here is the ioctl handlers, found the `0x83064000`(`MHYPROT_IOCTL_READ_KERNEL_MEMORY`) as `cmp ecx, 83064000h` and some another ioctl codes as follows:
|
||||
|
||||

|
||||

|
||||
|
||||
Call map:
|
||||
|
||||
As I defined as `DWORD result` in [mhyprot.hpp#L40](https://github.com/kkent030315/evil-mhyprot-cli/blob/main/src/mhyprot.hpp#L40) the first 4bytes is result.
|
||||
I can guess it's a `NTSTATUS` as it typedef'ed as `typedef LONG NTSTATUS` natively and the dispathers return types are `NTSTATUS` and the result will directly be got stored from it.
|
||||
|
||||

|
||||

|
||||
|
||||
## Enumerate Modules
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 140 KiB |
|
Before Width: | Height: | Size: 211 KiB After Width: | Height: | Size: 211 KiB |
|
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 127 KiB |
|
Before Width: | Height: | Size: 277 KiB After Width: | Height: | Size: 277 KiB |
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |