Ultimate Hydra Cheat Sheet
A reference guide for the parallelized login cracker. Brute force everything.
1. Basic Syntax
The fundamental structure of a Hydra command.
Core Flags
-l: Single Username-L: File of Usernames-p: Single Password-P: File of Passwords
Control Flags
-s [PORT]: Specify non-default port-vV: Very Verbose (Show attempts)-f: Exit after first valid login found-o [file]: Save output to file
2. Managing Targets & Lists
Attack Single Target
Attack Multiple Targets (Mass Scan)
If you have a file targets.txt containing a list of IP addresses.
Use the
-e nsr flag to check for specific conditions:
n: Null password, s: Same as username, r: Reverse username.
3. Infrastructure Services
Cracking standard network administration protocols.
SSH (Secure Shell)
If SSH is running on a high port (e.g., 2222):
FTP (File Transfer)
Telnet
4. Web Login Forms
This is the most complex part of Hydra. You must identify the request format using Burp Suite or Inspect Element.
HTTP POST Form
Syntax: "/page:parameters:fail_message"
1. /login.php: The login page.
2. user=^USER^&pass=^PASS^: The body. Replace real values with ^USER^ and ^PASS^.
3. F=Invalid: A string that appears on the page when login FAILS.
HTTP GET Form (Basic Auth)
Used for router logins or .htaccess popups.
HTTPS Support
Simply use the https-post-form module instead.
5. Databases & Windows
RDP (Remote Desktop)
SMB (Windows Share)
MySQL Database
PostgreSQL
6. Performance & Optimization
| Flag | Description |
|---|---|
-t 4 | Number of parallel tasks (threads). Default is 16. Lower this for web apps to avoid crashes. |
-w 5 | Wait time (seconds) for response. Increase if network is slow. |
-W 1 | Wait time between login attempts (prevents blocking). |
-4 / -6 | Force IPv4 or IPv6. |
Using high threads (-t 64) on Web Forms often causes False Positives or crashes the server. Stick to -t 4 for HTTP/HTTPS.