According to Kali, THC-Hydra Tool is a parallelized login cracker that supports a large number of protocols to attack. It is very fast and flexible, and adding new modules is easy.
It Vehicle It allows researchers and security consultants to demonstrate how easy it will be to gain unauthorized access to a system remotely.
THC-Hydra Tool will operate in 4 modes:
- A username and a password
- User list and a password
- A list of username and password
- User list and Password list
Hydra Has Various Options:
- Target – settings of various target options
- Passwords – Specify password options and word lists
- Tuning – Specify how fast the Hydra has to run. Other timing options are also available.
- Specific – Domain, https proxy etc. For testing on specific targets.
- Start – Shows Start / Stop and output.
Step 1: Turn on THC-Hydra
So let’s get started. Fire Kali and open THC-Hydra from: Applications -> Kali Linux -> Password Attacks -> Online Attacks -> hydra.
Step 2: Get 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 and how the form responds to incorrect / unsuccessful entries. The basic parameters we need to define are:
IP Address of the website
URL
form type
domain containing username
the field containing the password
error message
We can identify each of these using a proxy such as Tamper Data or Burp Suite.
Step 3: Using Burp Suite
While we can use any proxy to do the job, including Tamper Data, we will be using Burp Suite in this post. You can open the Burp Suite by going to: Applications -> Kali Linux -> Web Applications -> Web Application Proxies -> burpsuite. When you do this, you should see the opening screen as below.
Next, we will try to crack the password on the Damn Vulnerable Web Application (DVWA). You can run it from the metasploitable operating system (available in Rapid7) and then link to the login page as here.
We need to enable Proxy and Intercept in Burp Suite as below. Make sure you click on the Proxy tab at the top and then on Stop on the second tab row. Make sure the “intersection is open”.
Finally, we need to configure our IceWeasel (or Firefox or Mozilla) web browser to use a proxy. We can go Edit -> Preferences -> Advanced -> Network -> Settings To open the Connection Settings as seen below. Here, configure IceWeasel to use port 127.0.0.1 as a proxy by typing 127.0.0.1 in the HTTP Proxy field, 8080 in the Port field and deleting the information in the No Proxy for field below. Also, select the “Use this proxy server for all protocols” button.
Step 4: Get Wrong Login Response
Now let’s try to login with my username OTW and password OTW. When I do this, BurpSuite grabs the request and shows us the key fields we need for the THC-Hydra web form cracking.
After collecting this information, I press the “Next” button on the far left and submit the request from Burp Suite. DVWA displays “Login failed” message. Now I have all the information I need to configure THC-Hydra to crack this web application!
Getting the error message is key to getting THC-Hydra working on web forms. In this case, it is a text-based message, but not always. It can sometimes be a cookie, but the critical part is figuring out how the application transmitted a failed login. This way we can tell THC-Hydra to keep trying different passwords; but we were able to when this message did not appear.
Step 5: Put the Parameters in Your THC Hydra Command
Now that we have the parameters, we can put them in the THC-Hydra command. The syntax looks like this:
kali> hydra -L