Create a password list:
In your ~/project
directory, create a file named passwords.txt
containing a list of passwords, one password per line. For example:
nano ~/project/passwords.txt
Add the following passwords:
password123
password
123456
Save the file and exit nano
(Ctrl+X, Y, Enter).
Run the FTP attack without verbose output:
Now, let's run the Hydra attack against a target FTP server. For demonstration purposes, we will use a dummy target 127.0.0.1
. Important: Do not attempt to attack systems without explicit permission.
Execute the following command:
hydra -L ~/project/users.txt -P ~/project/passwords.txt ftp://127.0.0.1
-L ~/project/users.txt
: Specifies the username list file.
-P ~/project/passwords.txt
: Specifies the password list file.
ftp://127.0.0.1
: Specifies the FTP service and the target server's address.
Note: Since there is no FTP server running on 127.0.0.1
, the attack will fail. However, this command demonstrates the basic syntax for running an FTP attack without verbose output. Hydra will attempt each username and password combination, but it will only display the results if a successful login is found. If no successful login is found, it will display a message indicating that no password was cracked.
The output will look similar to this (though likely with "Login failed" messages since there's no actual FTP server):
Hydra v9.5 (c) 2023 by van Hauser/THC - Use freely but carefully.
Hydra starting at 2023-10-27 10:00:00
[DATA] 1 task, 3 login attempts per task, 3 password attempts per task
[DATA] attacking ftp://127.0.0.1:21
[STATUS] 0.00 tries/min, 0 tries in 0 min, 1 task
[STATUS] 0.00 tries/min, 0 tries in 0 min, 1 task
...
[ATTEMPT] target 127.0.0.1 - login: user3 password: 123456
[STATUS] 0.00 tries/min, 0 tries in 0 min, 1 task
[ERROR] 127.0.0.1: FTP: Login failed
[ATTEMPT] target 127.0.0.1 - login: user1 password: password123
[STATUS] 0.00 tries/min, 0 tries in 0 min, 1 task
[ERROR] 127.0.0.1: FTP: Login failed
...
[ATTEMPT] target 127.0.0.1 - login: user3 password: password123
[STATUS] 0.00 tries/min, 0 tries in 0 min, 1 task
[ERROR] 127.0.0.1: FTP: Login failed
[ATTEMPT] target 127.0.0.1 - login: user2 password: password
[STATUS] 0.00 tries/min, 0 tries in 0 min, 1 task
[ERROR] 127.0.0.1: FTP: Login failed
...
[STATUS] 0 of 9 tasks completed, 1 task remaining
Hydra finished.
If a successful login was found, the output would include a line like:
[21][ftp] host: 127.0.0.1 login: user1 password: password123
Since we are not running an actual FTP server, the attack will fail, and Hydra will report that no password was cracked. This is expected.