Hydra
Executive Summary
Hydra is an online password attack tool used to test username and password combinations against network services.
Use this cheatsheet for quick syntax in authorized labs and assessments.
Basic Syntax
Single username and password list:
Username list and single password:
Username list and password list:
Specify port:
Common Services
SSH:
FTP:
RDP:
SMB:
Telnet:
VNC:
HTTP Basic Auth
HTTPS Basic Auth:
HTTP Forms
Basic POST form:
hydra -L users.txt -P passwords.txt TARGET_IP http-post-form "/login:username=^USER^&password=^PASS^:Invalid"
HTTPS POST form:
hydra -L users.txt -P passwords.txt TARGET_IP https-post-form "/login:username=^USER^&password=^PASS^:Invalid"
With cookie:
hydra -L users.txt -P passwords.txt TARGET_IP http-post-form "/login:username=^USER^&password=^PASS^:Invalid:H=Cookie: session=VALUE"
Form Syntax
Example:
| Part | Meaning |
|---|---|
/login |
Login path |
username=^USER^ |
Username injection point |
password=^PASS^ |
Password injection point |
Invalid password |
Text that means login failed |
Useful Options
| Option | Purpose |
|---|---|
-l |
Single username |
-L |
Username list |
-p |
Single password |
-P |
Password list |
-s |
Custom port |
-t |
Number of parallel tasks |
-f |
Stop after first valid credential |
-F |
Stop entire scan after first valid credential |
-V |
Verbose attempts |
-I |
Ignore restore file warning |
-o |
Save output |
Rate Control
Lower task count:
Stop after first valid result:
Save output:
Username and Password Lists
Single known user:
Password spraying style:
Default credentials:
Credential pair file format:
Practical Workflow
| Step | Action |
|---|---|
| Identify service | Confirm port and protocol |
| Build user list | Use known or discovered usernames |
| Choose password strategy | Wordlist, default creds, or single spray password |
| Control rate | Use lower -t to avoid lockouts |
| Run Hydra | Test only authorized targets |
| Validate result | Manually confirm valid credentials |
| Document | Save command and output |
Notes
- Online password attacks can lock accounts.
- Use low rates when testing real environments.
- Always understand password policy before spraying.
- Confirm valid credentials manually.
- Do not run Hydra outside authorized systems.