Download to Linux
Base64
First use md5sum to check the file we want to transfer:
Now base64 encode the target:
On target system, decode base64 string:
After transferring, confirm the content with md5sum:
wget
cURL
Fileless
We don’t have to download. We can use the memory.
Fileless cURL
Fileless wget
Bash
First connect to the target webserver:
Send http get request:
Print the response:
SSH
Upload to Linux
Sometimes we need to upload files from our target machine to attack host.
Upload Server
Let’s see how we can configure uploadserver module to use HTTPs.
Spin up Web server:
Now we will create a certificate:
Let’s start a web server:
from our compromised machine, let’s upload the /etc/passwd
and /etc/shadow
files:
Python
For Python3:
For Python2:
PHP
Ruby
SCP
For copying entire directory: