File transfer
Introduction
During a pentesting, you will find interesting files that you may want to download for later analysis, or even you may want to upload your tools for performing attacks. However, you will not always have the means to transfer files on a restricted computer. Hence, in this section, you will see several methods to transfer files depending on the victim's OS.
Linux
Folders with write permissions
If you do not have write permissions to upload files on the victim's system, there are always some directories that allow everyone to write files on them:
nc
scp
base64
Compress the file for a smaller base64 output. Then, base64 the compressed file and copy the output on your clipboard.
Paste the output into a file and decode the file. Finally, uncompress the file.
Windows
Folders with write permissions
Certutil
With certutil, you can download files into the victim's machine. Nonetheless, take into account that the downloaded file will be analyzed by installed AVs.
Powershell
With PowerShell, you can download files.
For Powershell scripts, instead of downloading them on the disk you can store them on memory bypassing some AVs.
SMB
With the use of impacket you can create your own SMB server to upload and download files from the victim's computer.
Last updated