To specify the target in Hydra, you use the following syntax:
hydra [options] <service>://<target>[:port]
Here's a breakdown of each component:
-
<service>: The protocol or service you are targeting (e.g., ssh, ftp, http). This indicates what type of authentication Hydra will attempt. -
<target>: The IP address or hostname of the target server. This is the destination you are trying to access. -
[:port]: An optional port number. If the service is running on a non-standard port, you can specify it here. If omitted, Hydra will use the default port for the specified service.
Example
For example, if you want to attack an SSH service running on localhost (127.0.0.1) on the default port (22), you would use:
hydra -vV -l testuser -p testpass ssh://127.0.0.1
If the SSH service were running on a non-standard port, say 2222, you would specify it like this:
hydra -vV -l testuser -p testpass ssh://127.0.0.1:2222
This command structure allows you to direct your attack to the correct service and target.
