hunts.dev
WriteupsProjects
Soulmate - HTB

Soulmate - HTB

Tags
Published
October 19, 2025
Author
notion image

Overview

In HackTheBox’s Soulmate machine, I exploited an unpatched CrushFTP instance on HackTheBox Soulmate machine to gain an initial foothold on the FTP web server. Followed by a PHP webshell for post-exploitation. Through the use of linPEAS, I ran automated enumeration to gain information on the user which revealed cleartext credentials to gain user access. Upon gaining access, I discovered a misconfigured Erlang service which reused those credentials and abused the erlang console by root command execution.

Conducting initial recon through nmap to discover any open ports:

To confirm my VPN is connected correctly, and confirm the machine is reachable, I pinged the target machine IP address.
notion image
nmap -sV -p 1-65535 -T4 -A -v -Pn 10.10.11.86

Findings

  • Port 80 (HTTP)
  • Port 22 (SSH)

Troubleshooting

Port 80 appears to be running nginx 1.18.0. Initially I tried just visiting http://10.10.11.86, which kept returning server not found errors. After doing some research, I found out I add to add the ip to the /etc/hosts file for it to correctly resolve to http://soulmate.htb For future notice, when the nmap scan returns something along the lines of “Did not follow redirect to <hostname>, you need to add the ip and hostname to the hosts file.
After adding the ip/hostname to the hosts file, we can view the web server running a dating website.
notion image

Directory Enumeration

Since port 10.10.11.86:80 is open and resolves to http://soulmate.htb, I ran a gobuster script against a wordlist to discover any subdomains/directories.
GoBuster found a hit on ftp.soulmate.htb/WebInterface/login.html
Visting the URL, it appears to be a login screen for Soulmate’s FTP server, CrushFTP.
Examining the network traffic, I believe I was able to identify the version of CrushFTP 11.W.657.
notion image
Conducting vulnerability research on this version of CrushFTP led me to exploit-db, giving further details into CVE-2025-31161.

Vulnerability

CrushFTP before 10.8.4 and 11.3.1 allows unauthenticated HTTP(S) port access and full admin takeover through a race condition and header parsing logic flaw in the AWS4-HMAC authorization mechanism.
Exploiting this allows bypassing authentication and logging in as any known user (e.g. crushadmin)


Conducting further research into CVE-2025-31161 led me to a publicly available PoC.
Running our exploit:

Exploitation

Now that we have created and logged into our new admin account, we can succesfully login to the FTP web server.
Navigating to the admin console, there is a User Manager tab that shows all of the users with access to the CrushFTP server. Reviewing the users, it looks like Ben works in Soulmates IT/Web Department.
notion image
Using the admin interface, I reset Ben’s password and logged into his account and navigated to the webprod directory. I don’t know how to write custom shells, so I found a PHP webshell on GitHub and uploaded it into the webProd directory.
notion image
Through the webshell, we were able to execute LinPEAS and gain access to Ben’s credentials in clear text, and logging in via SSH, gave us the user flag.
notion image

Gaining Root Access

Additionally, in the linPEAS output, we found several mentions of Erlang running on port 2222.
To login, we used Ben’s original SSH credentials, and was able to gain access into the Erlang service running on root permissions.
Doing research on command execution in Erlang, I came across a vuln.be article explaining OS command execution.
notion image
So, lets try and find the root flag using this command execution

Ending Thoughts

As this was my first red team box, Soulmate was a great exercise for me to chain together small investigate hints to a full compromise of the system. A couple technical takeaways for this machine:
  • Host and vhost discovery: The initial ‘did not follow redirect’ was a small clue that paid off huge once soulmate.htb was added to /etc/hosts.
  • Patch Management: Discovering multiple vulnerabilities through CrushFTP, and Erlang through public PoC’s was the pivot point that led from initial recon to full admin access. Patch Management is so important for organizations to address, this whole attack could have been prevented through the patching of CrushFTP.
  • Enumeration: Using linPEAS for this machine worked out very well for automated enumeration, which gave me insight into what to dig into.
 
Table of Contents
OverviewConducting initial recon through nmap to discover any open ports:FindingsTroubleshootingDirectory EnumerationVulnerabilityExploitationGaining Root AccessEnding Thoughts
Ryan Hunt · hunts.dev
ProjectsWriteups