|
|
@ -27,22 +27,20 @@ int __cdecl main(int argc, char** argv)
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
vdm::msrexec_ctx msrexec(_write_msr);
|
|
|
|
vdm::msrexec_ctx msrexec(_write_msr);
|
|
|
|
for(auto idx = 0u; idx < 100; ++idx)
|
|
|
|
msrexec.exec([&](void* krnl_base, get_system_routine_t get_kroutine) -> void
|
|
|
|
{
|
|
|
|
{
|
|
|
|
msrexec.exec([&](void* krnl_base, get_system_routine_t get_kroutine) -> void
|
|
|
|
const auto dbg_print =
|
|
|
|
{
|
|
|
|
reinterpret_cast<dbg_print_t>(
|
|
|
|
const auto dbg_print =
|
|
|
|
get_kroutine(krnl_base, "DbgPrint"));
|
|
|
|
reinterpret_cast<dbg_print_t>(
|
|
|
|
|
|
|
|
get_kroutine(krnl_base, "DbgPrint"));
|
|
|
|
const auto ex_alloc_pool =
|
|
|
|
|
|
|
|
reinterpret_cast<ex_alloc_pool_t>(
|
|
|
|
const auto ex_alloc_pool =
|
|
|
|
get_kroutine(krnl_base, "ExAllocatePool"));
|
|
|
|
reinterpret_cast<ex_alloc_pool_t>(
|
|
|
|
|
|
|
|
get_kroutine(krnl_base, "ExAllocatePool"));
|
|
|
|
dbg_print("> allocated pool -> 0x%p\n", ex_alloc_pool(NULL, 0x1000));
|
|
|
|
|
|
|
|
dbg_print("> cr4 -> 0x%p\n", __readcr4());
|
|
|
|
dbg_print("> allocated pool -> 0x%p\n", ex_alloc_pool(NULL, 0x1000));
|
|
|
|
dbg_print("> hello world!\n");
|
|
|
|
dbg_print("> cr4 -> 0x%p\n", __readcr4());
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const auto unload_result =
|
|
|
|
const auto unload_result =
|
|
|
|
vdm::unload_drv(drv_handle, drv_key);
|
|
|
|
vdm::unload_drv(drv_handle, drv_key);
|
|
|
|