Complete Interactive Learning Simulation for Beginners
Hydra is a brute-force tool that tries multiple username/password combinations rapidly to crack login systems.
When you login to a website, your browser sends a POST request containing your username and password.
Hydra pretends to be a browser and sends hundreds/thousands of POST requests automatically!
Test credentials to see success/failure messages
adminpassword123
When login FAILS: You see "Username or password incorrect"
When login SUCCEEDS: You see "Welcome back"
Before attacking with Hydra, we need to collect 3 critical pieces of information:
Where does the form submit to?
What are the input field names in the HTML?
What text appears when login fails? Try wrong credentials and look!
Every Hydra HTTP POST attack follows this structure:
| Switch | Purpose | Example |
|---|---|---|
-l |
Single login name | -l admin |
-L |
Login name LIST from file | -L users.txt |
-p |
Single password | -p secret123 |
-P |
Password LIST from file | -P passwords.txt |
-s |
Port number (if not 80) | -s 8000 |
-V |
Verbose (show all attempts) | -V |
-t |
Number of parallel tasks | -t 16 |
-f |
Stop after first found | -f |
-l, -p)-L, -P)
Hydra uses special placeholders to know where to insert usernames and passwords:
| Placeholder | What It Does | Example |
|---|---|---|
^USER^ |
Replaced with username from your list | username=^USER^ becomes username=admin |
^PASS^ |
Replaced with password from your list | password=^PASS^ becomes password=123456 |
username=^USER^&password=^PASS^username=admin&password=passwordusername=admin&password=123456username=admin&password=letmeinThe most important part: "PATH:POST_DATA:FAIL_CONDITION"
:) and wrapped in quotes!
Using everything we learned, here's the complete command:
Note: Now using -L (uppercase) for username list!
The -t 16 uses 16 parallel connections (default is 4)
The -f flag stops immediately after finding valid credentials
No -s needed when using default port 80
| Output Line | What It Means |
|---|---|
[DATA] max 10 tasks... |
How many parallel attempts Hydra will make |
[DATA] attacking http-post-form://... |
Shows exactly what Hydra is attacking |
[ATTEMPT] target localhost - login "admin" - pass "admin" |
Shows each username/password combination being tried |
[8000][http-post-form] host: localhost login: admin password: password123 |
SUCCESS! Valid credentials found |
1 valid password found |
Summary: Attack successful, found 1 valid password |
admin:password123
What to check:
F=Username or F=passwordCommon mistakes:
php -S localhost:8000-s flag-t 4 (slower but stealthier)-w 2 (2-second wait between attempts)Modify the login form to use different field names and update your Hydra command.
Create a username list and try multiple usernames:
Apply what you learned to a real THM scenario:
-l username |
Single username |
-L file.txt |
Username list |
-p password |
Single password |
-P file.txt |
Password list |
-s PORT |
Specify port |
-V |
Verbose mode |
-t NUM |
Parallel tasks |
-f |
Stop after first find |
-w SEC |
Wait time between attempts |
^USER^ and ^PASS^ tell Hydra where to insert credentialsPATH:POST_DATA:FAIL_CONDITION must be correct-l, -p) for single, Uppercase (-L, -P) for lists-V when learning or debugging-t for speed