Hack The Box · Windows Machine

Access

Machine details
NameAccess
Release date29 Sep 2018
Retire date23 Feb 2019
OSWindows
DifficultyEasy - Retired [0]
Rated difficultyAccess community difficulty rating
Radar graphAccess machine radar graph
First blood — userm0noc — 00 days, 00 hours, 11 mins, 58 seconds
First blood — rootno0ne — 00 days, 01 hours, 55 mins, 30 seconds
Creatoregre55
CherryTree fileDownload and remove the .txt extension

Enumeration

Start with the usual service and version scan:

nmap -sC -sV -oA ./Access 10.10.10.98
PORT   STATE SERVICE VERSION
21/tcp open  ftp     Microsoft ftpd
| ftp-anon: Anonymous FTP login allowed
23/tcp open  telnet?
80/tcp open  http    Microsoft IIS httpd 7.5
|_http-title: MegaCorp

The useful attack surface is anonymous FTP, Telnet, and the IIS web portal. Anonymous FTP exposes two directories: Backup and Engineer. Download backup.mdb and Access Control.zip.

Retrieving Access files over anonymous FTP
Anonymous FTP exposes the database and encrypted archive.

Credential recovery

Convert the legacy MDB database to CSV and inspect the auth_user table. It contains several passwords.

Access auth_user database table

The password access4u@security opens Access Control.zip, which contains a PST file. The PST has a single message that reveals the security account password: 4Cc3ssC0ntr0ller.

Email recovered from the Access PST file

Initial access

Use the recovered credentials to log in over Telnet as security. From the desktop, read the user flag with type user.txt.

Telnet session on Access
Access user flag

Privilege escalation

Running cmdkey /list reveals saved Administrator credentials, making runas /savecred the privilege-escalation path.

Stored Administrator credentials on Access

Reading the Administrator flag directly does not display the output, so redirect it into a file the security user can access:

runas /savecred /user:ACCESS\Administrator "cmd /c type C:\Users\Administrator\Desktop\root.txt > C:\Users\security\Documents\null.txt"
Access root flag recovered through saved credentials

That's all, folks!