5 min read

TryHackMe: VulnNet: Endgame

Begin with given static web then enumerate subdomains and found another, gain admin CMS credentials using sqlmap then upload reverse shell to CMS and gain shell after that decrypting .mozilla folder to gain another user shell

TryHackMe: VulnNet: Endgame
#

Reconnaissance

plaintext

Nmap scan resulting 2 open ports.

  • 22/SSH
  • 80/HTTP
  • Accessing the web and got this:

    [Gambar tidak memiliki deskripsi]

    Let's add this domain to our hosts file.

    plaintext

    Accessing the web again and found nothing useful information.

    [Gambar tidak memiliki deskripsi]

    Since the description of the challenge mention enumeration is the key, so i am enumerate the directory web and found nothing, then i enumerate the subdomains and found this.

    plaintext
    [Gambar tidak memiliki deskripsi]

    Let's add those subdomains to our hosts again.

    On the shop.vulnnet.thm is nothing useful information there, i tried access all the available link on the web and found nothing and i tried to enumerate the directory and still found nothing useful.

    [Gambar tidak memiliki deskripsi]

    Then checking api.vulnnet.thm is just throwing message the API is up, it might be useful later.

    [Gambar tidak memiliki deskripsi]

    Continue checking the next web which is blog.vulnnet.thm, this web is for render a blog post.

    [Gambar tidak memiliki deskripsi]

    And i notice interesting thing while looking at the request network while render the post.

    [Gambar tidak memiliki deskripsi]

    It's fetching API from api.vulnnet.thm, then i tried to access it and it works.

    [Gambar tidak memiliki deskripsi]

    Spent some time on this and i tried changing the ID to "1 --" and it reflected, i think it's SQL Injection.

    [Gambar tidak memiliki deskripsi]
    #

    SQL Injection

    Tried to put sleep() function and it works! it was sleeping!

    plaintext

    Then i grab the URL and run a sqlmap.

    plaintext
    [Gambar tidak memiliki deskripsi]

    There is 3 database available, let's check the vn_admin first.

    plaintext
    [Gambar tidak memiliki deskripsi]

    be_users is the interesting one, let's check the column.

    plaintext
    [Gambar tidak memiliki deskripsi]

    Let's dump it.

    plaintext
    [Gambar tidak memiliki deskripsi]

    Then grab the hash and run john to crack it. While waiting john to complete i checking another domain which is admin1.vulnnet.thm, It tell us that management panel is up, so i tried to enumerate the directory and found a CMS login page.

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

    I guess we need chris_w credentials to logs in to it. But john was running for some time and still not found the password, so i give up and try to check another DB to enumerate.

    plaintext
    [Gambar tidak memiliki deskripsi]

    It's a long list, i think it's not actual credentials but i think it might be contain chris password? let's dump it to csv file.

    plaintext
    plaintext
    [Gambar tidak memiliki deskripsi]

    Got it, then tried use the credentials to logs in on typo3 CMS and got in.

    [Gambar tidak memiliki deskripsi]

    On the file list i tried upload PHP script to gain reverse shell but file with PHP extension is not allowed.

    [Gambar tidak memiliki deskripsi]

    But we can change the configuration to allow PHP extension, Follow steps below.

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

    Then comeback to file list and upload it again and it works!

    #

    Shell as www-data

    Access the file on "http://admin1.vulnnet.thm/fileadmin/user_upload/pentest_monkey.php" and don't forget to set up netcat listener.

    plaintext

    Moving to home folder and there is home directory named system.

    plaintext

    And inside it there our user flag, the .mozilla directory is interesting, because usually on CTF we can gain credentials from this.

    [Gambar tidak memiliki deskripsi]

    Let's zip it and grab it to our local machine.

    plaintext
    plaintext

    Then i am extracting it and found there is 3 user profiles (?) but on the profiles.ini there is no "2fjnrwth.default-release" profile, so i adding it.

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

    Then download firefox decryptor here and cd to it, run the script and got the password.

    [Gambar tidak memiliki deskripsi]
    #

    Shell as system

    Use the password from firefox to logs in with SSH as system.

    plaintext

    I was running linpeas and nothing useful found, then i search SUID manually using find and nothing found, then i am searching capabilities and found this:

    [Gambar tidak memiliki deskripsi]

    And after playing around with it i found that we can read and write any file.

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

    Shell as root.

    So we can gain privilege escalation by changing the root password same as system password, we can do that by read the etc/shadow then overwrite root hash with system hash.

    plaintext

    Save that to file, in my case i named it shadow and don't forget to overwrite the root hash with system hash. Then overwrite the etc/shadow with our file.

    plaintext

    And let's change user to root using system password.

    plaintext

    © 2026