Security Art Work

Blog de Seguridad de la Información de S2 Grupo

Un blog de

THC-Hydra: Obtaining user credentials by brute-force

12 de February de 2013 Por Rafael Páez

(Please note this post was published last 4th february 2013 in the Spanish version of Security Art Work. See original post: THC-Hydra: Obtener credenciales de usuario por fuerza bruta)

THC-Hydra is a software used to crack login systems of different services such as HTTP, FTP, TELNET, IMAP, SMB, SSH, etc. in a very easy and fast way. Its latest version (7.4.2) was released last 7th January.

This tool has earned a great reputation thanks to its console mode both in Linux and Windows systems (also offering Linux users the option to use a graphical interface) and the possibility to execute the attacks using threads, giving the user the option to choose the number of threads used to perform the attack.

To carry out the attacks, THC-Hydra is based on the use of dictionaries that contain all the possible options the user may want to try. These are completely necessary for the execution of the program to keep trying different possibilities and to obtain the user credentials.

Its basic version from the command line is very simple: just set the host we want to attack, the type of service, the files that contain the user and password values, and the characteristics of the protocol (when necessary).

For instance, to attack an FTP service, you need: the host to be analyzed, the type of service (ftp), the file containing the list of users (option -L) and the file containing the password list (option -P), what results in:

./hydra host_address ftp -L user_dict -P pass_dict

A more specific example could be an attack against the HTTP login of a website that sends the data using the POST method. In this case in addition to the above information, the user will need to specify the exact URL of the login form, the name of the user and password values ​​in the web form, and the string of HTML code to indicate whether it was successful or not (based on the response from the server). For this example, the command would be as follows:

./hydra host_address http-post-form "/login.php?var_user=^USER^&var_pass=^PASS^:S=Login 
            successful" -L "user_dict" -P "pass_dict"

Where the exact url of the form is “login.php“, the parameter name of the form containing the user is “var_user“, the password is “var_pass” and the string that indicates that the login is correct is “Login successful“.

In the next picture we see the application output with the different users and passwords that the tool finds in the login form HTTP using POST method:

It should be noted that these are not the only options that can be set in the tool. It is possible to specify the number of threads used (option -t), carry out the attack with a given user (option -l) or a specific password (option -p), add cookies (C=cookie_value), add headers (H=header value), etc. It is strongly recommended to analyze the different options shown in the program help (option -h), the different examples and help links offered on their website http://www.thc.org/thc-hydra/.

Finally, thanks to tools like THC-Hydra, we can see how easy it can be to get a list of users using passwords too obvious and/or common. This once again demonstrates the importance of using strong passwords for those services we use.

FacebookX (Twitter)LinkedIn

Comments

  1. usb medellin says

    26 de June de 2014 at 3:09 am

    Hi are using WordPress for your blog platform? I’m new
    to the blog world but I’m trying to get started and create my own. Do you require any html
    coding knowledge to make your own blog? Any help would be really appreciated!

  2. xtrememind says

    17 de September de 2014 at 8:25 pm

    I’m curious to find out what blog system you have been using?
    I’m having some small security issues with my latest website and I’d like
    to find something more secure. Do you have any solutions?

  • Español

Pages

  • About
  • Authors
  • Cookies Policy
  • Guest posts
  • Legal Notice
  • Privacy Policy

Search

Authors

  • Antonio Villalón (230)
  • Manuel Benet (226)
  • Antonio Sanz (108)
  • Colaboradores (88)
  • Maite Moreno (73)
  • Roberto Amado (61)
  • José Rosell (59)
  • Joaquín Moreno (54)
  • Josemi Holguín (54)
  • Joan Soriano (52)
  • Jose L. Villalón (50)
  • José Vila (43)
  • Nelo Belda (43)
  • Antonio Huerta (38)
  • Fernando Seco (38)

All authors

Archives

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
  • Licencia de uso
Datos editoriales:
Publicación: securityartwork.es
Edita: S2 Grupo Soluciones de Seguridad, S.L.
Lugar de publicación: Valencia, España
ISSN 3101-5913

Return to top of page

Copyright © 2026 · Genesis Framework · WordPress

Utilizamos cookies propias y de terceros para mejorar y analizar el uso que haces de nuestro site. Puedes cambiar la configuración, rechazarlas u obtener más información sobre nuestra política de cookies AQUÍ. Aceptar
Política de cookies

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT