Transferring Files To Linux
All the ways to download your files when on a Linux machine.
Wget
A Linux command-line tool that you can find on most machines you will encounter. Use in conjunction with an HTTP file server in the previous section.
You can also navigate to the shared files over HTTP by going to http://192.168.1.1:80
.
Curl
If not told otherwise, curl writes the received data to stdout. It can be instructed to instead save that data into a local file, using the -o, --output or -O, --remote-name options. Use in conjunction with an HTTP file server in the previous section.
You can also navigate to the shared files over HTTP by going to http://192.168.1.1:80
.
Netcat
This is one of the rare instances where I include how to host the file as well, since Netcat is such a diverse tool and not just for file transfers. The way I remember the direction of arrows is first we need to send >
the file and then receive <
it. This tool is especially excellent in that you can reverse the order and download a file from the victim instead. You do not need to have this file hosted on an HTTP web server, as the hosting is done with netcat.
SSH
This is more niche as it obviously relies on having SSH credentials. If you are using something like an id_rsa file instead, reflect those changes but keep the scp
and :/tmp
. The :
is not an error here, I have forgotten it too many times. /tmp
is whatever directory on the victim you want to transfer the file to.
SMB
Even if no password is set for the SMB share, you will still have to press enter upon the password prompt. /share
references the share name and is not a default share name, but I usually name my SMB shares “share” for this reason. smb \>
represents once you have connected to the share and is not a part of the command that you need to run. Refer to the previous section on starting an SMB share.
FTP
After you are entered the connect command, it will prompt you for both the username and password you want to enter. Even if you are connecting anonymously, you will still have to enter the anonymous:anonymous
credentials. From there, you can navigate the file share like a normal directory. Always use the help
command if you are unsure of how to download or upload files.
You can also access FTP on any browser by appending ftp://
before the address. You will still be prompted for credentials.
Last updated