4 min read

TryHackMe: Ollie

Begin with strange port and gain credentials from it, then using the creds to logs in on the web, after that chaining multiple vulnerability to gain reverse shell

TryHackMe: Ollie
#

Reconnaissance

plaintext

Nmap scan resulting 3 open ports

  • 22/SSH
  • 80/HTTP
  • 1337/??
  • Port 1337 is strange and i think it might be our entry point, so i tried to interact with it using netcat like so.

    [Gambar tidak memiliki deskripsi]

    Got prompted some question and then it give me a credentials, let's check the web.

    [Gambar tidak memiliki deskripsi]

    Using our credentials we got before for login and i got redirected to the dashboard.

    [Gambar tidak memiliki deskripsi]

    Look at the bottom of the page there is a name and version of the CMS, let's search for some already exists vulnerability online.

    I found script to gain RCE for version 1.4.5 and tried it but it seems didn't work so i found another interesting article here.

    [Gambar tidak memiliki deskripsi]
    #

    SQL Injection

    Go to this url: "http://10.10.39.10/index.php?page=administration&section=routing&subnetId=bgp&sPage=1" and then click action and subnet mapping and look at the search input, we can inject SQL here.

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

    Using PoC payload from fluidsattack and it works perfectly.

    [Gambar tidak memiliki deskripsi]

    Since we already log in on the CMS, i think there is no reason to dump the database, so i think we can gain RCE here.

    #

    Remote Code Execution

    First we need to check the user permission, is phpipam_ollie (our current user) have permission to write?

    plaintext
    [Gambar tidak memiliki deskripsi]

    Y means Yes, we can write a webshell here.

    plaintext

    The hex above is a PHP code.

    [Gambar tidak memiliki deskripsi]

    Execute the payload above and let's make request with it.

    [Gambar tidak memiliki deskripsi]
    #

    Shell as WWW-Data

    Using encoded payload we can gain reverse shell here

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

    Shell as Ollie

    Since we got user Ollie here, let's try to privilege escalation to Ollie using password used before for logs in to the web.

    [Gambar tidak memiliki deskripsi]

    It works!

    plaintext

    Then i grab pspy64 and run it.

    Found an interesting process, feedme ?

    [Gambar tidak memiliki deskripsi]
    plaintext

    Weird as f*ck, it's owned and running by root but since Ollie is on the group we can freely write to it. Let's gain root shell.

    #

    Shell as Root

    plaintext
    plaintext

    © 2026