root@thehacksparrow:~/writeups$ SYSTEM ONLINE
root@sparrow:~/writeups$ cat linkvortex.md
// writeups

LinkVortex

7 Dec 2024 · 16 min read · root access
LinkVortex - maquina de Hack The Box

Executive summary — LinkVortex starts from an exposed .git repository on a development subdomain, which leaks a hardcoded admin password sitting inside a test file. That password unlocks a Ghost CMS admin session, which is used to exploit CVE-2023-40028 — a symlink smuggled inside an imported ZIP that the decompression routine never filters — to read arbitrary files off the box and recover plaintext SMTP credentials. Those credentials, reused as the SSH password for a system account, hand over user.txt; for root, a sudo script that "quarantines" symlinks falls to a double symlink because it only validates the first hop of the chain.

PlatformHack The Box
Operating systemLinux (Ubuntu 22.04)
CategoryWeb / Ghost CMS
DifficultyEasy
StatusRetired
Target IP10.129.231.194

Attack map

[80] linkvortex.htb — Ghost CMS 5.58 blog (the redirect reveals the vhost)
   │  vhost dev.linkvortex.htb — "Launching Soon", with .git/ exposed and served
   ▼
[.git dump] credential leak — test password + config.production.json path
   │  admin@linkvortex.htb / OctopiFociPilfer45 -> valid Ghost admin session
   ▼
[Ghost Admin] CVE-2023-40028 — ZIP import with a symlink, extract-zip doesn't filter it
   │  arbitrary file read with the privileges of the Ghost process (node)
   ▼
[LFI] config.production.json -> SMTP credentials: bob@linkvortex.htb / fibber-talented-worth
   │  same password reused as the SSH password for the system account bob
   ▼
[SSH]  bob  (user.txt)
   │  sudo NOPASSWD /opt/ghost/clean_symlink.sh *.png — single-hop readlink filter
   ▼
[ROOT]  double symlink (evil.png -> stage -> /root/root.txt) evades the filter,
        the final cat resolves the whole chain

1. Reconnaissance

nmap -sV -sC --top-ports 50 -Pn -oN recon/nmap-top.txt 10.129.231.194
22/tcp open  ssh     OpenSSH 8.9p1 Ubuntu 3ubuntu0.10 (Ubuntu Linux; protocol 2.0)
80/tcp open  http    Apache httpd
|_http-title: Did not follow redirect to http://linkvortex.htb/

OpenSSH 8.9p1 Ubuntu 3ubuntu0.10 places the target on Ubuntu 22.04 LTS. The unfollowed redirect hands over the main vhost, linkvortex.htb, for free — no fuzzing needed.

echo "10.129.231.194 linkvortex.htb" | sudo tee -a /etc/hosts

A full nmap -p- confirms only two real open ports: the whole attack surface lives on port 80.

curl -s http://linkvortex.htb/ | grep -iE 'generator|X-Powered'
<meta name="generator" content="Ghost 5.58">
X-Powered-By: Express

A blog built on Ghost CMS 5.58 ("BitByBit Hardware") running on Node/Express behind Apache, with the admin panel reachable at /ghost (200). The version is the clue that matters: Ghost ≤ 5.59 carries CVE-2023-40028.

The server returns a catch-all response (200, same size) for any unrecognized Host, so finding real vhosts means comparing status code and size against that baseline, not trusting a bare 200:

for sub in dev devops git staging test admin blog api internal; do
  r=$(curl -s -o /dev/null -w "%{http_code}:%{size_download}" -H "Host:$sub.linkvortex.htb" http://linkvortex.htb/)
  echo "$sub.linkvortex.htb ->$r"
done
dev.linkvortex.htb     -> 200:2538     <- different: real vhost
devops.linkvortex.htb  -> 301:230
git.linkvortex.htb     -> 301:230      (everything else redirects the same way)

Only dev.linkvortex.htb answers differently from the rest — a real vhost, not a catch-all false positive. Its landing page is a static "Launching Soon" screen with no apparent content. When a server answers identically to any Host, running an uncalibrated ffuf generates hundreds of false positives; always diff against the baseline response before trusting the list.

🔒 Clearance required

This content is Root Access only. Everything else on the site — the free tier, the whole public library — stays open.

See Root Access plans

No account? Create one free then upgrade from your console.