root@sparrow:~/writeups$ cat farewell.md
// Offensive
Farewell
21 Jun 2023
· 6 min read
· root access
Executive summary — Farewell is a TryHackMe web room solved by chaining low-severity flaws: the login portal enumerates users and leaks password hints, narrowing thedeliver11account down to aTokyo+4-digit pattern; a WAF with rate-limiting is bypassed by rotatingX-Forwarded-Forand tuning theUser-Agentto complete the brute force; once in as a user, a stored XSS in the message form runs in the administrator's browser and, because thePHPSESSIDcookie lacks the HttpOnly flag, it lets us steal the admin's session and take over the panel. A full Enumeration → Brute force → Stored XSS → Cookie theft → Admin path.
| Platform | TryHackMe |
| Operating system | Linux |
| Difficulty | Medium |
| Room | Farewell |
| Target IP | 10.48.178.163 |
Attack map
[80/HTTP] Apache 2.4.58 — login portal
│ username enumeration → password-hint disclosure
▼
[deliver11] hint "Tokyo" + 4 digits (brute-forceable)
│ WAF bypass: User-Agent + X-Forwarded-For rotation → password
▼
[dashboard.php] USER FLAG + "Submit Farewell Message" form
│ stored XSS reviewed by the admin bot (WAF keyword-filter bypass)
▼
[admin PHPSESSID] cookie stolen (missing HttpOnly flag)
│ session hijacking in the browser DevTools
▼
[admin.php] ADMIN FLAG1. Initial reconnaissance
We start by mapping the attack surface with a full port scan, version detection and default scripts:
nmap -T4 -n -sC -sV -Pn -p- 10.48.178.163Why these flags:
-p-→ scans all 65535 TCP ports, not just the usual top 1000.-sC -sV→ default NSE scripts + per-service version detection.-Pn -n→ skip host-discovery ping and DNS resolution (faster).
Relevant results:
- Port 22 → OpenSSH 9.6p1.
- Port 80 → Apache 2.4.58 serving a login form. The
PHPSESSIDcookie is issued without theHttpOnlyflag —a seemingly minor detail that turns out to be decisive at the end—.
🔒 Clearance required
Root Access unlocks the content you can't see — everything else on the site is already open.
See Root Access plansNo account? Create one free then upgrade from your console.