HTB | Fawn | Write-Up

Summary:
This article guides users through completing the Fawn machine challenge on Hack The Box. It covers identifying & using an anonymous FTP service to access and download the "root flag".
Machine Name: Fawn | Difficulty: Easy | OS: Linux
The aim of this walkthrough is to provide help with the Fawn machine on the Hack The Box website. Please note that no flags are directly provided here. Moreover, be aware that this is only one of the many ways to solve the challenges.
It belongs to a series of tutorials that aim to help out complete beginners with finishing the Starting Point TIER 0 challenges.
Setup
There are a couple of ways to connect to the target machine. The one we will be using throughout this walkthrough is via the provided pwnbox.
Once our connection is taken care of, we spawn the target machine.
Additionally - even though not required - it is possible to set a local variable (only available in the current shell) containing our target host's IP address. Once set, we can easily access it by prepending a $ to our variable name.
┌─[htb-bluewalle@htb-pwdysfiide]─[~/Desktop]
└──╼ $RHOST=<target-hosts-ip>
┌─[htb-bluewalle@htb-pwdysfiide]─[~/Desktop]
└──╼ $ echo $RHOST
<target-hosts-ip>
┌─[htb-bluewalle@htb-pwdysfiide]─[~/Desktop]
└──╼ $
You could use the unset command to remove it after you no longer need it.
┌─[✗]─[htb-bluewalle@htb-pwdysfiide]─[~/Desktop]
└──╼ $unset RHOST
┌─[htb-bluewalle@htb-pwdysfiide]─[~/Desktop]
└──╼ $
Task | 1
Question: What does the 3-letter acronym FTP stand for?
Simple internet search results should provide you with the answer.
file transfer protocol
Task | 2
Question: Which port does the FTP service listen on usually?
Again, use the internet.
21
Task | 3
Question: What acronym is used for the secure version of FTP?
Same as before, use the internet.
sftp
Task | 4
Question: What is the command we can use to send an ICMP echo request to test our connection to the target?
Check out your connection to the target machine:
┌─[✗]─[htb-bluewalle@htb-pwdysfiide]─[~/Desktop]
└──╼ $ping $RHOST -c 4
PING 10.129.200.114 (10.129.200.114) 56(84) bytes of data.
64 bytes from 10.129.200.114: icmp_seq=1 ttl=63 time=10.1 ms
64 bytes from 10.129.200.114: icmp_seq=2 ttl=63 time=11.0 ms
64 bytes from 10.129.200.114: icmp_seq=3 ttl=63 time=10.2 ms
64 bytes from 10.129.200.114: icmp_seq=4 ttl=63 time=10.1 ms
--- 10.129.200.114 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 10.058/10.343/10.991/0.379 ms
┌─[htb-bluewalle@htb-pwdysfiide]─[~/Desktop]
└──╼ $
ping
Task | 5
Question: From your scans, what version is FTP running on the target?
First do a quick recon and check out the top open ports on the target.
┌─[htb-bluewalle@htb-pwdysfiide]─[~/Desktop]
└──╼ $nmap -sV -p21 $RHOST
Starting Nmap 7.93 ( https://nmap.org ) at 2023-05-04 09:57 BST
Nmap scan report for 10.129.200.114
Host is up (0.015s latency).
PORT STATE SERVICE VERSION
21/tcp open ftp vsftpd 3.0.3
Service Info: OS: Unix
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 0.46 seconds
┌─[htb-bluewalle@htb-pwdysfiide]─[~/Desktop]
└──╼ $
vsftpd 3.0.3
Task | 6
Question: From your scans, what OS type is running on the target?
To check out the OS type, use the -O option. Beware, running the OS detection scripts requires root privileges.
┌─[htb-bluewalle@htb-pwdysfiide]─[~/Desktop]
└──╼ $nmap -O -p21 $RHOST
TCP/IP fingerprinting (for OS scan) requires root privileges.
QUITTING!
┌─[✗]─[htb-bluewalle@htb-pwdysfiide]─[~/Desktop]
└──╼ $sudo nmap -O -p21 $RHOST
Starting Nmap 7.93 ( https://nmap.org ) at 2023-05-04 10:03 BST
Nmap scan report for 10.129.200.114
Host is up (0.012s latency).
PORT STATE SERVICE
21/tcp open ftp
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Aggressive OS guesses: Linux 5.0 (99%), Linux 4.15 - 5.6 (95%), Linux 5.0 - 5.3 (94%), Linux 5.4 (94%), Linux 5.0 - 5.4 (94%), Linux 5.3 - 5.4 (94%), Linux 3.1 (94%), Linux 3.2 (94%), AXIS 210A or 211 Network Camera (Linux 2.6.17) (94%), Linux 2.6.32 (94%)
No exact OS matches for host (test conditions non-ideal).
Network Distance: 2 hops
OS detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 3.95 seconds
┌─[htb-bluewalle@htb-pwdysfiide]─[~/Desktop]
└──╼ $
unix
Task | 7
Question: What is the command we need to run in order to display the 'ftp' client help menu?
If stuck or lost, remember, man pages are your best friends. You could simply use man ftp to search for the help option.
┌─[htb-bluewalle@htb-pwdysfiide]