Since Ubuntu became the most popular Linux distribution, it’s better to use it than using other distributions. Unlike Kali Linux, Ubuntu doesn’t have built-in brute-force attack tools for ethical hacking, such as performing penetration tests.

So it would help if you had a guide about installing them in Ubuntu, and Hydra is one of the best options to choose from.

This guide will go with you step by step until you install Hydra successfully on Ubuntu. Hydra is used as a login cracking tool worldwide because of its efficiency and ease of use. It comes installed by default on Kali Linux, but you have come to the right place if you want to use it in Ubuntu. You can install Hydra manually or through the repository.

Hydra is widely wanted because it has many features such as:

  • Supporting many Linux distributions, Unix and Solaris, FreeBSD/OpenBSD, QNX (Blackberry 10), and macOS.
  • Supporting about 55 network protocols such as AFP, HTTP-FORM-GET, HTTP-GET, HTTP-FORM-POST, HTTP-HEAD, HTTP-PROXY, and more.
  • Supporting both command line and graphical user interfaces.
  • Capability to hack either single or multiple usernames/passwords.
  • Supporting parallelized connections and flexible ability to gain remote access to your system.
  • Written by C language, and established under AGPL-3.0 license.

If you like to know more about the Hydra project, you can visit the official website. This article will show you how to install Hydra on any version of Ubuntu.

Installing Hydra

There are no special perquisites except non-root users with Sudo privileges.

To install Hydra and quickly in Ubuntu to begin the pentest, open the terminal and execute these commands to update your system firstly:

$ sudo apt-get update

Now install some required essentials for Hydra:

$ sudo apt-get -y install build-essential
$ sudo apt-get install git

Now Installing Hydra:

$ sudo apt-get install hydra

You can use the flag -y to confirm “yes” automatically.

Other Methods 

You can also install Hydra from the source repository but may it will not be the last version, by this command:

$ sudo apt-get install hydra-gtk

To install it from source with the newest version, execute this command to clone the repository from GitHub on your system:

$ git clone https://github.com/vanhauser-thc/thc-hydra.git

Go to the cloned folder directory and configure it:

$ cd thc-hydra
$ ./configure

You will have some instructions in the terminal with the message "make", just follow them, and use sudo make install command.

Return to your home directory and execute this command to make sure you have installed Hydra successfully:

$ hydra -help

Installing Other Libraries

For installing more additional complimenting libraries for optional modules and functions such as the apple filling protocol, use this command:

$ sudo apt install libssl-dev libssh-dev libidn11-dev libpcre3-dev libgtk2.0-dev libmysqlclient-dev libpq-dev libsvn-dev firebird-dev

If you have error messages about some of them, it is perhaps not available for Ubuntu. Retry with executing the command excluding them. You can download and install those excluded manually.

Removing Hydra From Ubuntu

When you want to uninstall Hydra from Ubuntu, execute these commands:

$ sudo apt-get purge hydra-gtk
$ sudo apt-get autoremove
$ sudo apt-get autoclean

Conclusion

In this tutorial, you have learned how to install and uninstall Hydra, the famous force brute tool, on Ubuntu 20.04.

Learn also: How to Crack Zip Files in Linux

Happy hacking!