Hydra
Hydra is a parallelized login cracker that supports numerous protocols to attack quickly and flexibly, and new modules are easy to add.
NOTE: use netexec for Windows AD environments instead
Core Flags
Protocol-Specific Examples
SSH / FTP / RDP / SMB
Web Forms
HTTP-POST
Syntax: "/PATH:BODY:CONDITION=STRING"
- Use browser F12 > Network > DevTools, web proxy, or
-dto capture the actual POST request. Look for the form action URL and input field names. - Use
^USER^and^PASS^as placeholders inBODY - Condition String:
hydra -U http-post-form- Important: you can only define S= OR F= - not both
F=<FAILURE_STRING>(default) specifies the failure response text to detect failed logins- too many false positives means bad failure string
- `S=<SUCCESS_STRING>
S=302means a successful login due to an HTTP 302 page forward redirect
Check with -dt1 for condition strings
HTTP Basic Auth
A basic form of authentication, usually when a web resource is restricted, a pop-up window will appear asking for username and password. From a HTTP header perspective it is the base64 version of <USERNAME>:<PASSWORD> like:
WordPress Specific
Password Spraying
Password spraying uses one password against many users (alternates users), which has no risk of account lockout compared to brute-forcing. This is useful as a “hail Mary” to find any way in!
Best practice: Obtain account lockout policy beforehand (via enumeration or asking customer); if you don’t know the password policy, a good rule of thumb is to wait a few hours between attempts, which should be long enough for the account lockout threshold to reset.
Important Notes
- Account Lockout Risk: Brute-forcing (many passwords vs 1 user) has a RISK of account lockout due to account lockout policy. Use small wordlists and be cautious.
- Thread Count: Use
-t 4for SSH to avoid overwhelming the service. Web forms can handle higher thread counts like-t 16. - Wordlist Selection: For online attacks, use small wordlists (e.g., top 1000 passwords) to minimize lockout risk and reduce time.
- Output: Always use
-o <OUTPUT_FILE>to save results for later analysis.