SSH Pentest - Cheat Sheet
SSH Pentest - Cheat Sheet
SSH Pentest - Cheat Sheet
protocol such as v1
nc 192.168.1.5 22
Banner grabbing If the default SSH banner is displayed, identify what software package
it uses and does it have any publicly known vulnerabilities and exploits
Dictionary attack Note: l requires username for bruteforcing and rockyou.txt contains
the list of passwords to bruteforce
Identify output for each Nmap script and determine weaknesses/related vulnerabilities and
nmap -p22 192.168.1.5 --script ssh* exploits and also information that can help to narrow down further attacks on the SSH server
NSE Scripts Note: SSH* will run all SSH scripts on the
target server
1. Find exploit
2. Compile exploit
Search in Exploit-DB We may need to add our target IP address
manually within the code before compiling
Once SSH software package name and Check all auxiliaries and exploits and identify
version is identified, search within the the specific one that alings with your SSH
Search Metasploit auxiliary and Metasploit search libssh version before running
exploits
On the compromised system/server, perform SSH tunneling and SSH Reference: https://guide.offsecnewbie.com/
port forwarding where required in order to perform pivoting port-forwarding-ssh-tunneling
Port Forwarding / SSH Tunneling