GO BACK TO HOME

Hydra: Comprehensive Guide

1. Basic Usage

General Syntax:

hydra -l <username> -P <password-list> <target-ip> <protocol>

2. Common Protocols

SSH:

hydra -l <username> -P <password-list> <target-ip> ssh

HTTP (GET):

hydra -l <username> -P <password-list> <target-ip> http-get

HTTP (POST):

hydra -l <username> -P <password-list> <target-ip> http-post-form "/login.php:username=^USER^&password=^PASS^:F=incorrect"

FTP:

hydra -l <username> -P <password-list> <target-ip> ftp

MySQL:

hydra -l <username> -P <password-list> <target-ip> mysql

3. Using Multiple Usernames

To use multiple usernames, create a file with usernames (one per line) and use the -L option:

hydra -L <username-file> -P <password-list> <target-ip> ssh

4. Specifying Ports

To specify a custom port, use the -s option:

hydra -l <username> -P <password-list> -s <port> <target-ip> ssh

5. Increase Speed with Parallel Connections

To increase the number of parallel tasks, use the -t option:

hydra -l <username> -P <password-list> -t 16 <target-ip> ssh

6. Verbose Output

Use the -v option to get more detailed output:

hydra -l <username> -P <password-list> -v <target-ip> ssh

7. Session Management

Save progress and restore later:

hydra -l <username> -P <password-list> <target-ip> ssh -o output.txt

To resume from a session file, use:

hydra -R -o output.txt

8. Using Specific Passwords

If you have a specific password to try, use the -p option:

hydra -l <username> -p <specific-password> <target-ip> ssh

9. HTTP Form Authentication

For forms that require more complex interaction:

hydra -l <username> -P <password-list> <target-ip> http-post-form "/login.php:username=^USER^&password=^PASS^:F=incorrect"

Replace incorrect with the actual failure message from the login page.

10. Using Proxies

To route through a proxy:

hydra -l <username> -P <password-list> -p <proxy> <target-ip> ssh

11. Targeting Multiple IPs

To attack multiple targets, list the targets in a file and use the -M option:

hydra -l <username> -P <password-list> -M <targets-file> ssh

12. Saving and Analyzing Results

Save output to a file for later analysis:

hydra -l <username> -P <password-list> <target-ip> ssh -o results.txt

13. Documentation and Help

To see all available options, run:

hydra -h

Refer to the official Hydra documentation for more details.

Example Scenarios

1. Brute Force SSH Login:

hydra -l admin -P /path/to/passwords.txt 192.168.1.100 ssh