6 min read

TryHackMe: Olympus

Begin with SQL Injection then found another domain and gain reverse shell from webshell, after that looking for suid for privilege escalation and found interesting file with Zeus's group in it.

TryHackMe: Olympus
#

Reconnaissance

plaintext

Nmap scan resulting 2 open ports.

  • 22/SSH
  • 80/HTTP
  • Look at message from HTTP-title, HTTP-title by default is accessing / but it's redirected to http://olympus.thm, so we need to add this domain to our hosts first.

    plaintext

    Then let's take a look at the web.

    [Gambar tidak memiliki deskripsi]

    We got a message, it's basically saying that the current website is under development but there is old version of this website is still accessible on this domain. So let's try to enumerate the directory.

    plaintext

    Enumerate using feroxbuster with common.txt word-list from Seclist i discover route named "~webmaster", let's check it.

    [Gambar tidak memiliki deskripsi]

    Victor's CMS? Then i searching on google is there any vulnerability for this CMS and found this on exploit db.

    #

    SQL Injection

    [Gambar tidak memiliki deskripsi]

    The PoC is basically saying there is SQL Injection on the search feature, so let's try intercept the request and run sqlmap.

    [Gambar tidak memiliki deskripsi]

    Send to repeater and save the request to a file.

    [Gambar tidak memiliki deskripsi]

    Then run sqlmap with the request file.

    plaintext
    [Gambar tidak memiliki deskripsi]
    plaintext
    [Gambar tidak memiliki deskripsi]

    Notice that flag table? let's check it first, i think it might be contain our first flag.

    [Gambar tidak memiliki deskripsi]
    plaintext
    [Gambar tidak memiliki deskripsi]
    plaintext
    [Gambar tidak memiliki deskripsi]

    Since root is the user with Admin role so i tried to crack his password first, but it's take too long so i give up and try Zeus password and it's same as root, take too long and then tried Prometheus and i got the password.

    [Gambar tidak memiliki deskripsi]

    Using the credentials to logs in and i got in.

    [Gambar tidak memiliki deskripsi]
    #

    Arbitrary File Upload

    Then I tried searching for another vulnerability again, to see if there was a vulnerability for the admin dashboard, and then i found this on Exploit DB.

    [Gambar tidak memiliki deskripsi]

    It's basically say we can create a user and upload a webshell here.

    [Gambar tidak memiliki deskripsi]
    [Gambar tidak memiliki deskripsi]
    plaintext

    But after I submitted it and accessed the image route as specified in the PoC exploit DB, I got a forbidden route error.

    [Gambar tidak memiliki deskripsi]

    And then i was looking at View All User and found interesting email

    [Gambar tidak memiliki deskripsi]

    I think it's another domain, so let's add it to our hosts first. Accessing the web and found new login page, and we can login as Prometheus with same credentials as before.

    [Gambar tidak memiliki deskripsi]
    [Gambar tidak memiliki deskripsi]

    Chat App, as you can see above, this is chat between Prometheus and Zeus, they are chatting about upload feature, from here we got hint there is uploads folder here, and the file we uploaded are changed and we must discover our file name first if we want to access it, but how?

    After that i got stuck for some time and remember that we found tables named chats on olympus database, let's try to upload our webshell first and check in on database.

    [Gambar tidak memiliki deskripsi]
    plaintext
    [Gambar tidak memiliki deskripsi]

    Copy the file name and access it on /uploads route, It works!

    [Gambar tidak memiliki deskripsi]
    #

    Shell as WWW-Data

    We can gain reverse shell from here. First set up your netcat listener and put payload below on the URL.

    plaintext
    [Gambar tidak memiliki deskripsi]
    plaintext

    Our second flag is on Zeus's home directory.

    plaintext

    After that i finding an SUID file and found unusual binary file.

    plaintext

    We have Zeus privilege to run this binary, tried run cputils command and i discover that this command is copying file and because we have Zeus privilege, we can try to read Zeus SSH private key.

    plaintext
    [Gambar tidak memiliki deskripsi]

    Grab it to our local machine and try use it to logs in with SSH as Zeus.

    #

    Shell as Zeus

    [Gambar tidak memiliki deskripsi]

    It's need passphrase key, so we need to crack it using john first.

    [Gambar tidak memiliki deskripsi]
    [Gambar tidak memiliki deskripsi]
    plaintext

    After logs in i tried to find file with Zeus's group and found this interesting file.

    [Gambar tidak memiliki deskripsi]

    When i try to access the route in the browser i got not found error, i think it's only accessible on local network.

    [Gambar tidak memiliki deskripsi]

    Then i tried to curl it with target shell and it works! looks like a form post.

    [Gambar tidak memiliki deskripsi]
    #

    Port Forwarding

    Let's forward it to our local machine, we can using SSH here.

    plaintext

    Let's visit the route before.

    [Gambar tidak memiliki deskripsi]

    We need a password, since i can access the PHP file, i tried to read the PHP file first and found a hard coded password there.

    [Gambar tidak memiliki deskripsi]

    Use the password to logs in and got this:

    [Gambar tidak memiliki deskripsi]
    #

    Shell as Root

    I think we can gain reverse shell from here, and i think we just need to put our ip and listening port to the URL.

    [Gambar tidak memiliki deskripsi]
    [Gambar tidak memiliki deskripsi]

    Got it. The root flag is on the /root directory and the bonus flag is on the /etc directory.

    [Gambar tidak memiliki deskripsi]

    © 2026