seems that this is working good! :^)

merge-requests/1/head
_xeroxz 4 years ago
parent b3eb5a9c28
commit 89e6075a50

@ -157,6 +157,9 @@
<ClInclude Include="vdm\vdm.hpp" />
<ClInclude Include="vdm_ctx\vdm_ctx.hpp" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="icon.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

@ -15,6 +15,9 @@
<Filter Include="Header Files\vdm">
<UniqueIdentifier>{96d7e756-9d5b-4c3c-b594-aff6db3f2d51}</UniqueIdentifier>
</Filter>
<Filter Include="resources">
<UniqueIdentifier>{e1778cd8-6b3a-43dc-a95c-7b6f0896373e}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp">
@ -56,4 +59,9 @@
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="icon.rc">
<Filter>resources</Filter>
</ResourceCompile>
</ItemGroup>
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

@ -0,0 +1,3 @@
// Icon Resource Definition
#define MAIN_ICON 102
MAIN_ICON ICON "icon.ico"

@ -50,11 +50,12 @@ int __cdecl main(int argc, char** argv)
return my_proc.write_phys(addr, buffer, size);
};
// abuse test, make a vdm using a mem_ctx...
vdm = vdm::vdm_ctx(_read_phys, _write_phys);
std::printf("[+] sleeping 30 seconds...\n");
Sleep(30000);
// abuse test, make a vdm using a mem_ctx...
vdm = vdm::vdm_ctx(_read_phys, _write_phys);
const auto current_pml4 =
reinterpret_cast<ppml4e>(
my_proc.set_page(my_proc.dirbase));
@ -69,6 +70,12 @@ int __cdecl main(int argc, char** argv)
std::printf(" - pfn: 0x%x\n", current_pml4[idx].pfn);
std::printf(" - writeable: %d\n", current_pml4[idx].writeable);
std::printf(" - executable: %d\n", !current_pml4[idx].nx);
if (current_pml4[idx].pfn == reinterpret_cast<std::uintptr_t>(my_proc.dirbase) >> 12)
{
std::printf(" [!]<- self referencing pml4e found at index: %d ->[!]\n", idx);
current_pml4[idx].user_supervisor = true; // you can manage your own paging tables now :^)
}
}
}

Loading…
Cancel
Save