Compiling THC Hydra from source code
From Cryptolife
http://freeworld.thc.org/thc-hydra/
Updated to Ubuntu server 9.10 karmic koala
- Install the buildessential,libssh and libsll libraries
apt-get install build-essential libssl-dev libssh-dev
- Download Hydra source code from http://freeworld.thc.org
wget http://freeworld.thc.org/releases/hydra-5.4-src.tar.gz
- Decompress the package and go in hydra-5.4-src
tar xvfz hydra-5.4-src.tar.gz cd hydra-5.4-src
- Download and apply the libssh patch so hydra can be compiled with libssh 0.2 and 0.3
wget http://0xbadc0de.be/libssh/hydra-libssh0.2.patch patch -p1 < hydra-libssh0.2.patch
- Configure and compile (if you want hydra without without graphic interface use the option (--disable-xhydra)
./configure --disable-xhydra make make install
- IMPORTANT
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
- Post installation
./hydra -e ns -l root -p toor host_to_hack ssh2 -o hack.txt
running hydra without arguments will show all the options about the usage.
hydra
Hydra v5.4 [1] (c) 2006 by van Hauser / THC <vh@thc.org>
Syntax: hydra [[[-l LOGIN|-L FILE] [-p PASS|-P FILE]] | [-C FILE]] [-e ns]
[-o FILE] [-t TASKS] [-M FILE [-T TASKS]] [-w TIME] [-f] [-s PORT] [-S] [-vV]
server service [OPT]
Options:
-R restore a previous aborted/crashed session
-S connect via SSL
-s PORT if the service is on a different default port, define it here
-l LOGIN or -L FILE login with LOGIN name, or load several logins from FILE
-p PASS or -P FILE try password PASS, or load several passwords from FILE
-e ns additional checks, "n" for null password, "s" try login as pass
-C FILE colon seperated "login:pass" format, instead of -L/-P options
-M FILE server list for parallel attacks, one entry per line
-o FILE write found login/password pairs to FILE instead of stdout
-f exit after the first found login/password pair (per host if -M)
-t TASKS run TASKS number of connects in parallel (default: 16)
-w TIME defines the max wait time in seconds for responses (default: 30)
-v / -V verbose mode / show login+pass combination for each attempt
server the target server (use either this OR the -M option)
service the service to crack. Supported protocols: telnet ftp pop3[-ntlm] imap[-ntlm] smb smbnt http[s]-{head|get}
http-{get|post}-form http-proxy cisco cisco-enable vnc ldap2 ldap3 mssql mysql oracle-listener postgres nntp socks5
rexec rlogin pcnfs snmp rsh cvs svn icq sapr3 ssh2 smtp-auth[-ntlm] pcanywhere teamspeak sip vmauthd
OPT some service modules need special input (see README!)
Use HYDRA_PROXY_HTTP/HYDRA_PROXY_CONNECT and HYDRA_PROXY_AUTH env for a proxy.
Hydra is a tool to guess/crack valid login/password pairs - use allowed only
for legal purposes! If used commercially, tool name, version and web address
must be mentioned in the report. Find the newest version at http://www.thc.org

