SSH
Pentesting SSH - TCP Port 22
Theory
Practice
Enumerate SSH server
# Send default nmap scripts for SSH and retreive version
nmap -p22 <ip> -sC -sV
# Send all nmap ssh related scripts
nmap -p22 <ip> --script ssh-*
# Retrieve supported algorythms
nmap -p22 <ip> --script ssh2-enum-algos
# Retrieve weak keys
nmap -p22 <ip> --script ssh-hostkey --script-args ssh_hostkey=full
# Check authentication methods for an user
nmap -p22 <ip> --script ssh-auth-methods --script-args="ssh.user=root"nc -vn <IP> 22#Basic audit
python ssh-audit.py <IP>Enumerate Users
Brute-Force Credentials
Crack SSH Private Key
SSH Private KeysPersistence
SSH for PersistenceResources
Last updated