HackTheBox | Perfection

In this walkthrough, I demonstrate how I obtained complete ownership of Perfection on HackTheBox
HackTheBox | Perfection

Initial Foothold Hint:

  • Pay careful attention to the server name and version. What technology runs this web server?
  • You should test any user input points for any kind of injections (not just SQLi)
  • What characters seem to make the server mad? Any way to bypass and get the server to parse these forbidden characters?
  • Google the server technology and what kind of injection vulnerability you might be dealing with

Privilege Escalation Hint:

  • Look around for some interesting files that might tell you more about possible credentials and how the credentials are generated
  • You should find the pattern of username and password generation, but this also is going to require you to create a password mask
  • Since you don't know the exact number of characters, incrementally increase the mask character size until the hash is cracked. Too large, and cracking is going to take forever
  • You should be able to switch user, what permissions does this user have?

Nmap Results

# Nmap 7.94SVN scan initiated Tue Mar  5 13:32:12 2024 as: nmap -Pn -p- --min-rate 2000 -A -oN nmap.txt
Nmap scan report for
Host is up (0.014s latency).
Not shown: 65533 closed tcp ports (reset)
22/tcp open  ssh     OpenSSH 8.9p1 Ubuntu 3ubuntu0.6 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   256 80:e4:79:e8:59:28:df:95:2d:ad:57:4a:46:04:ea:70 (ECDSA)
|_  256 e9:ea:0c:1d:86:13:ed:95:a9:d0:0b:c8:22:e4:cf:e9 (ED25519)
80/tcp open  http    nginx
|_http-title: Weighted Grade Calculator
No exact OS matches for host (If you know what OS is running on it, see https://nmap.org/submit/ ).
TCP/IP fingerprint:

Network Distance: 2 hops
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

TRACEROUTE (using port 110/tcp)
1   12.07 ms
2   12.12 ms

OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
# Nmap done at Tue Mar  5 13:32:44 2024 -- 1 IP address (1 host up) scanned in 31.39 seconds

This box is still active on HackTheBox. Once retired, this article will be published for public access as per HackTheBox's policy on publishing content from their platform.

Read the full story

Sign up now to read the full story and get access to all posts for Pending Publication tier only.

Already have an account? Sign in
Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to 0xBEN.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.