Bastion
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.
| Platform | Hack The Box |
| Operating system | Windows Server 2016 |
| Difficulty | Easy |
| Status | Retired |
| Target IP | 10.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
| Port | Service |
|---|---|
| 22 | SSH |
| 135 | RPC |
| 139 | NetBIOS |
| 445 | SMB |
Four ports, but the vector is obvious: SMB.
Resumen ejecutivo — Bastion es una Windows Server 2016 Easy muy «forense»: un share SMB con backups deja leer los discos virtuales (.vhd) de un Windows Image Backup. Montando ese VHD (en vez de descargarlo entero) se llega al sistema de ficheros y se extraen los hives SAM y SYSTEM, de donde sale el hash de
L4mpje— crackeable con una wordlist. Ya dentro por SSH, la config de mRemoteNG guarda la contraseña de Administrator cifrada con una clave maestra por defecto: se descifra y se es Administrator. Recorrido SMB → VHD → SAM → hash → mRemoteNG → root.
| Plataforma | Hack The Box |
| Sistema operativo | Windows Server 2016 |
| Dificultad | Easy |
| Estado | Retired |
| IP objetivo | 10.129.136.29 |
Mapa del ataque
[445] SMB → share «Backups» (guest, lectura/escritura)
│ note.txt: «no descargues el backup completo, es muy pesado»
│ WindowsImageBackup/L4mpje-PC → discos virtuales .vhd
▼
[VHD] vhdimount + mmls -aB (offset) → montar la partición NTFS
│ System32\config\SAM + SYSTEM → pwdump → hash de L4mpje
▼
[Hash] hashcat -m 1000 (rockyou) → contraseña en claro
▼
[SSH] L4mpje → user.txt
│ mRemoteNG (confCons.xml) → password de Administrator cifrada
│ decipher_mremoteng.jar → descifrado (clave por defecto)
▼
[SSH] Administrator → root.txt
1. Enumeración inicial
Añadimos el host al fichero /etc/hosts y lanzamos un escaneo de puertos estándar:
echo "10.129.136.29 bastion.htb" | sudo tee -a /etc/hosts
nmap -sC -sV bastion.htb
| Puerto | Servicio |
|---|---|
| 22 | SSH |
| 135 | RPC |
| 139 | NetBIOS |
| 445 | SMB |
Cuatro puertos, pero el vector salta a la vista: SMB.
This content is Root Access only. Everything else on the site — the free tier, the whole public library — stays open.
See Root Access plansNo account? Create one free then upgrade from your console.
Este contenido es solo para Root Access. Todo lo demás del sitio — el nivel gratuito, toda la biblioteca pública — sigue abierto.
Ver planes de Root Access¿Sin cuenta? Crea una gratis y luego mejora desde tu consola.