diff --git a/src/driver/ept.cpp b/src/driver/ept.cpp index ae67b69..280f366 100644 --- a/src/driver/ept.cpp +++ b/src/driver/ept.cpp @@ -194,17 +194,8 @@ namespace vmx guest_context.exit_vm = true; } - auto* hook = this->ept_hooks; - while (hook) - { - if (hook->physical_base_address == reinterpret_cast(PAGE_ALIGN( - guest_context.guest_physical_address))) - { - break; - } - hook = hook->next_hook; - } - + const auto physical_base_address = reinterpret_cast(PAGE_ALIGN(guest_context.guest_physical_address)); + auto* hook = this->find_ept_hook(physical_base_address); if (!hook) { return; diff --git a/src/runner/main.cpp b/src/runner/main.cpp index 5aafaad..d6b1a59 100644 --- a/src/runner/main.cpp +++ b/src/runner/main.cpp @@ -67,9 +67,10 @@ void unsafe_main(const int /*argc*/, char* /*argv*/[]) hook_request hook_request{}; hook_request.process_id = _pid; //GetCurrentProcessId(); - hook_request.target_address = (void*)0x41297A;//0x14007DCF7; + hook_request.target_address = (void*)0x4488A8;//0x41297A; uint8_t buffer[] = {0x90, 0x90}; + //uint8_t buffer[] = { 0x48, 0x89, 0xD9, 0x90 }; hook_request.source_data = buffer; hook_request.source_data_size = sizeof(buffer);