【kali】kali暴力破解工具-hydra

2336 2
VIPZephyr 2024-7-9 14:23:09 | 显示全部楼层 |阅读模式
本帖最后由 xiao~孟 于 2024-7-11 10:55 编辑

简介
hydra是著名黑客组织thc的一款开源的暴力破解密码工具,功能非常强大,kali下是默认安装的,几乎支持所有协议的在线破解。密码能否破解,在于字典是否强大。本文仅从安全角度去讲解工具的使用,请勿用于非法用途。
hydra的使用使用方法:hydra <参数> <IP地址> <服务名>帮助命令:hydra -h  //查看基本用法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 #目标ipservice #指定服务名OPT #可选项
使用时加上 -vV -e ns输出详细信息和空密码测试,电脑牛逼性能强可以 -t设置线程1000或10000手动滑稽,线程越大速度越快。
前提准备两个字典,一个用户名,一个密码,字典约强大约容易爆破成功
kali中自带的字典
位置:/usr/share/wordlists/

dirb目录下的字典如下
big.txt #大的字典small.txt #小的字典catala.txt #项目配置字典common.txt #公共字典euskera.txt #数据目录字典extensions_common.txt #常用文件扩展名字典indexes.txt #首页字典mutations_common.txt #备份扩展名spanish.txt #方法名或库目录others #扩展目录,默认用户名、默认密码等stress #压力测试vulns #漏洞测试
dirbuster目录下的字典如下
apache-user-enum-** #apache用户枚举directories.jbrofuzz #目录枚举directory-list-1.0.txt #目录列表
字典很多,需要什么字典就用神魔字典就行
破解ssh
攻击机:kali
ip地址为:192.168.170.130
被爆破的主机:centos7
ip地址为:192.168.170.128
使用如下命令进行爆破
hydra -L user.txt -P password.txt 192.168.170.128 ssh
可以看到这里已经爆破成功,用户名和密码都为root
爆破3389远程桌面(rdp)
攻击机:kali
ip地址为:192.168.170.130
被爆破的主机:windows7
ip地址为:192.168.170.131
使用如下命令进行爆破
hydra -L user.txt -P password.txt 192.168.170.131 rdp -vV -e ns

爆破成功用户名为administrator 密码:123
破解ftp
攻击机:kali
ip地址为:192.168.170.130
被爆破的主机:windows7
ip地址为:192.168.170.131
使用如下命令
hydra -L user.txt -P password.txt 192.168.170.131 ftp -vV -e ns



来自圈子: 中国特别行政小组
CPchengpu 2024-7-9 15:52:08 来自手机 | 显示全部楼层
可以啊,等会儿开电脑试试
VIPZephyr 2024-7-26 15:50:50 | 显示全部楼层
┌──(root㉿kali)-[/home/kali]
└─# nmap --script=vuln www.h-acker.cn
Starting Nmap 7.92 ( https://nmap.org ) at 2024-07-26 11:26 UTC
Stats: 0:00:47 elapsed; 0 hosts completed (1 up), 1 undergoing Script Scan
NSE Timing: About 80.71% done; ETC: 11:27 (0:00:06 remaining)
Stats: 0:00:48 elapsed; 0 hosts completed (1 up), 1 undergoing Script Scan
NSE Timing: About 80.79% done; ETC: 11:27 (0:00:06 remaining)
Stats: 0:01:50 elapsed; 0 hosts completed (1 up), 1 undergoing Script Scan
NSE Timing: About 96.73% done; ETC: 11:28 (0:00:03 remaining)
Stats: 0:02:55 elapsed; 0 hosts completed (1 up), 1 undergoing Script Scan
NSE Timing: About 99.69% done; ETC: 11:29 (0:00:00 remaining)
Nmap scan report for www.h-acker.cn (110.40.41.203)
Host is up (0.044s latency).
Not shown: 964 closed tcp ports (reset)
PORT      STATE    SERVICE
22/tcp    open     ssh
80/tcp    open     http
|_http-stored-xss: Couldn't find any stored XSS vulnerabilities.
|_http-dombased-xss: Couldn't find any DOM based XSS.
|_http-csrf: Couldn't find any CSRF vulnerabilities.
|_http-aspnet-debug: ERROR: Script execution failed (use -d to debug)
| http-slowloris-check:
|   VULNERABLE:
|   Slowloris DOS attack
|     State: LIKELY VULNERABLE
|     IDs:  CVE:CVE-2007-6750
|       Slowloris tries to keep many connections to the target web server open and hold
|       them open as long as possible.  It accomplishes this by opening connections to
|       the target web server and sending a partial request. By doing so, it starves
|       the http server's resources causing Denial Of Service.
|      
|     Disclosure date: 2009-09-17
|     References:
|       http://ha.ckers.org/slowloris/
|_      https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-6750
|_http-vuln-cve2014-3704: ERROR: Script execution failed (use -d to debug)
82/tcp    open     xfer
88/tcp    open     kerberos-sec
99/tcp    open     metagram
135/tcp   filtered msrpc
139/tcp   filtered netbios-ssn
443/tcp   open     https
|_http-csrf: Couldn't find any CSRF vulnerabilities.
|_http-dombased-xss: Couldn't find any DOM based XSS.
|_http-stored-xss: Couldn't find any stored XSS vulnerabilities.
|_http-aspnet-debug: ERROR: Script execution failed (use -d to debug)
|_http-vuln-cve2017-1001000: ERROR: Script execution failed (use -d to debug)
|_http-vuln-cve2014-3704: ERROR: Script execution failed (use -d to debug)
445/tcp   filtered microsoft-ds
593/tcp   filtered http-rpc-epmap
666/tcp   open     doom
888/tcp   open     accessbuilder
999/tcp   open     garcon
1083/tcp  open     ansoft-lm-1
1688/tcp  open     nsjtp-data
1900/tcp  filtered upnp
1999/tcp  filtered tcp-id-port
2260/tcp  open     apc-2260
2301/tcp  open     compaqdiag
4443/tcp  open     pharos
4444/tcp  filtered krb524
5555/tcp  open     freeciv
5901/tcp  filtered vnc-1
6666/tcp  open     irc
6667/tcp  open     irc
8000/tcp  open     http-alt
|_http-aspnet-debug: ERROR: Script execution failed (use -d to debug)
8002/tcp  open     teradataordbms
8008/tcp  open     http
|_http-dombased-xss: Couldn't find any DOM based XSS.
|_http-stored-xss: Couldn't find any stored XSS vulnerabilities.
|_http-vuln-cve2014-3704: ERROR: Script execution failed (use -d to debug)
|_http-csrf: Couldn't find any CSRF vulnerabilities.
|_http-aspnet-debug: ERROR: Script execution failed (use -d to debug)
8010/tcp  open     xmpp
8083/tcp  open     us-srv
8089/tcp  open     unknown
8443/tcp  open     https-alt
|_http-aspnet-debug: ERROR: Script execution failed (use -d to debug)
|_http-vuln-cve2014-3704: ERROR: Script execution failed (use -d to debug)
|_ssl-ccs-injection: No reply from server (TIMEOUT)
8888/tcp  open     sun-answerbook
9999/tcp  open     abyss
12345/tcp open     netbus
32768/tcp open     filenet-tms

Nmap done: 1 IP address (1 host up) scanned in 410.70 seconds
                                                                             
┌──(root㉿kali)-[/home/kali]
└─#
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

中国红客联盟公众号

联系站长QQ:5520533

admin@chnhonker.com
Copyright © 2001-2025 Discuz Team. Powered by Discuz! X3.5 ( 粤ICP备13060014号 )|天天打卡 本站已运行