HTB: Dancing Walkthrough

 


Overview

Difficulty: Easy
Operating System: Linux
Objective: Capture flag via FTP
Tools Used: nmapftpopenvpn

Prepared by Araiz Naqvi

Scanning using Nmap

Started with a nmap scan to get information about whether SMB was running on port 445 as mentioned in the task.

nmap scan

SMB is open at 445.

Accessing SMB at 10.129.71.129

Now, let’s smbclient into said IP with the -N and -L flag to be able to login without signing in with a password and list.

smbclient shares

As we see WorkShares does not have admin needs, so thats where we’re hitting.

Trying anonymous which usually has a blank password:

Logging into FTP

Flag Retrieval

Next, let’s ls into the file contents:

Listing Content

And, there is the flag!
Let’s get it.

Getting the flag.txt

Once back home, let’s cat the contents:

Let’s get our flag!

Flag

The flag is 035db21c881520061c53e0536e44f815.

Lessons Learned

- It is fair to say that a lot of misconfigured FTP’s allow for `anonymous` login without the need for passwords, but when normally configured have very limited access to users. But when misconfigured leave out critical information.
- The best way to mitigate this issue is first of all disable anonymous login in the first place. Next, restrict permissions severely if needed. But also strictly log all activity in anonymous logins.

Comments

Popular posts from this blog

HTB: Nibbles Walkthrough

HTB: Crocodile Walkthrough

HTB: Cap Walkthrough