Hydra User Guide
https://github.com/vanhauser-thc/thc-hydra
Installation
sudo apt-get -y install hydraBasic Syntax
hydra [login_options] [password_options] [attack_options] [service_options]Options Table
-l LOGIN
Single username
hydra -l admin ...
-L FILE
Username list file
hydra -L users.txt ...
-p PASS
Single password
hydra -p password123 ...
-P FILE
Password list file
hydra -P passwords.txt ...
-t TASKS
Parallel tasks (threads)
hydra -t 4 ...
-f
Stop after first valid login
hydra -f ...
-F
Stop after first valid login (global)
hydra -F ...
-s PORT
Non-default port
hydra -s 2222 ...
-v / -V
Verbose / Very verbose
hydra -V ...
-M FILE
List of target servers
hydra -M targets.txt ...
-x MIN:MAX:CHARSET
Generate passwords
hydra -x 6:8:a1 ...
Services Table
ssh
SSH
hydra -l root -P pass.txt ssh://192.168.1.100
ftp
FTP
hydra -l admin -P pass.txt ftp://192.168.1.100
http-get
HTTP Basic Auth
hydra -L users.txt -P pass.txt example.com http-get /
http-post-form
Web Login Form (HTTP)
See below
https-post-form
Web Login Form (HTTPS)
Same syntax as http-post-form, use for HTTPS
rdp
Remote Desktop
hydra -l admin -P pass.txt rdp://192.168.1.100
smb
SMB
hydra -l admin -P pass.txt 192.168.1.100 smb
mysql
MySQL
hydra -l root -P pass.txt mysql://192.168.1.100
mssql
MS SQL Server
hydra -l sa -P pass.txt mssql://192.168.1.100
vnc
VNC
hydra -P pass.txt vnc://192.168.1.100
pop3
POP3 Mail
hydra -l user -P pass.txt pop3://mail.server.com
imap
IMAP Mail
hydra -l user -P pass.txt imap://mail.server.com
smtp
SMTP Mail
hydra -l user -P pass.txt smtp://mail.server.com
ldap2
LDAP
hydra -L users.txt -P pass.txt 192.168.1.100 ldap2
snmp
SNMP
hydra -P pass.txt 192.168.1.100 snmp
Hydra Syntax
The correct hydra syntax is depended upon the service you are going after. For example if we want to hit ftp we should use:
FTP
SSH
-lis to specify the usernamePis to specify a password list-tis to specify the number of threads to run hydra with.Note: Hydra recommends no more than 4 threads, however you can run it faster with
-t 16.-Fmeans stop when you find your first valid password, highly recommend this option
POST Web Form
Hydra can be used to brute force web logins as well.
Step 1: Determine the request made to the form (POST/GET)
Identify this in the network tab (developer tools), view the source code, or use Burp Suite.
Syntax
Success vs Failure Conditions
F=string
Failure - Text in response when login fails
F=Invalid credentials
S=string
Success - Text in response when login works
S=Dashboard
S=302
Success - HTTP redirect on successful login
S=302
Use F= when you know the failure message (most common):
Use S= when you know what success looks like:
Full Example
http-post-formspecifies the type of form/login urlthe login page URL i.e.http://dont-brute-force-me.com/login.php:usernamethe form field name for the username^USER^this tells hydra to use the username you specifiedpasswordthe form field name for the password^PASS^the password list specified in the commandF=incorrectthe word that appears on the page if the login fails-vVspecifies very verbose outputHydra non default ssh port:
HTTP-GET
Basic Authentication HTTP-GET
Example Syntax
Additional Syntax Formats
Last updated