
PrintNightmare , Escalação Local de Privilégio do CVE-2021-1675 ou CVE-2021-34527
Exploit LPE Simples do CVE-2021-1675
CVE-2021-1675-LPE.exe C:\test\MyPigDLL.dll
MyPigDLL.dll é uma DLL de teste que criará C:\test.txt se bem-sucedida
EnumPrinterDriversW para obter pDriverPath, então não precisamos alterar o "caminho do driver hardcoded" toda vezpDriverPath no Windows Server 2008 éinfo.pDriverPath = (LPWSTR)L"C:\\Windows\\System32\\DriverStore\\FileRepository\\ntprint.inf_amd64_neutral_4616c3de1949be6d\\Amd64\\UNIDRV.DLL";
Não consigo obter este caminho via EnumPrinterDriversW, então altere o info.pDriverPath no código-fonte se quiser testar este exploit no Windows Server 2008
Em algumas situações também tem alguns bugs... faça debug com o código-fonte bruto : )
Testado com sucesso em:
Microsoft Windows Server 2012 R2 Datacenter [Versão 6.3.9600]
Microsoft Windows 10 Pro [Versão 10.0.19041.685]
Microsoft Windows Server 2008 R2 Enterprise [Versão 6.1.7601]