Back to Blog
HTB Write-up HackTheBox / Access
HTB Write-up

Anonymous FTP. MDB, ZIP, PST.
Telnet Shell. cmdkey Hands You Administrator.

Anonymous FTP drops two files: a Microsoft Access database and a password-protected zip archive. The database contains the zip password. The zip contains an Outlook PST file. The PST contains an email with the Telnet credentials for the security account. Once inside, cmdkey /list reveals stored Administrator credentials on the machine. runas /savecred executes as Administrator without the password. Root without cracking a single hash.


Machine Access
Platform HackTheBox
OS Windows 7
Difficulty Easy
Date 12 Jun 2026
Status Rooted
Flags User + Root
IP 10.129.14.79

The Machine

Access is a Windows 7 machine with three open ports: FTP on 21, Telnet on 23, and HTTP on 80. The entire attack path runs through FTP. Anonymous login is allowed and the share contains two files in separate directories. Those two files, and the credentials hidden inside them, chain directly to a Telnet shell and then to the Administrator account via Windows stored credentials.

The machine teaches three things that matter on the exam. First, always try FTP anonymous login before reaching for anything else. Second, non-standard file formats (MDB, PST) are credential containers just like config files. Third, cmdkey /list is a mandatory post-foothold check on every Windows shell. Stored credentials plus runas /savecred equals arbitrary command execution as any stored user, no password needed.

PortServiceNotes
21FTP (Microsoft ftpd)Anonymous login allowed. Active mode required. Contains the full credential chain.
23Telnet (Windows 7 6.1.7600)Foothold. Credentials come from the FTP chain.
80HTTP (IIS 7.5)Not part of the attack path.

Enumeration

Two-phase nmap. All ports first, then service scan on the open ones.

nmap -p- --min-rate 1000 -oN access-all-ports.txt 10.129.14.79
Nmap all ports scan showing ports 21, 23, and 80 open on Access
Ports 21 (FTP), 23 (Telnet), and 80 (HTTP) open.
nmap -p 21,23,80 -sC -sV --min-rate 1000 -oN access-service-scan.txt 10.129.14.79
Nmap service scan showing FTP anonymous login allowed, Telnet on Windows 7, IIS 7.5
FTP anonymous login allowed. Telnet on Windows 7 build 6.1.7600. IIS 7.5 on 80.

FTP anonymous login allowed is the entire attack surface. IIS on 80 serves a static page with no meaningful content. Telnet is the foothold, but credentials come from FTP first. The order is clear: enumerate FTP, extract credentials, use Telnet.

FTP Enumeration

FTP anonymous login on Windows often requires active mode. PASV mode fails when the server cannot initiate the data connection back through NAT. The -A flag forces active mode.

ftp -A 10.129.14.79
FTP anonymous login successful using active mode on Access
Anonymous login successful with active mode. Without -A, the data connection fails.

Directory listing shows two subdirectories: Backups and Engineer.

FTP root directory showing Backups and Engineer subdirectories
Two directories. Both are worth downloading completely before analysing either one.

Inside Backups: a single file, backup.mdb. MDB is a Microsoft Access database format.

Backups directory containing backup.mdb file
backup.mdb. A Microsoft Access database. Always switch to binary mode before downloading.
binary
get backup.mdb
Downloading backup.mdb in binary mode via FTP
Binary mode before every non-text file. ASCII mode corrupts the database and makes it unreadable.

Inside Engineer: Access Control.zip. The space in the filename requires quotes.

Engineer directory containing Access Control.zip
Access Control.zip. Password-protected, but the password is already sitting in backup.mdb.
get "Access Control.zip"
Downloading Access Control.zip in binary mode via FTP
Both files downloaded. Now extract credentials from the database.

Credential Extraction: backup.mdb

mdbtools reads Microsoft Access database files on Linux. The first step is enumerating all tables, then dumping the ones that look useful.

mdb-tables backup.mdb
mdb-tables output listing all tables in backup.mdb including auth_user
Over 100 tables. auth_user stands out immediately.
mdb-export backup.mdb auth_user
mdb-export auth_user showing admin, engineer, and backup_admin credentials
Three accounts. engineer:access4u@security is the zip password for the next step.

Three credential pairs from the auth_user table:

UsernamePasswordUse
adminadminNot useful for this chain
engineeraccess4u@securityUnlocks Access Control.zip
backup_adminadminNot useful for this chain

Credential Extraction: Access Control.zip

Standard unzip fails with compression method 99, which is AES-256 encryption. Only 7zip handles it.

7z x "Access Control.zip"
7z extraction of Access Control.zip with password access4u@security yielding Access Control.pst
Password: access4u@security. Extracted: Access Control.pst. An Outlook Personal Storage Table file.

PST files contain the full email history of an Outlook mailbox: messages, attachments, contacts, calendar entries. They are a high-value target on any Windows engagement. Credentials sent via internal email are common.

Credential Extraction: Access Control.pst

readpst converts a PST file to mbox format, which is readable with standard tools.

readpst "Access Control.pst"
cat "Access Control.mbox"
readpst converting Access Control.pst to mbox format
readpst dumps the PST to a readable mbox file.
Email from john@megacorp.com containing security account credentials 4Cc3ssC0ntr0ller
Email from john@megacorp.com: the password for the security account has been changed to 4Cc3ssC0ntr0ller. Telnet credentials confirmed.

Credentials from the email: security / 4Cc3ssC0ntr0ller. The credential chain is complete.

Foothold: Telnet

telnet 10.129.14.79
Telnet login successful as security with password 4Cc3ssC0ntr0ller
Shell on Windows 7 as security. The credential chain delivered exactly what it promised.
type C:\Users\security\Desktop\user.txt
User flag captured on Access as security
User flag: fdf064b58eadd113911c771ffd0cd081

Privilege Escalation: Stored Credentials via runas

The first post-foothold check on any Windows shell is cmdkey /list. It lists all stored credentials on the machine, which are credentials that Windows has saved and can pass automatically to applications requesting them.

cmdkey /list

Output confirms stored Administrator credentials:

Target: Domain:interactive=ACCESS\Administrator
Type: Domain Password
User: ACCESS\Administrator

Stored credentials plus runas /savecred equals arbitrary command execution as that user. The /savecred flag tells runas to use the stored credential without prompting for a password. The payload writes root.txt to a location the security account can read.

runas /user:ACCESS\Administrator /savecred "cmd.exe /c type C:\Users\Administrator\Desktop\root.txt > C:\Users\security\Desktop\root.txt"
type C:\Users\security\Desktop\root.txt
runas /savecred executing as Administrator without password prompt
runas /savecred. No password prompt. The stored credential is used automatically.
Root flag captured on Access
Root flag: 8b5a78692eb4d29baf0a614b95627ba9. Box complete.
HackTheBox Access machine solved
Access rooted.

Attack Chain

StepActionResult
1Nmap: ports 21, 23, 80. FTP anonymous allowed.Full attack surface identified
2FTP -A (active mode). Download backup.mdb and Access Control.zip in binary mode.Both files retrieved without corruption
3mdb-export backup.mdb auth_userengineer:access4u@security extracted
47z x "Access Control.zip" with password access4u@securityAccess Control.pst extracted
5readpst + cat Access Control.mboxsecurity:4Cc3ssC0ntr0ller from email
6telnet 10.129.14.79 as securityShell on Windows 7. User flag captured.
7cmdkey /list: Administrator stored credentials confirmedEscalation path identified without cracking
8runas /user:ACCESS\Administrator /savecredRoot flag captured. Box complete.

Vulnerabilities

VulnerabilityLocationImpact
Anonymous FTP with sensitive files exposedFTP share: Backups/ and Engineer/Unauthenticated access to credential chain materials
Plaintext credentials in unencrypted databasebackup.mdb auth_user tableZip password and additional account credentials exposed without authentication
Credentials transmitted in plaintext emailAccess Control.pst email from john@megacorp.comTelnet credentials for security account recoverable from archived email
Stored Administrator credentials via cmdkeyWindows Credential Manager on ACCESSAny local user can invoke runas /savecred to execute arbitrary commands as Administrator

Lessons Learned

  • FTP anonymous login on Windows requires active mode. PASV mode fails when the server cannot initiate the data connection back through NAT. The -A flag on the ftp client forces active mode and resolves this immediately. Try ftp -A <target> before troubleshooting anything else on Windows FTP targets.
  • Always switch to binary mode before downloading non-text files. ASCII mode strips line endings and corrupts any file that is not plain text: databases, zip archives, executables, images. Use binary inside ftp before every get command that is not a text file. A corrupted MDB is unreadable and produces no useful output.
  • Enumerate every table in a database before moving on. The auth_user table in backup.mdb was one of over 100 tables. mdb-tables lists all of them. mdb-export dumps individual tables. Scan the full table list for anything that looks like it stores credentials: auth, users, accounts, passwords, config.
  • AES-encrypted zip files require 7zip, not standard unzip. Compression method 99 is AES-256 encryption. Standard unzip reports an unsupported compression method and skips the file entirely, often without a clear error. 7zip handles AES-encrypted archives cleanly with the correct password.
  • PST files are high-value credential containers on Windows engagements. Outlook PST files store the full email history of a mailbox including messages sent and received. Internal communications frequently contain credentials, configuration details, and access instructions sent in plaintext. Always convert PST files with readpst and search the output for passwords, keys, and credentials.
  • cmdkey /list is a mandatory post-foothold check on every Windows shell. Stored credentials visible via cmdkey combined with runas /savecred give arbitrary command execution as any stored user without knowing the password. On the OSCP exam, run cmdkey /list immediately after landing a Windows shell. This machine is a clean demonstration of why.
Previous HTML Comment. Default Creds. PHP Upload. Writable sudo Script. Root.
Found this useful? Share it with someone preparing for OSCP or HTB.
Share on X Share on LinkedIn