How To Crack Online Web Form Passwords With THC-Hydra & Burp Suite
How To Crack Online Web Form Passwords With THC-Hydra & Burp Suite
In an earlier tutorial, I had introduced you to two essential tools for cracking
online passwordsTamper Data and THC-Hydra. In that guide, I promised to
follow up with another tutorial on how to use THC-Hydra against web forms, so
here we go. Although you can use Tamper Data for this purpose, I want to
introduce you to another tool that is built into Kali, Burp Suite.
Step 1Open THC-Hydra
So, let's get started. Fire up Kali and open THC-Hydra from Applications -> Kali
Linux -> Password Attacks -> Online Attacks -> hydra.
Step 2Get the Web Form Parameters
To be able to hack web form usernames and passwords, we need to determine
the parameters of the web form login page as well as how the form responds to
bad/failed logins. The key parameters we must identify are the:
After the address of the login form (/dvwa/login.php), the next field is the name
of the field that takes the username. In our case, it is "username," but on some
forms it might be something different, such as "login."
Now, let's put together a command that will crack this web form login.
/usr/share/dirb/wordlists/short.txt
Step 7Build the Command
Now, let's build our command with all of these elements, as seen below.
Final Thoughts
Although THC-Hydra is an effective and excellent tool for online password
cracking, when using it in web forms, it takes a bit of practice. The key to
successfully using it in web forms is determining how the form responds
differently to a failed login versus a successful login. In the example above, we
identified the failed login message, but we could have identified the successful
message and used that instead. To use the successful message, we would
replace the failed login message with "S=successful message" such as this:
kali > hydra -l admin -P /usr/share/dirb/wordlists/small.txt 192.168.1.101
http-post-form
"/dvwa/login.php:username=^USER^&password=^PASS^&S=success
message" -V
Also, some web servers will notice many rapid failed attempts at logging in and
lock you out. In this case, you will want to use the wait function in THC-Hydra.
This will add a wait between attempts so as not to trigger the lockout. You can
use this functionality with the -w switch, so we revise our command to wait 10
seconds between attempts by writing it:
kali > hydra -l admin -P /usr/share/dirb/wordlists/small.txt 192.168.1.101
http-post-form
"/dvwa/login.php:username=^USER^&password=^PASS^&Login=Login:L
ogin failed" -w 10 -V
I recommend that you practice the use of THC-Hydra on forms where you know
the username and password before using it out "in the wild."