In this post, I would like to share a walkthrough on Explore Machine.

This room is been considered difficulty rated as an Easy machine

Information Gathering on Explore Machine

Once we have started the VPN connection, we can start the information gathering on the machine by executing the command nmap -sC -sV -p- <IP Address> -PN 

Nmap scan report for explorer.htb (
Host is up (0.12s latency).
Not shown: 998 closed ports
2222/tcp open    ssh    (protocol 2.0)
| fingerprint-strings:
|  NULL:
|_    SSH-2.0-SSH Server - Banana Studio
| ssh-hostkey:
|_  2048 71:90:e3:a7:c9:5d:83:66:34:88:3d:eb:b4:c7:88:fb (RSA)
5555/tcp filtered freeciv
1 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at :
No exact OS matches for host (If you know what OS is running on it, see ).
TCP/IP fingerprint:
59777/tcp open  http    Bukkit JSONAPI httpd for Minecraft game server 3.6.0 or older
|_http-title: Site doesn't have a title (text/plain).
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Aggressive OS guesses: Linux 3.1 (95%), Linux 3.2 (95%), AXIS 210A or 211 Network Camera (Linux 2.6.17) (94%), Sony X75CH-series Android TV (Android 5.0) (94%), Linux 3.8 (94%), ASUS RT-N56U WAP (Linux 3.4) (93%), Linux 3.16 (93%), Android 4.1 - 6.0 (Linux 3.4 - 3.14) (93%), Android 5.0 - 6.0.1 (Linux 3.4) (93%), Android 5.0 - 7.0 (Linux 3.4 - 3.10) (93%)
No exact OS matches for host (test conditions non-ideal).
Network Distance: 2 hops

We notice that 3 Port have been found on the machine

  • 2222 – SSH protocol 2.0
  • 5555 – freeciv
  • 59777 – Bukkit JSONAPI HTTPd for Minecraft game server 3.6.0 or older

The vulnerability on the machine is ES File Explore which the naming “explore” machine has been created

Let’s do some research on the vulnerability!

The first result of vulnerability can be found on the URL same: Android file manager app exposing user data through open port | The Daily Swig (

The vulnerability code can be seen on the URL: ESFileExplorerOpenPortVuln/ at master · fs0c131y/ESFileExplorerOpenPortVuln · GitHub

From the source code, there’s one line that has caught my eyes

Source: All Android Directory Path · GitHub

Let’s do some research on the Mobile Penetration Testing

I found there are some common Android Directory Paths configured on Android Devices.

Let’s do enumerate the directory within the /sdcard/dcim

Wow! We found the information that looks like credentials saved on creds.jpg

## I just make a wild guess on the filename ##

Maintaining Acess

I should need to login the ssh to the machine by using the credentials

We managed to login into the machine and it looks like the screenshot above.

We should getting access the sdcard directory

I found a user flag on that directory

We can read the user flag by executing “cat user.txt

Escalate to Root Privileges Access

We should be requested to install adb tools that can be found over here

The only method for adb to work is that we need to do some port forwarding

We should be using ./adb connect localhost for the player to connect to the machine

I need to use ./adb shell for the player to get the android shell on the machine

We are currently inside the machine which the we should be getting the same file shown on the screenshot above.

The data directory has given permission to deny

We need to execute the “su” command to escalate to root privileges

I have managed to find the root flag on /data/ directory

We need to read the root flag by executing the “cat root.txt” command


Happy Learning Guys!

Leave a Reply

Your email address will not be published. Required fields are marked *