The Danger of Over-Permissive File Shares
A publicly readable SMB share on a domain controller contained a PDF with database credentials, and the SQL service account could be coerced into authenticating to an attacker-controlled SMB server, exposing its NTLM hash for offline cracking. The text stops mid-crack, so it does not show the password being recovered or any further access.
infosecwriteups.com
Published on infosecwriteups.com
Another box, another hack. This time we’re making our way through Hack The Box machine Escape.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely an over-permissive SMB share exposed credentials in a document, and the SQL service account was allowed to make outbound SMB authentication to an untrusted host.
Impact
An unauthenticated visitor could read a document containing database credentials, and the SQL service account's authentication could be captured for offline cracking, though the text does not confirm the password was recovered.
What the attacker needed
Network access to the host; anonymous SMB login allowed; victim opens nothing; no user action
The fix
The share should be restricted to authorised users, secrets should not be stored in shared documents, and the service account should not be able to authenticate to untrusted hosts.
How it was found
- Scan the host and identify the domain and open services
- Log in to SMB anonymously and list shares
- Spider the readable Public share and download the PDF
- Read the PDF to obtain database credentials and usernames
- Connect to MSSQL with those credentials and query the service account
- Run Responder to capture the service account's NTLM hash and crack it with Hashcat
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A file share on a Windows server was left open to anyone, and a document inside it held a database username and password. Separately, the database service could be tricked into proving its identity to the attacker's machine, handing over a scrambled form of its password that can be guessed offline. The write-up ends before showing whether that guess succeeded.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.