Setup and Configuration
The first step is to download and compile THC-Hydra, which you can get [http://www.thc.org/releases/hydra-5.3-src.tar.gz here]. And important thing to note when setting up this utility is that you must pay attention to the build process. THC-Hydra will require libraries in order to crack various services. For example, in order to crack SSH, you much have the appropriate SSH libraries, otherwise this feature will be disabled. Take the following as an example:Starting hydra auto configuration ... Checking for openssl (libssl/ssl.h) ... ... found Checking for Postgres (libpq) ... ... NOT found, module postgres disabled Checking for SVN (ibsvn_client-1 libapr-0.so libaprutil-0.so) ... ... NOT found, module svn disabled Checking for SAP/R3 (librfc/saprfc.h) ... ... NOT found, module sapr3 disabled Get it from http://www.sap.com/solutions/netweaver/linux/eval/index.asp Checking for libssh (libssh/libssh.h) ... ... NOT found, module ssh2 disabled Get it from http://0xbadc0de.be/ - use v0.11! Hydra will be installed into .../bin of: /usr/local (change this by running ./configure --prefix=path) Writing Makefile.in ... NOTES NOTES NOTES NOTES NOTES NOTES NOTES NOTES NOTES NOTES NOTES NOTES ======================================================================= ARM/PalmPilot users: please run ./configure-arm or ./configure-palm respectivly
Obtaining Dictionaries
The most important component to any password cracking is the username and password dictionaries. You will need both, as most services will require both a username and a password. Where do you get these? You have to find them for yourself :) (Please do not ask me as I will not share them). In all seriousness, Google is your friend. Here are a few links to get you started:Cracking Passwords
The next step is to identify the services that you will to test. I try to choose clear-text protocols if they are available, as they will go faster. For example, if the target has OWA (Outlook Web Access) available using HTTPS, but also provides POP3 services without SSL, I target POP3. The usernames and passwords will typically be the same (as from the banners you can figure out that its running on the same exchange/Windoze environment and associated domain). The POP3 service is quicker in this case because it does not have to complete the SSL handshake.When running Hydra, there are a few options that are significant and should always be used:
-R restore a previous aborted/crashed session
-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
-o FILE write found login/password pairs to FILE instead of stdout
-w TIME defines the max wait time in seconds for responses (default: 30)
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
hydra -L myusernames -P my.passwds -e s -e n -f -o cisco.username.out 192.168.1.1 telnet
hydra -l myusernames -P my.passwds -e s -e n -t 1 -M pop3.servers -o cracked_pop3.out pop3
Resources
- http://www.darknet.org.uk/2007/02/thc-hydra-the-fast-and-flexible-network-login-hacking-tool/
- http://www.thc.org/thc-hydra/
- http://en.wikipedia.org/wiki/Hydra_(software)
