GO KALI FREE

Hydra

Password Attacks

Intermediatehigh risk

Hydra is a parallelized login cracker that supports numerous protocols including FTP, HTTP, HTTPS, SMB, SSH, and many more. It performs rapid dictionary attacks against login pages and services to test password strength.

Installation

sudo apt install hydra

Basic Syntax

hydra -l <user> -P <wordlist> <target> <service>

Quick Facts

Full Name
THC Hydra
License
AGPLv3
Author
vanHauser (THC)
Written In
C
Platforms
Linux, macOS
Category
Online Password Brute-Forcer
Protocols Supported
50+
Connection Type
Parallelized TCP/UDP

Tool Overview

THC Hydra is a fast, flexible, and powerful online login brute-forcer. It performs dictionary attacks against login pages and services using parallelized connections, making it one of the most widely used tools for testing network authentication security.

Created in 2001 by vanHauser of The Hacker's Choice, Hydra supports over 50 protocols including SSH, FTP, HTTP(S), RDP, SMB, MySQL, PostgreSQL, VNC, and many more. Its parallel architecture allows it to test thousands of credentials rapidly.

Hydra is essential for penetration testing, security audits, and red team engagements. It tests whether network services have weak or default credentials, helping organizations identify authentication vulnerabilities before attackers exploit them.

Common Commands

hydra -l admin -P /usr/share/wordlists/rockyou.txt 192.168.1.1 sshSSH brute force - Attack SSH login
hydra -L users.txt -P passwords.txt 192.168.1.1 ftpFTP attack - Multiple users/passwords
hydra -l admin -P wordlist.txt 192.168.1.1 telnetTelnet attack - Brute force telnet
hydra -l root -P wordlist.txt 192.168.1.1 mysqlMySQL attack - Database password test
hydra -l admin -P wordlist.txt -t 4 192.168.1.1 sshThrottled - 4 parallel connections
hydra -l admin -P wordlist.txt -V 192.168.1.1 sshVerbose - Show each attempt
hydra -l admin -P wordlist.txt -f 192.168.1.1 sshStop on success - Exit after first match
hydra -l admin -P wordlist.txt -e nsr 192.168.1.1 sshExtra checks - null/same/reverse
hydra -l admin -P wordlist.txt -o results.txt 192.168.1.1 sshSave output - Write results to file
hydra -l admin -P wordlist.txt 192.168.1.1 http-post-form "/login:user=^USER^&pass=^PASS^:Invalid"HTTP POST form - Web login attack
hydra -l admin -P wordlist.txt 192.168.1.1 http-get-form "/login:user=^USER^&pass=^PASS^:F=incorrect"HTTP GET form - Query string attack
hydra -l admin -P wordlist.txt 192.168.1.1 https-post-form "/login:user=^USER^&pass=^PASS^:F=failed"HTTPS POST - Secure web login
hydra -C userpass.txt 192.168.1.1 sshCombo file - user:pass pairs
hydra -l admin -P wordlist.txt -s 2222 192.168.1.1 sshCustom port - Non-standard port
hydra -M targets.txt -l admin -P wordlist.txt sshMultiple targets - Attack several IPs

Step-by-Step Guide

  1. 1Determine the specific network service you intend to target
  2. 2Locate or generate a suitable dictionary file
  3. 3Specify the target account name
  4. 4Execute the command with the chosen parameters
  5. 5Monitor the terminal for colored text indicating a valid hit
  6. 6Use SMBClient to validate any authorized SMB credentials against discovered shares
  7. 7Terminate the execution once access is confirmed
  8. 8Log the compromised credentials for your final assessment

Warnings

Use Cases

SSH Brute Force

Test SSH services for weak passwords and default credentials on servers and appliances.

Web Login Testing

Brute-force HTTP/HTTPS login forms including POST and GET-based authentication.

RDP Credential Testing

Test Windows Remote Desktop services for weak administrative passwords.

Database Authentication

Verify MySQL, PostgreSQL, and MSSQL database credentials are not default or weak.

Network Service Audit

Comprehensive testing of FTP, SMB, VNC, SNMP, and other network services.

VPN Credential Validation

Test OpenVPN, PPTP, and IPSec VPN concentrators for weak authentication before remote access compromise.

Email Server Testing

Brute-force POP3, IMAP, and SMTP credentials to verify mail server authentication strength.

VoIP Security Assessment

Test SIP and Asterisk phone systems for default or weak credentials that could enable toll fraud.

Active Directory Enumeration

Validate domain-joined credentials across SMB and LDAP services to assess AD password policies.

Default Credential Auditing

Systematically test factory-default credentials on IoT devices, routers, and embedded systems across a network.

Key Features

People Also Ask

How do I use Hydra in Kali Linux?

Run 'hydra -l <user> -P /usr/share/wordlists/rockyou.txt <target> <service>' where <target> is an IP you own. For example, test SSH on your lab machine: 'hydra -l admin -P wordlist.txt 10.10.10.10 ssh'. Hydra supports over 50 protocols including HTTP, FTP, RDP, SMB, and MySQL.

What is the -l and -P flag syntax in Hydra?

Use '-l <username>' for a single known username, or '-L users.txt' for a list. Use '-P passwords.txt' for a password list, or '-p <password>' for a single password. Combine with '-t 4' to limit threads and avoid account lockouts on authorized test accounts.

How do I brute force an HTTP login form with Hydra?

Use 'hydra -l admin -P wordlist.txt 10.10.10.10 http-post-form "/login:username=^USER^&password=^PASS^:F=incorrect"'. The ^USER^ and ^PASS^ placeholders are replaced with each candidate. The F= string identifies a failed login in the response body.

How do I brute force SSH with Hydra?

Run 'hydra -l root -P /usr/share/wordlists/rockyou.txt 10.10.10.10 ssh' against your lab machine. Hydra connects on port 22 by default. Add '-s 2222' for non-standard ports. Always test only against systems you own or have written authorization to test.

Is Hydra free and how do I install it?

Yes, Hydra is free and open source. On Kali Linux, it is pre-installed or run 'sudo apt install hydra'. On Ubuntu/Debian: 'sudo apt install hydra'. From source, clone the GitHub repo and run 'make'. Hydra is maintained by van Hauser of THC.

What is THC-Hydra?

THC-Hydra is the full name of Hydra, developed by the Hacker's Choice (THC) team. It is a network login cracker that supports 50+ protocols and uses parallelized connections for fast dictionary attacks. The tool is the industry standard for online password auditing during penetration tests.

Related Tools

Nmap

Information Gathering

Network scanner for discovering login services before brute-forcing them.

Medusa

Password Attacks

Parallel network brute-forcer as an alternative to Hydra with modular architecture.

John the Ripper

Password Attacks

Offline password cracker for hashes extracted from compromised systems.

Hashcat

Password Attacks

GPU-accelerated offline password cracker for large hash sets.

Enum4Linux

Information Gathering

SMB/NetBIOS enumeration tool for discovering valid usernames before brute-forcing.

CrackMapExec

Password Attacks

Post-exploitation pentesting toolkit for testing credentials across Active Directory environments.

Burp Suite

Web Application

Web security testing proxy for intercepting login requests before Hydra form attacks.

WPScan

Web Application

WordPress security scanner that discovers users for Hydra brute-force attacks.

Frequently Asked Questions

What is THC Hydra and why is it the standard for online brute-force testing?

THC Hydra is the de facto standard online login brute-forcer, supporting over 50 protocols including SSH, FTP, HTTP(S), RDP, SMB, and VNC. Unlike generic password testers, Hydra uses parallelized TCP connections to achieve thousands of authentication attempts per minute while maintaining per-protocol awareness of authentication mechanisms.

How do I configure Hydra for HTTP web login form brute-forcing?

Use the http-post-form or http-get-form module with three colon-separated parts: the URL path, form field placeholders (^USER^ and ^PASS^), and a failure string. Example: hydra -l admin -P wordlist.txt target http-post-form '/login:user=^USER^&pass=^PASS^:F=incorrect' always works because the -F flag tells Hydra to compare server responses against the failure indicator.

What strategies prevent account lockout during Hydra brute-force attacks?

Reduce thread count with -t 1 or -t 2, add delays between attempts with -w <seconds>, and use -f to stop immediately after the first valid credential. For production systems with lockout policies, sequence attacks with sleep intervals between batches and monitor authentication logs for lockout warnings.

When should I choose Hydra over Medusa or Ncrack for brute-force testing?

Hydra excels when you need broad protocol coverage (50+ protocols) with HTTP form attack capabilities - it is the only major brute-forcer that handles custom web login forms. Choose Medusa for multi-host parallel scanning across a network, and Ncrack when you need native Nmap integration via -iX for seamless service discovery pipelines.

What is Hydra's protocol coverage and how do I list supported modules?

Hydra supports over 50 network protocols including SSH, FTP, HTTP(S), RDP, SMB, MySQL, PostgreSQL, VNC, SNMP, POP3, IMAP, LDAP, SIP, IKE, telnet, and many more. Run hydra -h to print the complete list of supported service modules with their exact module names (e.g., ssh, ftp, http-post-form).

How do I select the right wordlist for Hydra attacks?

For general testing, /usr/share/wordlists/rockyou.txt is the standard choice covering common password patterns. For targeted engagements, generate custom wordlists with CeWL (spidering the target's own website for context-specific terms) or combine company-specific terms with common passwords from SecLists. Focused lists of 500-2000 entries often outperform massive 14-million-entry lists.

What is the correct approach for brute-forcing HTTPS login forms with Hydra?

Use the https-post-form or https-get-form module instead of the HTTP variants. When the target uses a self-signed certificate, add -S to disable certificate verification. Full command: hydra -l admin -P wordlist.txt target https-post-form '/login:user=^USER^&pass=^PASS^:F=failed' -S. Always verify certificate handling before starting large-scale attacks.

How do combo files accelerate Hydra credential testing?

Combo files store pre-paired username:password values (one per line). Use the -C flag instead of separate -L and -P flags: hydra -C userpass.txt target ssh is faster because Hydra skips the Cartesian product of all username-password combinations and tests only known pairs. This is ideal for reusing credentials discovered during reconnaissance.

How does multi-host scanning work in Hydra and when is it effective?

Use -M targets.txt with one IP per line: hydra -M targets.txt -l admin -P wordlist.txt ssh. Hydra attacks all targets in parallel, distributing threads across hosts. This is effective for network-wide credential auditing during internal penetration tests where you need to check the same credentials against multiple machines simultaneously.

What password patterns does the -e nsr flag test in Hydra?

The -e nsr flag enables three extra password checks in a single flag: 'n' tests null passwords (empty string), 's' tests the username itself as the password (same-as-username), and 'r' tests the reversed username. These patterns account for a significant percentage of weak credentials found in real-world assessments.

How do I target WordPress login pages with Hydra?

Use the http-post-form module against wp-login.php: hydra -l admin -P wordlist.txt target http-post-form '/wp-login.php:log=^USER^&pwd=^PASS^:F=incorrect'. First run WPScan user enumeration to discover valid usernames, then feed them to Hydra with -L users.txt for targeted attacks against discovered WordPress administrator accounts.

How fast can Hydra test credentials compared to other brute-force methods?

Hydra achieves 100-500 authentication attempts per second for SSH and FTP depending on thread count and network latency. HTTP form attacks are slower (10-50/sec) due to HTTP connection overhead and server-side session handling. This is 100-1000x faster than manual browser-based testing and 2-5x faster than most Python brute-forcers.

What legal framework governs Hydra usage in penetration testing?

Hydra itself is legal open-source software. Using it requires explicit written authorization from the system owner before testing. Unauthorized brute-forcing violates the CFAA in the US, Computer Misuse Act in the UK, and equivalent laws worldwide - carrying criminal penalties including fines and imprisonment. Always operate within a signed scope of work.

How do I save and structure Hydra output for reports?

Use -o results.txt to save results to a file, or -o results.json for machine-readable output. Use -b to append to existing files instead of overwriting. For reporting, parse the JSON output with jq to extract only successful logins: jq '.results[] | select(.status=="success")' results.json. Hydra logs every attempt with timestamps when using -V for verbose output.

How does Hydra handle VNC authentication compared to other protocols?

Use the vnc module: hydra -P wordlist.txt target vnc. VNC uses a challenge-response authentication mechanism where username is typically not required - Hydra only needs to guess the password. The vnc module automatically handles RFB protocol negotiation, making it transparent to the user. VNC attacks are slower than SSH due to the graphic protocol overhead.

How do I configure Hydra to detect null and default passwords?

Use -e n to add null password testing to any attack: hydra -l admin -e n -P wordlist.txt target ssh. The full -e nsr flag combines null password, same-as-username, and reversed username checks in a single pass. These are especially effective against embedded systems, IoT devices, and legacy network appliances that ship with default credentials.

Can Hydra brute-force SNMP community strings?

Yes, use the snmp module: hydra -P community.txt target snmp. SNMP brute-forcing tests common community strings (public, private, manager) against SNMP-enabled devices. SNMPv1/v2c transmit community strings in cleartext, making brute-force effective. Use snmpwalk after discovering valid strings to enumerate device information.

How do I route Hydra traffic through SOCKS proxies?

Hydra does not natively support SOCKS proxies. Route Hydra traffic through a proxy using proxychains: proxychains hydra -l admin -P wordlist.txt target ssh. Configure proxychains with your SOCKS5 proxy in /etc/proxychains.conf. This adds latency but anonymizes the source IP of brute-force attempts.

Can Hydra test FTP anonymous login?

Yes, use the ftp module with an anonymous username: hydra -l anonymous -p "" target ftp. An anonymous FTP login test checks whether the server allows unauthenticated file access. Use -e nsr to also test null passwords and same-as-username checks. Combine with nmap -sV -p 21 to first verify FTP is running.

What is Hydra's -x flag for?

The -x flag enables brute-force mode where Hydra generates passwords from a character set instead of using a wordlist. Format: -x MIN:MAX:CHARSET. Example: -x 4:8:aA1 generates passwords 4-8 characters long using lowercase, uppercase, and digits. This is slower than wordlist attacks but comprehensive for short passwords.

How do I resume a Hydra attack session?

Hydra automatically saves progress and resumes interrupted sessions. When you restart the same command, Hydra detects the existing session file and continues from where it left off. Use -R to force resume of the last session, or -s PORT to specify a different port if the session was interrupted. Session files are stored in the current directory.

Can Hydra brute-force RDP logins?

Yes, use the rdp module: hydra -l administrator -P wordlist.txt target rdp. RDP brute-forcing is slower than SSH due to the graphical protocol overhead, typically 5-20 attempts per second. Use -t 1 for single-threaded attacks to avoid locking accounts. Combine with enum4linux first to discover valid usernames.

How do I use Hydra with a pipe for username:password combinations?

Use the -C flag for combo files containing username:password pairs (one per line, separated by colon): hydra -C combo.txt target ssh. This is faster than separate -L and -P files when you have known credential pairs. For pipe input from other tools, use process substitution or temporary files.

What is the optimal thread count for Hydra?

The default is 16 threads. For SSH, 4-16 threads work well. For HTTP forms, use 1-4 threads to avoid overwhelming the server. For services with rate limiting or lockout policies, use 1-2 threads. Start low and increase gradually. Monitor for 'Too many connections' errors and reduce thread count if they appear.

Can Hydra attack SIP/VoIP systems?

Yes, use the sip module: hydra -l admin -P wordlist.txt target sip. SIP brute-forcing tests VoIP phone systems and PBX platforms for weak extensions and passwords. Common SIP targets include Asterisk, FreePBX, and Cisco Unified Communications. Slow threading (-t 1) is recommended to avoid disrupting voice services during testing.

How do I use Hydra with Tor or proxychains for anonymity?

Route Hydra through Tor using proxychains: install proxychains-ng, configure /etc/proxychains.conf with your Tor SOCKS5 proxy, then run proxychains hydra -l admin -P wordlist.txt target ssh. This anonymizes the source IP of brute-force attempts but adds significant latency. Tor is not recommended for high-volume attacks due to bandwidth limitations and connection instability.

Tags

#password-attacks#brute-force#dictionary-attack#authentication#network-services

Output Explanation

The application prints each attempt in real-time, highlighting successful breaches with a distinct marker showing the service, host, username, and discovered password.

Ethical Usage Notice

This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.