Multithreaded ssh scanner for networks
You need to install libssh-dev
. After that, you can just invoque make
sshscan [OPTIONS] [USER_PASSW FILE] [IP RANGE]
Options are:
-t [NUMTHREADS]
: Change the number of threads used. Default is 32.-p [PORT]
: Specify another port to connect to.-h
: Show this help.-v
: Verbose mode.
Examples
.\sshscan userpasswdfile 192.168.0.0/24
.\sshscan -t 128 -v userpasswd 192.168.0.0/24
Like THC-Hydra, Ncrack or Medusa. The same brute force attack we did on the upper section could be done with this tools:
hydra -C userpasswdfile 192.168.0.0/24 ssh
ncrack -p 22 -U userfile -P passwdfile 192.168.0.0/24
medusa -C userpasswdfile -h 192.168.0.0/24 -M ssh
#As root or via sudo, type this to see all failed login attempts
cat /var/log/auth.log | grep 'sshd.*Invalid'
#If you want to see successful logins, type this
cat /var/log/auth.log | grep 'sshd.*opened'