Credentials Found in File Shares
Network file shares that ordinary domain users can read hold files containing passwords, keys or other credentials.
| Severity | High |
| CVSS 3.1 | 8.1 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N Open in the calculator |
| CVSS 4.0 | 8.6 CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N Open in the calculator |
| CWE | CWE-538: Insertion of Sensitive Information into Externally-Accessible File or Directory |
| OWASP Top 10 | A01:2025 Broken Access Control |
| MITRE ATT&CK | T1552.001 Credentials In Files, T1039 Data from Network Shared Drive, T1078 Valid Accounts |
| Category | Information Disclosure |
Description
File shares that ordinary domain users can read contain files with credentials. Common examples are spreadsheets and documents listing passwords; configuration files with database connection strings or service passwords, such as web.config, appsettings.json and .env files; unattended installation files such as unattend.xml and sysprep.inf; scripts; password manager databases; private keys and certificates with their passphrases; PowerShell history files in redirected profiles; and backups or virtual machine disk images that contain whole systems' credential stores.
The exposure usually arises because shares are created with broad permissions for Everyone, Authenticated Users or Domain Users, on the share, the file system or both, and files are then added over years without regard to who can read them. IT team shares, software deployment and backup locations, home drives and departmental shares with inherited permissions are frequent sources. Any domain user, or an attacker using a compromised account, can therefore collect the credentials and use them to sign in to the systems they protect.
What that gives depends on what is found. Database and application service accounts give access to business data, while administrative and infrastructure credentials, which are common in IT shares and scripts, can lead directly to control of servers or the domain. Backups and disk images can expose every credential held on the systems they capture, and credentials kept in files also tend to be reused across systems and rarely changed.
The issue is identified by enumerating shares with a standard domain account and searching the readable content for credential patterns with tools such as Snaffler, NetExec's spider_plus module or PowerView, followed by manual review of the matches and confirmation that the credentials are valid. The results reflect what a single account could read, so other accounts may be able to see more.
Remediation
- Change every credential found and remove the files, or the credentials in them. Assume the credentials have already been read.
- Review share and NTFS permissions, removing Everyone, Authenticated Users and Domain Users from shares that hold anything other than information intended for all staff, and grant access only to the groups that need it. Access-based enumeration can also hide folders that users cannot open.
- Move secrets used by applications and scripts into a secrets management service or the platform's own protected store, and use group managed service accounts and Windows LAPS where they remove the need for a stored password.
- Provide an approved password manager for passwords that staff need to share, and make clear that passwords must not be kept in documents.
- Restrict backup and virtual machine storage to the administrators who manage it.
- Scan shares regularly for credential patterns with the same tools an attacker would use, and act on the results.
Confirm the fix by repeating the share search with a standard domain account and testing that the credentials found previously no longer work.
References
Add This Finding to Your Library
In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.
Free trialYour trial starts when your portal goes live, not when you sign up, so the time you spend setting up does not count. · No card required
Only need the reporting? Our reporting tool is free and open source, with the same library.