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

Soulmate

6 Sep 2025 · 19 min read · root access
Soulmate - maquina de Hack The Box

Executive summary — Soulmate is an Easy Linux box with two surfaces: a PHP dating site (no viable RCE path) and a CrushFTP instance on a subdomain, vulnerable to CVE-2025-31161 (authentication bypass). After creating an admin user, a real disk folder has to be mapped into the user's VFS — a step so poorly documented it had to be automated by capturing the admin UI's real traffic with Selenium + mitmproxy. From there, a webshell gives www-data, and an Erlang script with a hardcoded password (reused by the real ben account) leads to a mini Erlang-based SSH server that, running as root with no privilege drop at all, hands out an Erlang REPL equivalent to root command execution.

PlatformHack The Box
Operating systemLinux
DifficultyEasy
StatusRetired
Target IP10.129.231.23

Attack map

[80] soulmate.htb — PHP dating site (photo upload has no viable bypass)
   │  epmd reveals an Erlang ssh_runner node + the ftp.soulmate.htb subdomain (CrushFTP)
   ▼
[CrushFTP] CVE-2025-31161 — auth bypass → admin account created
   │  VFS mapped to /app/webProd (real disk) via Selenium + mitmproxy
   ▼
[RCE]  Webshell uploaded → www-data
   │  Hardcoded ben:HouseH0ldings998 credential in an Erlang script running as root
   ▼
[SSH]  ben@host  (ForceCommand → interactive shell via paramiko)
   │  same password reused on the local Erlang-based SSH (127.0.0.1:2222)
   ▼
[ROOT]  Erlang Eshell with no privilege drop → os:cmd() as root

1. Reconnaissance

nmap -p- --min-rate 5000 -v 10.129.231.23 -oN nmap_ports.txt
PORT      STATE    SERVICE
22/tcp    open     ssh
80/tcp    open     http
4369/tcp  open     epmd
nmap -p22,80,4369 -sCV -v 10.129.231.23 -oN nmap_sV.txt
22/tcp   open  ssh     OpenSSH 8.9p1 Ubuntu 3ubuntu0.13 (Ubuntu Linux; protocol 2.0)
80/tcp   open  http    nginx 1.18.0 (Ubuntu)
|_http-title: Did not follow redirect to http://soulmate.htb/
4369/tcp open  epmd    Erlang Port Mapper Daemon
| epmd-info:
|   epmd_port: 4369
|   nodes:
|_    ssh_runner: 40979

The epmd-info reveals a registered Erlang node called ssh_runner. Connecting directly to its reported distribution port is refused from outside (Connection refused) — that node's real listener is on 127.0.0.1, and only becomes relevant once there's local code execution on the box.

🔒 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.