HOWTO: Install THC-Hydra 5.4 in Ubuntu Intrepid Ibex

ubuntu.png

Wikipedia describes THC-Hydra as “… software … that uses a dictionary attack to test for weak or simple passwords on one or many remote hosts running a variety of different services.” Its useful for doing quick tests against your servers to make sure that your users are not using simple passwords. In pen tester speak, this is called a brute-force attack.

Installing THC-Hydra on Ubuntu Intrepid Ibex can be a bit of a pain. Here is how I  did it.

First installed dependencies. Note: I couldn’t compile xhydra but I am including libgtk2.0 anyway. Maybe someone can post a solution.

sudo apt-get install libssl-dev libgtk2.0-dev

Next, grab the Hydra source code.

wget -c http://freeworld.thc.org/releases/hydra-5.4-src.tar.gz

I prefer to run hydra from my home directory, so I untar it to where I will run it from:

mkdir ~/bin
tar -xvzf hydra-5.4-src.tar.gz -C ~/bin
cd ~/bin/hydra-5.4-src

Let’s start compiling:

./configure

But WAIT! This is where I had some issues. If you look at the output of make you’ll see this:

IF YOU RECEIVED THE ERROR MESSAGE “cannot find -lpq” DO THE FOLLOWING:
make clean; ./configure
vi Makefile <- and remove the “-lpq” and “-DLIBPOSTGRES” statements
make

If you get this error, you must do these steps:

make clean; ./configure

You can use Text Editor (gedit), Vi or your favorite text editor to make the following changes:

XDEFINES= -DLIBOPENSSL -DLIBPOSTGRES
becomes
XDEFINES= -DLIBOPENSSL

XLIBS= -lssl -lpq -lcrypto
becomes
XLIBS= -lssl -lcrypto

Once you have edited your Makefile, you are ready to compile:

make
… ./hydra is ready to go!

You are now ready to use Hydra. Type ./hydra -h to get syntax help.

An example of using Hydra would look like this:

./hydra -l yourfriend@hisdomain.com -P password.txt -V mail.hisdomain.com imap

where
-l is a username
-P is a wordlist ftp://ftp.openwall.com/pub/wordlists/
-V is the server you are running the attack against
imap is the service type

Let me know if you had any issues with your install. Enjoy.

Source

Related Posts

Comments are closed.