【笔记】Hydra学习笔记

前言

Hydra is a parallelized login cracker which supports numerous protocols to attack. It is very fast and flexible, and new modules are easy to add. This tool makes it possible for researchers and security consultants to show how easy it would be to gain unauthorized access to a system remotely.(Kali

本文仅用于网络信息防御学习

下载项目

1
git clone https://github.com/vanhauser-thc/thc-hydra

Windows版本

1
git clone https://github.com/maaaaz/thc-hydra-windows

基本命令

<ip>:目标IP地址
<service>:指定爆破的服务,如:telnet,ftp,pop3等

-l <username>:如果知道用户名,直接指定
-L <file>:指定用户名字典
-p <password>:如果知道密码,直接指定
-P <file>:指定密码字典
-M <file>:指定IP列表文件,进行批量破解
-s <port>:指定端口号
-e nsr:额外选项,n:空密码试探,s:使用指定账户密码试探,r:反向
-o <file>:指定输出的结果的文件
-f:当出现第一对破解成功的用户名和密码时,终止破解
-t <num>:指定线程数,默认为16
-w <num>:指定最大超时时间
-v-V:显示详细过程
-R /path/to/hydra.restore:恢复上一次中断的爆破
-x:自定义密码

1
hydar <ip> <service>

各种协议

FTP协议

1
hydra -L <file> -P <file> -v -t 6 -e ns <ip>

HTTP协议

GET方式登录

1
hydra -L <file> -P <file> -v -e ns <ip> http-get /admin/

POST方式登录

1
hydra -L <file> -P <file> -v -s 9900 <ip> http-post-form "/admin/index.php?action=login:user=USER&pwd=PASS:"

HTTPS协议

1
hydra -L <file> -P <file> -v -m /index.php <ip> https

SMB协议

1
hydra -L <file> -P <file> <ip> smb

RDP协议

  • Windows远程桌面
1
hydra -l administrator -P <file> -v <ip> rdp

POP3协议

1
hydra -L <file> -P <file> my.pop3.mail pop3

Telnet协议

1
hydra -L <file> -P <file> -s 23 -v -t 32 -e ns <ip> telnet

Teamspeak

1
hydra -L <file> -P <file> -s <port> <ip> teamspeak

路由器

-x 6:10:1a.~!@#$%^&()-=:长度6~10位,包含字符数字、字母、特殊字符

1
hydra -l admin -x 6:10:1a.~!@#$%^&()-= 192.168.1.1 http-get /

Cisco

1
2
hydra -P <file> <ip> cisco
hydra -m cloud -P <file> <ip> cisco-enabl

Hyday支持的所有协议列表

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
asterisk
cisco
cisco-enable
cvs
firebird
ftp
ftps
http
https
http-proxy
http-proxy-urlenum
icq
imap
imaps
irc
ldap2
ldap2s
ldap3
ldap3s
mssql
mysql
nntp
oracle-listener
oracle-sidpcanywhere
pcnfs
pop3
pop3s
postgres
rdp
redis
rexec
rlogin
rsh
s7-300
sip
smb
smtp
smtps
smtp-enum
snmp
socks5
ssh
sshkey
teamspeak
telnet
telnets
vmauthd
vnc
xmpp

完成

参考文献

微信公众号——白帽子左一
CSDN——L e x
哔哩哔哩——千锋教育网络安全学院