Skip to content

Hydra

75 commands

A fast, parallel online login brute-forcer supporting SSH, FTP, HTTP forms, SMB, RDP, databases and dozens more protocols.

  • brute force
  • online attacks
  • authentication

Install Hydra

sudo apt install hydra

Basic Syntax1

hydra -h

Displays the main help menu and list of supported protocols.

Basic Credential Testing2

hydra -l admin -p password ssh://127.0.0.1

Tests a single username and single password against an SSH service.

hydra -l root -p toor ftp://127.0.0.1

Tests a single username and password against an FTP service.

Target Specification2

hydra -l admin -p password ssh://127.0.0.1:2222

Targets a service running on a non-standard port using URI syntax.

hydra -l admin -p password -s 2222 127.0.0.1 ssh

Targets a service on a non-standard port using the -s flag.

Username and Password Handling4

hydra -L users.txt -p password ssh://127.0.0.1

Tests a list of usernames against a single fixed password.

hydra -l admin -P passwords.txt ssh://127.0.0.1

Tests a single username against a wordlist of passwords.

hydra -L users.txt -P passwords.txt ssh://127.0.0.1

Performs a full matrix attack using both a username list and a password list.

hydra -C creds.txt ssh://127.0.0.1

Uses a colon-separated credentials file (user:pass) instead of separate lists.

Password Generation2

hydra -l admin -x 4:4:a ssh://127.0.0.1

Generates passwords on the fly (4 chars, lowercase only) instead of using a wordlist.

Link
hydra -l admin -x 4:6:a1 ssh://127.0.0.1

Generates passwords from length 4 to 6 using lowercase letters and numbers.

Link

Target Lists1

hydra -M targets.txt -l admin -P passwords.txt ssh

Attacks a list of target IPs provided in a file.

Link

Protocol Specific: RDP1

hydra -l admin -P passwords.txt rdp://127.0.0.1

Tests credentials against Remote Desktop Protocol (RDP).

Link

Protocol Specific: SMB1

hydra -l admin -P passwords.txt smb://127.0.0.1

Tests credentials against Server Message Block (SMB).

Link

Protocol Specific: VNC1

hydra -P passwords.txt vnc://127.0.0.1

Tests passwords against VNC (which typically only requires a password).

Link

Protocol Specific: Databases3

hydra -l root -P passwords.txt mysql://127.0.0.1

Tests credentials against a MySQL database server.

Link
hydra -l postgres -P passwords.txt postgres://127.0.0.1

Tests credentials against a PostgreSQL database server.

Link
hydra -P passwords.txt redis://127.0.0.1

Tests passwords against a Redis instance.

Link

Protocol Specific: SNMP1

hydra -P communities.txt snmp://127.0.0.1

Tests for valid SNMP community strings using the password list.

Link

HTTP Authentication1

hydra -l admin -P passwords.txt http-get://127.0.0.1/admin

Tests Basic Auth on a specific path using HTTP GET.

Link

SSL/TLS Support1

hydra -S -l admin -P passwords.txt https-get://127.0.0.1/admin

Enables SSL/TLS explicitly for the connection using the -S flag.

Link

HTTP Form Authentication2

hydra -l admin -P passwords.txt 127.0.0.1 http-post-form "/login.php:user=^USER^&pass=^PASS^:F=Login failed"

Attacks an HTTP POST login form by defining the path, body parameters, and a failure string.

Link
hydra -l admin -P passwords.txt 127.0.0.1 http-post-form "/login.php:u=^USER^&p=^PASS^:S=Welcome back"

Attacks an HTTP POST login form using a Success string (S=) match instead of failure.

Link

HTTP Header Manipulation1

hydra -l admin -P pass.txt 127.0.0.1 http-post-form "/api/login:user=^USER^&pass=^PASS^:F=fail:H=X-Custom-Header: value"

Injects a custom HTTP header into the request using the H= parameter.

Link

Performance Tuning2

hydra -t 1 -l admin -P passwords.txt ssh://127.0.0.1

Limits the attack to exactly 1 task (thread) to reduce server load.

Link
hydra -t 32 -l admin -P passwords.txt ssh://127.0.0.1

Increases parallelism to 32 tasks for faster scanning on capable networks.

Link

Rate Limiting2

hydra -w 5 -l admin -P passwords.txt ssh://127.0.0.1

Waits 5 seconds between connection attempts to evade simple rate limits.

Link
hydra -W 2 -l admin -P passwords.txt ssh://127.0.0.1

Adds a random wait time (up to 2 seconds) between connects.

Link

Logging and Output4

hydra -v -l admin -P passwords.txt ssh://127.0.0.1

Enables verbose mode to show login attempts and errors.

Link
hydra -V -l admin -P passwords.txt ssh://127.0.0.1

Enables debug mode showing username/password combinations as they are tried.

Link
hydra -o results.txt -l admin -P passwords.txt ssh://127.0.0.1

Writes the valid found pairs to a text file.

Link
hydra -o results.json -b json -l admin -P passwords.txt ssh://127.0.0.1

Outputs the results in JSON format for easier parsing by other tools.

Link

Session Management1

hydra -R

Restores a previously aborted session using the hydra.restore file.

Link

Advanced Networking2

hydra -4 -l admin -P passwords.txt ssh://127.0.0.1

Forces the use of IPv4 addresses only.

Link
hydra -6 -l admin -P passwords.txt ssh://[::1]

Forces the use of IPv6 addresses only.

Link

Proxy Usage3

hydra -x http:127.0.0.1:8080 -l admin -P passwords.txt http-get://test.lab

Routes the attack traffic through an HTTP proxy.

Link
hydra -x socks5:127.0.0.1:9050 -l admin -P passwords.txt ssh://test.lab

Routes the attack traffic through a SOCKS5 proxy (e.g., Tor).

Link
hydra -x socks5:user:pass@127.0.0.1:1080 -l admin -P pass.txt ssh://test.lab

Routes traffic through an authenticated SOCKS5 proxy.

Link

Module Options1

hydra -m /path/to/key -l user -P pass.txt ssh://127.0.0.1

Uses the -m flag to pass module-specific options (e.g., SSH private key path).

Link

Exit Conditions2

hydra -f -l admin -P passwords.txt ssh://127.0.0.1

Exits immediately after the first valid credential pair is found.

Link
hydra -F -L users.txt -P passwords.txt ssh://127.0.0.1

Stops the entire audit (all targets) after finding any valid credential.

Link

Looping1

hydra -l admin -p password -u ssh://127.0.0.1

Loops across usernames (-u) checking all passwords for one user before moving to next.

Link

Null Password Checks1

hydra -e n -l admin -P passwords.txt ssh://127.0.0.1

Specifically adds a check for a null (empty) password.

Link

Same-as-Login Checks1

hydra -e s -l admin -P passwords.txt ssh://127.0.0.1

Adds a check where the password is the same as the username.

Link

Reverse Login Checks1

hydra -e r -l admin -P passwords.txt ssh://127.0.0.1

Adds a check where the password is the username reversed.

Link

Comprehensive Checks1

hydra -e nsr -l admin -P passwords.txt ssh://127.0.0.1

Checks null, same-as-user, and reverse-user passwords in addition to the wordlist.

Link

SMTP Enumeration1

hydra -l user -P pass.txt smtp-enum://127.0.0.1

Uses the SMTP VRFY command to enumerate valid users before attacking.

Link

Cisco Enable1

hydra -P passwords.txt cisco-enable://127.0.0.1

Targets the enable password on Cisco devices.

Link

LDAP Authentication1

hydra -l admin -P pass.txt ldap://127.0.0.1

Tests credentials against an LDAP directory service.

Link

Oracle Listener1

hydra -l admin -P pass.txt oracle-listener://127.0.0.1

Targets the Oracle TNS listener.

Link

Red Team Simulation1

hydra -t 1 -W 10 -f -l admin -P top10.txt ssh://127.0.0.1

Simulates a stealthy low-and-slow attack using very few threads and long waits.

Link

Blue Team Validation1

hydra -t 64 -l admin -P rockyou.txt ssh://127.0.0.1

Simulates a noisy, high-velocity brute force to test IDS/IPS triggering.

Link

User-Agent Spoofing1

hydra -l admin -P pass.txt -w 1 http-get://127.0.0.1/ -H "User-Agent: Mozilla/5.0"

Spoofs the User-Agent header to bypass simple WAF filtering or look legitimate.

Link

Service Scan Verification1

hydra -U -m /path/to/passwords ssh://127.0.0.1

Prints the service module details without running the attack (-U).

Link

Time-based Termination1

hydra -l admin -P massive_list.txt ssh://127.0.0.1

Combines with OS 'timeout' to limit attack duration during automated testing.

Link

FTP Specifics1

hydra -l user -P pass.txt ftp://127.0.0.1 -vV

Verbose FTP attack to debug connection or protocol handshake issues.

Link

IMAP/POP3 Mail2

hydra -l user -P pass.txt imap://127.0.0.1

Tests credentials against an IMAP mail server.

Link
hydra -l user -P pass.txt pop3://127.0.0.1

Tests credentials against a POP3 mail server.

Link

SOCKS Proxy Attack1

hydra -l user -P pass.txt socks5://127.0.0.1

Attacks the credentials of the SOCKS proxy server itself.

Link

Telnet Legacy1

hydra -l root -P pass.txt telnet://127.0.0.1

Tests credentials on legacy Telnet services.

Link

TeamCity/CI CD1

hydra -l admin -P pass.txt teamcity://127.0.0.1

Targets JetBrains TeamCity build servers.

Link

VMware vCenter1

hydra -l administrator@vsphere.local -P pass.txt vcenter://127.0.0.1

Targets VMware vCenter authentication.

Link

Subversion (SVN)1

hydra -l admin -P pass.txt svn://127.0.0.1

Tests credentials against an SVN repository.

Link

IRC Authentication1

hydra -l user -P pass.txt irc://127.0.0.1

Attacks IRC server passwords.

Link

PC Anywhere1

hydra -P pass.txt pcanywhere://127.0.0.1

Targets legacy PC Anywhere remote access services.

Link

RSH/Rexec1

hydra -l root -P pass.txt rexec://127.0.0.1

Targets remote execution services.

Link

Rlogin1

hydra -l root -P pass.txt rlogin://127.0.0.1

Targets the legacy rlogin protocol.

Link

SIP/VoIP1

hydra -l 1001 -P pass.txt sip://127.0.0.1

Tests credentials on SIP-based VoIP servers.

Link

Environment Variable Input1

HYDRA_PROXY_HTTP=http://127.0.0.1:8080 hydra -l u -P p.txt ssh://target

Uses environment variables to configure proxy settings outside the command flags.

Link

Detection Evasion1

hydra -t 1 -w 15 -f -l admin -P pass.txt ssh://127.0.0.1

Extreme slow-roll configuration to attempt bypassing account lockout policies.

Link

Automated Pipeline1

hydra -l admin -P pass.txt -o /tmp/audit.json -b json ssh://127.0.0.1 > /dev/null

Run silently in CI/CD, outputting only a JSON artifact.

Link

Windows Auth (SMB2)1

hydra -l Administrator -P pass.txt smb://127.0.0.1 -m smb2

Forces SMB version 2 for Windows authentication testing.

Link

Interactive Verification1

hydra -l admin -p password -s 22 ssh://127.0.0.1 -v

Manual verification of a single credential with verbose output to confirm access.

Link

Complex HTTP Pattern1

hydra -l user -P pass.txt http-post-form "/login.php:user=^USER^&pass=^PASS^:F=Error" -c 30

Limits the wait time for socket connections to 30 seconds using -c.

Link