πΎMeow
π± HTB Meow β Solution Notes
Platform: Hack The Box β Starting Point (Tier 0) Machine: Meow OS: Linux Difficulty: Very Easy Vulnerability Type: Misconfiguration β FTP Anonymous Login (Unauthenticated Access)
πΊοΈ Attack Chain
Ping β Nmap β FTP (Port 21) discovery β Anonymous Login β ls β get flag.txt β cat flag.txt
π§ How Does a Hacker Think? β Before You Begin
Before starting any machine, the first question should be: "Is the target up and is my connection working?"
1οΈβ£ Reconnaissance
Verifying the Target is Alive
π‘ What is ping?
bash
ping <TARGET_IP>
If you get replies, proceed.
Port Scanning
π‘ nmap Parameters
bash
nmap -sV -sC -O <TARGET_IP>
Findings:
nmap with-sCmay detect anonymous FTP login automatically. If you see a line likeAnonymous FTP login allowedin the output β try connecting directly.
π§ How Does a Hacker Think? β First Look at FTP
You found the FTP port. Now ask yourself these questions:
2οΈβ£ Exploitation β FTP Anonymous Login
π‘ What is FTP (File Transfer Protocol)?
Step 1: Establish Connection
bash
ftp <TARGET_IP>
Step 2: Anonymous Login
bash
Name: anonymous
Password: (leave blank, just press Enter)
If you see 230 Login successful, the anonymous login worked.Step 3: List Files
bash
ftp> ls
Example output:
rw-r--r-- 1 0 0 32 Jun 04 2021 flag.txt
Step 4: Download the Flag
π‘ Why is the get Command Necessary?bash
ftp> get flag.txt
ftp> exit
3οΈβ£ Reading the Flag
bash
cat flag.txt
π§ How Does a Hacker Think? β Why Did This Vulnerability Exist?
The FTP Anonymous Login vulnerability almost always stems from one of these scenarios:
4οΈβ£ Remediation
bash
# The following settings should be applied in vsftpd.conf:
# 1. Disable anonymous login
anonymous_enable=NO
# 2. Restrict local users to their home directories
chroot_local_user=YES
# 3. Use encrypted SFTP instead of FTP (via SSH)
# OpenSSH is sufficient for SFTP β no separate installation needed
π Concepts Learned
ping: Verify the target is alive and VPN is workingsC(nmap): Auto-detect vulnerabilities like anonymous FTP with built-in scripts- FTP: Port 21, unencrypted file transfer protocol
- Anonymous Login: Username:
anonymous, password: blank β most common FTP misconfiguration getcommand: Download a file to local machine in FTP (can't usecaton the server)- Misconfiguration: Wrong configuration = open door
π General Hacker Mindset Summary
- Ping first, then nmap: Is the target up? Is VPN working? Verify before anything else.
- Run nmap with
sC: Automatically detects vulnerabilities like anonymous FTP and default credentials. - Always try anonymous login on FTP:
anonymous/ blank password is the most common misconfiguration. - Don't use
catin FTP, useget: Download the file first, then read it in your local terminal. - Nothing set up as "temporary" ever stays temporary: The biggest security holes come from "this will do for now" decisions.