
PrintNightmare , Escalation locale dei privilegi di CVE-2021-1675 o CVE-2021-34527
Semplice exploit LPE di CVE-2021-1675
CVE-2021-1675-LPE.exe C:\test\MyPigDLL.dll
MyPigDLL.dll, è una DLL di test che creerà C:\test.txt in caso di successo
EnumPrinterDriversW per ottenere pDriverPath, così non è necessario cambiare il "percorso driver hardcoded" ogni voltapDriverPath su Windows Server 2008 èinfo.pDriverPath = (LPWSTR)L"C:\\Windows\\System32\\DriverStore\\FileRepository\\ntprint.inf_amd64_neutral_4616c3de1949be6d\\Amd64\\UNIDRV.DLL";
Non riesco a ottenere questo percorso tramite EnumPrinterDriversW, quindi cambia il info.pDriverPath nel codice sorgente se vuoi testare questo exploit su Windows Server 2008
In alcune situazioni ha anche qualche bug... per favore fai debug con il codice sorgente grezzo : )
Test riuscito su :
Microsoft Windows Server 2012 R2 Datacenter [Versione 6.3.9600]
Microsoft Windows 10 Pro [Versione 10.0.19041.685]
Microsoft Windows Server 2008 R2 Enterprise [Versione 6.1.7601]