Hydra User Guide

  • https://github.com/vanhauser-thc/thc-hydra

Hydra Syntax

  • The correct hydra syntax is depended upon the service you are going after. For example if we want to hit ftp we should use:

FTP

hydra -l user -P passlist.txt ftp://10.10.10.10 -F

SSH

hydra -l <username> -P /usr/share/wordlists/rockyou.txt 10.10.10.10. -t 4 ssh
  • -l is to specify the username

  • P is to specify a password list

  • -t is to specify the number of threads to run hydra with.

  • Note: Hydra recommends no more than 4 threads, however you can run it faster with -t 16.

  • -F means stop when you find your first valid password, highly recommend this option

hydra -l root -P /usr/share/wordlists/rockyou.txt ssh://$host -f
hydra -l admin -P /usr/share/metasploit-framework/data/wordlists/unix_passwords.txt ssh://$host -f -s 2222
hydra -L user.txt -P password.txt -f ssh://10.10.15.2:31294 -t 4 -w 15 -F 

POST Web Form

  • Hydra can be used to brute force web logins as well.

  • Step 1: Determine the request made to the form (POST/GET)

  • Identify this in the network tab (developer tools), view the source code, or use Burp Suite.

  • Syntax:

  • http-post-form specifies the type of form

  • /login url the login page URL i.e. http://dont-brute-force-me.com/login.php

  • :username the form field name for the username

  • ^USER^ this tells hydra to use the username you specified

  • password the form field name for the password

  • ^PASS^ the password list specified in the command

  • Login the failed login message

  • Login failed is the login failure message that the form specifies

  • F=inncorrect the word that appears on the page if the login fails

  • -vV specifies very verbose output

  • Hydra non default ssh port:

HTTP-GET

  • Basic Authentication HTTP-GET

Example Syntax

Additional Syntax Formats

Last updated