当前位置: 首页 > news >正文

计算机网络实用工具之Hydra

简介

Hydra 是一个并行登录破解程序,支持多种协议进行攻击。它非常快速且灵活,并且很容易添加新模块。 该工具使研究人员和安全顾问能够展示远程未经授权访问系统是多么容易。

目前该工具支持以下协议:

 Asterisk, AFP, Cisco AAA, Cisco auth, Cisco enable, CVS, Firebird, FTP,  HTTP-FORM-GET, HTTP-FORM-POST, HTTP-GET, HTTP-HEAD, HTTP-POST, HTTP-PROXY,  HTTPS-FORM-GET, HTTPS-FORM-POST, HTTPS-GET, HTTPS-HEAD, HTTPS-POST,  HTTP-Proxy, ICQ, IMAP, IRC, LDAP, MEMCACHED, MONGODB, MS-SQL, MYSQL, NCP, NNTP, Oracle Listener,  Oracle SID, Oracle, PC-Anywhere, PCNFS, POP3, POSTGRES, Radmin, RDP, Rexec, Rlogin,  Rsh, RTSP, SAP/R3, SIP, SMB, SMTP, SMTP Enum, SNMP v1+v2+v3, SOCKS5,  SSH (v1 and v2), SSHKEY, Subversion, Teamspeak (TS2), Telnet, VMware-Auth,  VNC and XMPP.

※注意:不要用于非法目的,不要用于非授权测试,本文意在说明弱密码的不安全性

官网

GitHub - vanhauser-thc/thc-hydra: hydra

安装

# ubuntu 20.04
# 安装hydra
root@ubuntu:~# sudo apt install hydra# 安装xhydra,该软件包为 Hydra 提供基于 GTK+ 的 GUI
root@ubuntu:~# sudo apt install hydra-gtk

使用帮助

hydra

root@ubuntu:~# hydra -h
Hydra v9.0 (c) 2019 by van Hauser/THC - Please do not use in military or secret service organizations, or for illegal purposes.Syntax: 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]]Options:-R        restore a previous aborted/crashed session-I        ignore an existing restore file (don't wait 10 seconds)-S        perform an SSL connect-s PORT   if the service is on a different default port, define it here-l LOGIN or -L FILE  login with LOGIN name, or load several logins from FILE-p PASS  or -P FILE  try password PASS, or load several passwords from FILE-x MIN:MAX:CHARSET  password bruteforce generation, type "-x -h" to get help-y        disable use of symbols in bruteforce, see above-e nsr    try "n" null password, "s" login as pass and/or "r" reversed login-u        loop around users, not passwords (effective! implied with -x)-C FILE   colon separated "login:pass" format, instead of -L/-P options-M FILE   list of servers to attack, one entry per line, ':' to specify port-o FILE   write found login/password pairs to FILE instead of stdout-b FORMAT specify the format for the -o FILE: text(default), json, jsonv1-f / -F   exit when a login/pass pair is found (-M: -f per host, -F global)-t TASKS  run TASKS number of connects in parallel per target (default: 16)-T TASKS  run TASKS connects in parallel overall (for -M, default: 64)-w / -W TIME  wait time for a response (32) / between connects per thread (0)-c TIME   wait time per login attempt over all threads (enforces -t 1)-4 / -6   use IPv4 (default) / IPv6 addresses (put always in [] also in -M)-v / -V / -d  verbose mode / show login+pass for each attempt / debug mode -O        use old SSL v2 and v3-q        do not print messages about connection errors-U        service module usage details-h        more command line options (COMPLETE HELP)server    the target: DNS, IP or 192.168.0.0/24 (this OR the -M option)service   the service to crack (see below for supported protocols)OPT       some service modules support additional input (-U for module help)Supported services: adam6500 asterisk cisco cisco-enable cvs firebird ftp[s] http[s]-{head|get|post} http[s]-{get|post}-form http-proxy http-proxy-urlenum icq imap[s] irc ldap2[s] ldap3[-{cram|digest}md5][s] memcached mongodb mssql mysql nntp oracle-listener oracle-sid pcanywhere pcnfs pop3[s] postgres radmin2 rdp redis rexec rlogin rpcap rsh rtsp s7-300 sip smb smtp[s] smtp-enum snmp socks5 ssh sshkey svn teamspeak telnet[s] vmauthd vnc xmppHydra is a tool to guess/crack valid login/password pairs. Licensed under AGPL
v3.0. The newest version is always available at https://github.com/vanhauser-thc/thc-hydra
Don't use in military or secret service organizations, or for illegal purposes.
These services were not compiled in: afp ncp oracle sapr3.Use HYDRA_PROXY_HTTP or HYDRA_PROXY environment variables for a proxy setup.
E.g. % export HYDRA_PROXY=socks5://l:p@127.0.0.1:9150 (or: socks4:// connect://)% export HYDRA_PROXY=connect_and_socks_proxylist.txt  (up to 64 entries)% export HYDRA_PROXY_HTTP=http://login:pass@proxy:8080% export HYDRA_PROXY_HTTP=proxylist.txt  (up to 64 entries)Examples:hydra -l user -P passlist.txt ftp://192.168.0.1hydra -L userlist.txt -p defaultpw imap://192.168.0.1/PLAINhydra -C defaults.txt -6 pop3s://[2001:db8::1]:143/TLS:DIGEST-MD5hydra -l admin -p password ftp://[192.168.0.0/24]/hydra -L logins.txt -P pws.txt -M targets.txt ssh

dpl4hydra

root@ubuntu:~# dpl4hydra -h
dpl4hydra v0.9.9 (c) 2012 by Roland Kessler (@rokessler)Syntax: dpl4hydra [help] | [refresh] | [BRAND] | [all]This script depends on a local (d)efault (p)assword (l)ist called
/root/.dpl4hydra/dpl4hydra_full.csv. If it is not available, regenerate it with
'dpl4hydra refresh'. Source of the default password list is
http://open-sez.meOptions:help        Help: Show this messagerefresh     Refresh list: Download the full (d)efault (p)assword (l)istand generate a new local /root/.dpl4hydra/dpl4hydra_full.csv file. Takes time!BRAND       Generates a (d)efault (p)assword (l)ist from the local file/root/.dpl4hydra/dpl4hydra_full.csv, limiting the output to BRAND systems, usingthe format username:password (as required by THC hydra).The output file is called dpl4hydra_BRAND.lst.all         Dump list of all systems credentials into dpl4hydra_all.lst.Example:
# dpl4hydra linksys
File dpl4hydra_linksys.lst was created with 20 entries.
# hydra -C ./dpl4hydra_linksys.lst -t 1 192.168.1.1 http-get /index.asp

 hydra-wizard

# 向导方式执行hydra
root@ubuntu:~# man hydra-wizard
HYDRA-WIZARD(1)                                                          General Commands Manual                                                          HYDRA-WIZARD(1)NAMEHYDRA-WIZARD - Wizard to use hydra from command lineDESCRIPTIONThis script guide users to use hydra, with a simple wizard that will make the necessary questions to launch hydra from command line a fast and easily1. The wizard ask for the service to attack2. The target to attack3. The username o file with the username what use to attack4. The password o file with the passwords what use to attack5. The wizard ask if you want to test for passwords same as login, null or reverse login6. The wizard ask for the port number to attackFinally, the wizard show the resume information of attack, and ask if you want launch attackSEE ALSOhydra(1), dpl4hydra(1),AUTHORhydra-wizard was written by Shivang Desai <shivang.ice.2010@gmail.com>.This manual page was written by Daniel Echeverry <epsilon77@gmail.com>, for the Debian project (and may be used by others).

pw-inspector

# 基于已有的密码字典,按规则过滤并生成新的密码字典
root@ubuntu:~# pw-inspector
PW-Inspector v0.2 (c) 2005 by van Hauser / THC vh@thc.org [https://github.com/vanhauser-thc/thc-hydra]Syntax: pw-inspector [-i FILE] [-o FILE] [-m MINLEN] [-M MAXLEN] [-c MINSETS] -l -u -n -p -sOptions:-i FILE    file to read passwords from (default: stdin)-o FILE    file to write valid passwords to (default: stdout)-m MINLEN  minimum length of a valid password-M MAXLEN  maximum length of a valid password-c MINSETS the minimum number of sets required (default: all given)
Sets:-l         lowcase characters (a,b,c,d, etc.)-u         upcase characters (A,B,C,D, etc.)-n         numbers (1,2,3,4, etc.)-p         printable characters (which are not -l/-n/-p, e.g. $,!,/,(,*, etc.)-s         special characters - all others not withint the sets abovePW-Inspector reads passwords in and prints those which meet the requirements.
The return code is the number of valid passwords found, 0 if none was found.
Use for security: check passwords, if 0 is returned, reject password choice.
Use for hacking: trim your dictionary file to the pw requirements of the target.
Usage only allowed for legal purposes.

使用示例

从已有密码字典生成新密码字典

# 从已有密码字典中过滤出长度为5-7位的密码
root@ubuntu:~# pw-inspector -i ./passwd.list -o ./new_passwd.list -m 5 -M 7# 原密码文件
root@ubuntu:~# cat passwd.list 
1234
12345
123456
1234567
12345678
123456789# 新密码文件
root@ubuntu:~# cat new_passwd.list 
12345
123456
1234567

使用密码字典进行密码猜解

# 用户:root,密码字典:new_passwd.list,协议:ssh,目标:192.168.21.131
root@ubuntu:~# hydra -l root -P new_passwd.list ssh://192.168.21.131
Hydra v9.0 (c) 2019 by van Hauser/THC - Please do not use in military or secret service organizations, or for illegal purposes.Hydra (https://github.com/vanhauser-thc/thc-hydra) starting at 2023-12-07 13:52:39
[WARNING] Many SSH configurations limit the number of parallel tasks, it is recommended to reduce the tasks: use -t 4
[DATA] max 3 tasks per 1 server, overall 3 tasks, 3 login tries (l:1/p:3), ~1 try per task
[DATA] attacking ssh://192.168.21.131:22/
[22][ssh] host: 192.168.21.131   login: root   password: 123456
1 of 1 target successfully completed, 1 valid password found
Hydra (https://github.com/vanhauser-thc/thc-hydra) finished at 2023-12-07 13:52:41

种草

本文为"计算机网络实用工具系列"的内容之一,会持续更新其它相关博文。

我的博文内容主要针对“计算机网络”、“安全”、“运维”和“云计算”方向,感兴趣朋友的请关注我,我将不定期发布新的博文并不断改进已发布博文。

后期依据大家对博文的评论,点赞及关注情况,针对大家感兴趣的内容我也会录制视频并整理出成套的学习资料免费分享给大家,期待能和大家一起交流学习。

相关文章:

计算机网络实用工具之Hydra

简介 Hydra 是一个并行登录破解程序&#xff0c;支持多种协议进行攻击。它非常快速且灵活&#xff0c;并且很容易添加新模块。 该工具使研究人员和安全顾问能够展示远程未经授权访问系统是多么容易。 目前该工具支持以下协议&#xff1a; Asterisk, AFP, Cisco AAA, Cisco au…...

AUTOSAR 入门

前言 AUTOSAR是什么Vector DaVinci 工具功能快捷键合理的创建标题&#xff0c;有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants 创建一个自定义列表如何创建一个注脚注释也是必…...

新版IDEA中,module模块无法被识别,类全部变成咖啡杯无法被识

新版IDEA中&#xff0c;module模块无法被识别&#xff0c;类全部变成咖啡杯无法被识 如下图&#xff1a; 解决方法&#xff1a;java的Directory文件没有被设置为根目录&#xff0c;解决方法如下&#xff1a; 这是方法之一&#xff0c;还有很多的原因 可能的原因&#xff1a; …...

vue.js el-table 动态单元格列合并

一、业务需求&#xff1a; 一个展示列表&#xff0c;表格中有一部分列是根据后端接口动态展示&#xff0c;对于不同类型的数据展示效果不一样。如果接口返回数据是’类型1‘的&#xff0c;则正常展示&#xff0c;如果是’类型2‘的数据&#xff0c;则合并当前数据的动态表格。…...

word模板导出word文件

前期准备工作word模板 右键字段如果无编辑域 ctrlF9 一下&#xff0c;然后再右键 wps 直接 ctrlF9 会变成编辑域 pom.xml所需依赖 <dependencies> <!--word 依赖--> <dependency><groupId>fr.opensagres.xdocreport</groupId><artifactId…...

debianubuntu的nvidia驱动升级

背景 给出的机器的驱动版本不符合要求&#xff0c;使用自定义的驱动版本。 前置 如果使用nvidia官方的.run安装的驱动包&#xff0c;可以使用系统自带的nvidia-uninstall命令卸载比较方便&#xff0c;不建议使用apt pruge nvidia-*命令删除。会带来其他的问题。 卸载完成之…...

【开源视频联动物联网平台】视频接入网关的用法

视频接入网关是一种功能强大的视频网关设备&#xff0c;能够解决各种视频接入、视频输出、视频转码和视频融合等问题。它可以在应急指挥、智慧融合等项目中发挥重要作用&#xff0c;与各种系统进行对接&#xff0c;解决视频能力跨系统集成的难题。 很多视频接入网关在接入协议…...

【bug排查解决】现象级延迟8-10s

业务背景 最近公司在做物联网相关的项目&#xff0c;调试过程中发现好玩的bug。 首先一个数据采集场景&#xff0c;plc采集数据全链路&#xff1a; kepServer&#xff08;kepserver IOT gateway&#xff09; -> emqx &#xff08;查看日志&#xff09;-> iot服务 -> 业…...

【人生感悟】不能对一个人太好是有心理学原理的

1、不能对一个人太好是有心理学原理的&#xff0c;当你长期友善对待一个人时&#xff0c;如果这个人认知程度不是很高&#xff0c;层次稍微的偏低&#xff0c;那他可能直接把你的友善理解为理所应当&#xff0c;甚至是你在讨好他&#xff0c;还会把你们之间的关系理解成他是高于…...

动态规划学习——最长回文子序列,让字符串变成回文串的最小插入次数

一&#xff0c;最长回文串 1.题目 给你一个字符串 s &#xff0c;找出其中最长的回文子序列&#xff0c;并返回该序列的长度。 子序列定义为&#xff1a;不改变剩余字符顺序的情况下&#xff0c;删除某些字符或者不删除任何字符形成的一个序列。 示例 1&#xff1a; 输入&…...

CSS新手入门笔记整理:CSS列表样式

列表项符号&#xff1a;list-style-type 在HTML中&#xff0c;对于有序列表和无序列表的列表项符号&#xff0c;都是使用type属性来定义的。 语法 list-style-type:取值; list-style-type属性是针对ol或者ul元素的&#xff0c;而不是li元素。 有序列表属性 属性值 说明 …...

12月07日,每日信息差

以下是2023年12月07日的11条信息差 第一、社交媒体公司X计划在日本成立应用开发团队 第二、造车进程加快&#xff0c;小米汽车在多地招聘零售门店主管&#xff0c;零售门店主管工作地点涉及武汉、重庆、长沙、郑州、佛山、东莞、厦门等城市 第三、我国西南地区首座百万千瓦级…...

spring mvc理解

spring mvc M&#xff1a;model 模型 V&#xff1a;view 视图 C&#xff1a;controller 控制器 S: service 服务处理 D: Dao 数据持久化 视图 我理解就是web页面&#xff0c;帮助用户调用后端接口。 前后端分离之后&#xff0c;view似乎就和后端没什么关系了。 模型 格式…...

HTML-标签之文字排版、图片、链接、音视频

1、标签语法 HTML超文本标记语言——HyperText Markup Language 超文本是链接标记也叫标签&#xff0c;带尖括号的文本 2、HTML基本骨架 HTML基本骨架是网页模板 html&#xff1a;整个网页head&#xff1a;网页头部&#xff0c;存放给浏览器看的代码&#xff0c;例如CSSbody…...

圣诞将至—C语言圣诞树代码来啦

文章目录 圣诞将至—C实现语言圣诞树源码 圣诞将至—C实现语言圣诞树 圣诞树 源码 #define _CRT_SECURE_NO_WARNINGS#include <stdio.h> #include <math.h> #include <stdlib.h> #include <windows.h> #include <time.h> #define PI 3.14159265…...

Git常用命令#merge分支合并

要查看所有分支&#xff0c;包括本地和远程仓库的分支&#xff0c;可以使用以下命令&#xff1a; 1.查看分支 1.1 查看本地分支 git branch这个命令会列出本地所有的分支&#xff0c;当前所在的分支会有 * 标记。 1.2 查看远程分支 git branch -r这个命令会列出远程仓库的分…...

Windows server 2019 域环境部署

环境准备 准备3台服务器&#xff0c;配置都是8g2核&#xff0c;50g硬盘&#xff0c;操作系统版本Windows Server 2019 Datacenter 域服务器&#xff1a;adc&#xff0c;192.168.56.120服务器1&#xff1a;server1:&#xff0c;192.168.56.121服务器2&#xff1a;server2&…...

Cocos Creator加入图片没有被识别

原因&#xff0c;需要更换类型&#xff0c;选择下图中的类型...

java double类型保留两位小数并去除后面多余的0

public static void main(String[] args) {double value9.100001;//保留两位小数String format String.format("%.2f", value);//去除多余的0String strValue new BigDecimal(format).stripTrailingZeros().toPlainString();System.out.println("strValue &q…...

C++学习寄录(九.多态)

1.多态基本概念 先来看这样的代码&#xff0c;我的本意是想要输出“小猫在说话”&#xff0c;但实际输出的却是“动物在说话”。这是因为地址早绑定&#xff0c;在代码编译阶段就已经确定了函数地址&#xff1b;如果想要实现既定目标&#xff0c;那么这个dospeak&#xff08;&…...

[特殊字符] 智能合约中的数据是如何在区块链中保持一致的?

&#x1f9e0; 智能合约中的数据是如何在区块链中保持一致的&#xff1f; 为什么所有区块链节点都能得出相同结果&#xff1f;合约调用这么复杂&#xff0c;状态真能保持一致吗&#xff1f;本篇带你从底层视角理解“状态一致性”的真相。 一、智能合约的数据存储在哪里&#xf…...

19c补丁后oracle属主变化,导致不能识别磁盘组

补丁后服务器重启&#xff0c;数据库再次无法启动 ORA01017: invalid username/password; logon denied Oracle 19c 在打上 19.23 或以上补丁版本后&#xff0c;存在与用户组权限相关的问题。具体表现为&#xff0c;Oracle 实例的运行用户&#xff08;oracle&#xff09;和集…...

Android Wi-Fi 连接失败日志分析

1. Android wifi 关键日志总结 (1) Wi-Fi 断开 (CTRL-EVENT-DISCONNECTED reason3) 日志相关部分&#xff1a; 06-05 10:48:40.987 943 943 I wpa_supplicant: wlan0: CTRL-EVENT-DISCONNECTED bssid44:9b:c1:57:a8:90 reason3 locally_generated1解析&#xff1a; CTR…...

手游刚开服就被攻击怎么办?如何防御DDoS?

开服初期是手游最脆弱的阶段&#xff0c;极易成为DDoS攻击的目标。一旦遭遇攻击&#xff0c;可能导致服务器瘫痪、玩家流失&#xff0c;甚至造成巨大经济损失。本文为开发者提供一套简洁有效的应急与防御方案&#xff0c;帮助快速应对并构建长期防护体系。 一、遭遇攻击的紧急应…...

基于FPGA的PID算法学习———实现PID比例控制算法

基于FPGA的PID算法学习 前言一、PID算法分析二、PID仿真分析1. PID代码2.PI代码3.P代码4.顶层5.测试文件6.仿真波形 总结 前言 学习内容&#xff1a;参考网站&#xff1a; PID算法控制 PID即&#xff1a;Proportional&#xff08;比例&#xff09;、Integral&#xff08;积分&…...

【入坑系列】TiDB 强制索引在不同库下不生效问题

文章目录 背景SQL 优化情况线上SQL运行情况分析怀疑1:执行计划绑定问题?尝试:SHOW WARNINGS 查看警告探索 TiDB 的 USE_INDEX 写法Hint 不生效问题排查解决参考背景 项目中使用 TiDB 数据库,并对 SQL 进行优化了,添加了强制索引。 UAT 环境已经生效,但 PROD 环境强制索…...

在 Nginx Stream 层“改写”MQTT ngx_stream_mqtt_filter_module

1、为什么要修改 CONNECT 报文&#xff1f; 多租户隔离&#xff1a;自动为接入设备追加租户前缀&#xff0c;后端按 ClientID 拆分队列。零代码鉴权&#xff1a;将入站用户名替换为 OAuth Access-Token&#xff0c;后端 Broker 统一校验。灰度发布&#xff1a;根据 IP/地理位写…...

spring:实例工厂方法获取bean

spring处理使用静态工厂方法获取bean实例&#xff0c;也可以通过实例工厂方法获取bean实例。 实例工厂方法步骤如下&#xff1a; 定义实例工厂类&#xff08;Java代码&#xff09;&#xff0c;定义实例工厂&#xff08;xml&#xff09;&#xff0c;定义调用实例工厂&#xff…...

【Go】3、Go语言进阶与依赖管理

前言 本系列文章参考自稀土掘金上的 【字节内部课】公开课&#xff0c;做自我学习总结整理。 Go语言并发编程 Go语言原生支持并发编程&#xff0c;它的核心机制是 Goroutine 协程、Channel 通道&#xff0c;并基于CSP&#xff08;Communicating Sequential Processes&#xff0…...

【电力电子】基于STM32F103C8T6单片机双极性SPWM逆变(硬件篇)

本项目是基于 STM32F103C8T6 微控制器的 SPWM(正弦脉宽调制)电源模块,能够生成可调频率和幅值的正弦波交流电源输出。该项目适用于逆变器、UPS电源、变频器等应用场景。 供电电源 输入电压采集 上图为本设计的电源电路,图中 D1 为二极管, 其目的是防止正负极电源反接, …...