root@thehacksparrow:~/writeups$ SYSTEM ONLINE
root@sparrow:~/writeups$ cat bastion.md
// writeups

Bastion

27 Apr 2019 · 7 min read · root access
Bastion - maquina de Hack The Box

Executive summary — Bastion is a very «forensic» Windows Server 2016 Easy box: an SMB share full of backups exposes the virtual disks (.vhd) of a Windows Image Backup. Mounting that VHD (instead of downloading the whole thing) reaches the filesystem and lets us extract the SAM and SYSTEM hives, which yield L4mpje's hash — crackable with a wordlist. Once inside over SSH, mRemoteNG's config stores the Administrator password encrypted with a default master key: decrypt it and you're Administrator. A SMB → VHD → SAM → hash → mRemoteNG → root path.

PlatformHack The Box
Operating systemWindows Server 2016
DifficultyEasy
StatusRetired
Target IP10.129.136.29

Attack map

[445] SMB → «Backups» share (guest, read/write)
   │  note.txt: "don't download the full backup, it's huge"
   │  WindowsImageBackup/L4mpje-PC → .vhd virtual disks
   ▼
[VHD] vhdimount + mmls -aB (offset) → mount the NTFS partition
   │  System32\config\SAM + SYSTEM → pwdump → L4mpje's hash
   ▼
[Hash] hashcat -m 1000 (rockyou) → cleartext password
   ▼
[SSH]  L4mpje  → user.txt
   │  mRemoteNG (confCons.xml) → encrypted Administrator password
   │  decipher_mremoteng.jar → decrypt (default key)
   ▼
[SSH]  Administrator  → root.txt

1. Initial recon

We add the host to /etc/hosts and run a standard port scan:

echo "10.129.136.29 bastion.htb" | sudo tee -a /etc/hosts
nmap -sC -sV bastion.htb
PortService
22SSH
135RPC
139NetBIOS
445SMB

Four ports, but the vector is obvious: SMB.

🔒 Clearance required

This content is Root Access only. Everything else on the site — the free tier, the whole public library — stays open.

See Root Access plans

No account? Create one free then upgrade from your console.