You are hereHOWTO: Install THC-Hydra 5.4 in Ubuntu Karmic Koala 9.10
HOWTO: Install THC-Hydra 5.4 in Ubuntu Karmic Koala 9.10
UPDATED: Installing THC-Hydra 5.7 on Ubuntu Lucid Lynx 10.04
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.
I had a hard time installing THC-Hydra on Ubuntu. Here is how I finally did it.
First I installed dependencies.
sudo apt-get install build-essential libssl-dev libssh-dev libgtk2.0-dev libssh2-1-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:
I had some issues with XHYDRA so I found the following workaround:
wget -c http://wiredbytes.com/sites/default/files/callbacks.c mv hydra-gtk/src/callbacks.c hydra-gtk/src/callbacks.c.original mv callbacks.c hydra-gtk/src/
Let's start compiling:
./configure make sudo make install
You are now ready to use Hydra. Type ./hydra -h to get syntax help. The gui version is xhydra.
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.
I get stuck after typing "make". Just gives me a flood of errors and doesn't compile
ya me too it just gives me a bunch of errors
Hi
after make, become error don`t have ssh2 installed...
if you have ssh2 error have to install libssh2-1-dev
look in the error code. It states that it needs libssh-0.11 it's available here: http://libssh.org/files/libssh-0.1.1.tgz
just untar
tar xf
cd to the libssh-0.11 folder
run:
./configure
make
make install
Now try run ./configure, make & make install in the hydra folder :)
I continue with error to install.
Try the following:
wget http://www.libssh.org/files/libssh-0.2.tar.gz
tar xvzf libssh-0.2.tar.gz
cd libssh-0.2
./configure
make
sudo make install
cd path/to/hydra-5.4-src
./configure
make
sudo make install
This should also work with Ubuntu Karmic Koala 9.10
it doesnt work, i always get this error:
hydra-ssh2.c:50: warning: passing argument 1 of ‘ssh_connect’ from incompatible pointer type
/usr/local/include/libssh/libssh.h:122: note: expected ‘struct SSH_SESSION *’ but argument is of type ‘struct SSH_OPTIONS *’
hydra-ssh2.c:50: warning: assignment makes pointer from integer without a cast
hydra-ssh2.c:82: warning: implicit declaration of function ‘ssh_error_code’
make: *** [hydra-ssh2.o] Error 1
Follow these steps:
1. sudo apt-get install build-essential libssl-dev libssh-dev libgtk2.0-dev libssh2-1-dev
2. cd /home/
3.wget -c http://freeworld.thc.org/releases/hydra-5.4-src.tar.gz
4.tar xvzf hydra-5.4-src.tar.gz
5.cd hydra-5.4-src
6.wget http://libssh.org/files/libssh-0.1.1.tgz
7.tar xvzf libssh-0.1.1.tgz
8.cd libssh-0.11
9. ./configure
10. make
11. sudo make install
12. cd /home/hydra-5.4-src
13. ./configure
14. make
15. sudo make install
-------------------------------------------
Tested on Ubuntu 9.10
mkdir /tmp/hydra
cd /tmp/hydra
##############
# libssh
##############
# Téléchargement de l'archive
wget http://0xbadc0de.be/libssh/libssh-0.2.tgz
# Décompression
tar xzf libssh-0.2.tgz
cd libssh-0.2
./configure
make
make install
cd ..
##############
# hydra
##############
# Téléchargement de l'archive
wget http://freeworld.thc.org/releases/hydra-5.4-src.tar.gz
# Décompression
tar xzf hydra-5.4-src.tar.gz
# Téléchargement du patch
wget http://0xbadc0de.be/libssh/hydra-libssh0.2.patch
cd hydra-5.4-src
./configure
patch -p1 < ../hydra-libssh0.2.patch
# Correction d'un bug
sed -i 's/XDEFINES= -DLIBOPENSSL -DLIBPOSTGRES -DLIBSSH/XDEFINES= -DLIBOPENSSL -DLIBSSH/g' Makefile
sed -i 's/XLIBS= -lssl -lpq -lssh -lcrypto/XLIBS= -lssl -lssh -lcrypto/g' Makefile
make
Notes for Hydra module dependencies for Ubuntu 10.x:
====================================================
Here are the additional modules you'll need to build Hydra with support for these:
===================================================================
MySQL:
------
apt-get install libmysqlclient-dev
===================================================================
idn:
----
apt-get install libidn11-dev
===================================================================
pcre:
-----
apt-get install libpcre3-dev
===================================================================
postgres:
---------
apt-get install postgresql-client libpq-dev
===================================================================
svn:
----
apt-get install libsvn-dev
===================================================================
ncp:
----
apt-get install libncp libncp-dev
===================================================================
firebird:
---------
apt-get install libfbclient2 firebird2.0-dev
===================================================================
afp:
----
apt-get install libfuse-dev libgcrypt11 libgcrypt11-dev libgmp3-dev libgmp3c2 libreadline-dev libgmp3c2 libgmpxx4ldbl automake
Download the appropriate afpfs-ng package from Sourceforge. If running 64-bit Linux, you'll need to grab the source tarball and compile rather than using the .deb Here is the one I got: afpfs-ng-0.8.1.tar.bz2. If compiling from source, one twist after you do the ./configure, make, make install is that the make install does not copy the C header files (like afp.h) to /usr/include/afpfs-ng/, so I had to manually do a mkdir /usr/include/afpfs-ng and then cp /include/*.h files from the afpfs-ng build directory manaully to /usr/include/afpfs-ng. When you're done, afp.h and about 8 other header files should be in /user/include/afpfs-ng. Otherwise if you don't do this, when you do the ./configure for hydra, it will say it's can't find the AFP dependencies.
Also add /usr/local/lib to /etc/ld.so.conf and do another ldconfig. That's where libafpclient.so was installed by the make install, at least on my system.
===================================================================
oracle:
-------
download the following three Oracle Instant Client rpm's from Oracle ( http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html ) - you'll need to register for an OTN online account (free).
oracle-instantclient11.2-basic-*.rpm
oracle-instantclient11.2-devel-*.rpm
oracle-instantclient11.2-sqlplus-*.rpm
Then you need to convert RPM to DEB format, so do this apt-get:
apt-get install alien libaio1
Then run alien to convert and install:
alien -i oracle-instantclient11.2-basic-*.rpm
alien -i oracle-instantclient11.2-devel-*.rpm
alien -i oracle-instantclient11.2-sqlplus-*.rpm
Add the following to /etc/ld.so.conf (that's where it put my libs for version 11.2 - substitute your version there)
/usr/lib/oracle/11.2/client64/lib
Then do an: ldconfig
Then when running ./configure for hydra, use the --with-oracle and --with-oracle-lib switches. Here is the one I used.
./configure --with-oracle=/usr/include/oracle/11.2/client64 --with-oracle-lib=/usr/lib/oracle/11.2/client64/lib
Then one final twist before you do the make - you have to edit the Makefile and manaully add the Oracle include dir to the XIPATHS var. Here is mine where I had to manually add to the end:
XIPATHS= -I/usr/include/subversion-1 -I/usr/include/apr-1.0 -I/usr/include/subversion-1 -I/usr/include/mysql -I/usr/include/afpfs-ng -I/usr/include/oracle/11.2/client64
(Remember to substitute your include path if different.)
SAP/R3
------
Only one I didn't do. I'll leave that one for someone else to document... :-)
Post new comment