Unsecured Credentials (T1552) is a MITRE ATT&CK technique in the Credential Access tactic. SOC analysts detect it by monitoring for XDR, SIEM events, behavioral anomalies, and the specific indicators described in this detection guide. Practice detection in SOCSimulator Operations.
Adversaries may search compromised systems to find and obtain insecurely stored credentials. These credentials can be stored and/or misplaced in many locations on a system, including plaintext files, configuration files, environment variables, shell history files, registry keys, and source code repositories. Unsecured credentials in configuration files are one of the most common sources of credential exposure in enterprise environments, as developers and system administrators frequently hard-code credentials into application configurations, deployment scripts, and infrastructure code. Source code repositories frequently contain commit history with credentials that were later removed from active code but remain accessible in the repository history. Environment variables, particularly in CI/CD pipelines and container environments, often contain sensitive credentials that can be enumerated by any process running in that context. The automation and scale of credential harvesting from these sources has been dramatically increased by tools that automatically scan for common credential patterns.
“Unsecured Credentials is documented as technique T1552 in the MITRE ATT&CK knowledge base under the Credential Access tactic. Detection requires visibility into XDR, SIEM telemetry.”
Detection Strategies
The following detection strategies help SOC analysts identify Unsecured Credentials activity. These methods apply across XDR, SIEM environments and can be implemented as detection rules, correlation queries, or behavioral analytics in your security platform.
1
Monitor for execution of tools and commands that search for credential patterns in files, including grep and findstr commands targeting keywords like password, passwd, secret, token, and api_key across file system paths.
2
Alert on access to CI/CD configuration files, Docker environment files, Kubernetes secrets, and cloud provider credential files from processes other than the legitimate application or administrator tools that normally access them.
3
Detect access to shell history files including ~/.bash_history, ~/.zsh_history, and PowerShell history files from processes that are not interactive shell sessions, as these may contain previously executed commands with credentials.
4
Monitor cloud environment credential files in default locations such as ~/.aws/credentials, ~/.azure/credentials, and service account key files, alerting on access from processes other than authorized cloud CLI tools.
5
Implement secrets scanning in source code repositories and alert on commits or repository access that retrieves files containing credential patterns, particularly access to repository history that may contain previously removed credentials.
Example Alerts
These realistic alert examples show what Unsecured Credentials looks like in your security tools. Use them to tune detection rules and train analysts to recognize true positives versus false positives in live environments.
HighXDR
Credential Search Pattern in Configuration Files
PowerShell command executed searching for credential patterns: Get-ChildItem -Recurse | Select-String -Pattern "password=|passwd=|pwd=" targeted at C:\inetpub\, C:\Program Files\, and shared network drives. The search returned 47 configuration files containing plaintext credentials for database connections, API services, and remote management interfaces. These credentials were subsequently accessed and compiled into a single file.
CriticalXDR
AWS Credentials File Accessed by Unexpected Process
Process access event detected: a non-AWS CLI process read the ~/.aws/credentials file on a developer workstation. The file contains access keys for multiple AWS environments including production. The accessing process subsequently made AWS API calls consistent with reconnaissance of the cloud environment. Hard-coded developer credentials with production access represent a significant exposure that can result in complete cloud environment compromise.
MediumSIEM
Database Password Found in Source Code Repository
Security scanning detected plaintext database connection string containing username and password committed to the internal GitLab repository in a configuration file 8 months ago. Although the credential was removed in a subsequent commit, the git history retains the plaintext password. The exposed credential provides access to the production database server. This finding requires immediate database credential rotation and audit of who has accessed the repository.
Practice Detecting Unsecured Credentials
SOCSimulator provides hands-on training rooms where you investigate real-world attack scenarios including Unsecured Credentials. Build detection skills with zero consequences — free forever.
SOC analysts detect Unsecured Credentials (T1552) by monitoring XDR, SIEM telemetry for behavioral anomalies and specific indicators. Key detection methods include monitor for execution of tools and commands that search for credential patterns in files, including grep and findstr commands targeting keywords like . SOCSimulator provides hands-on practice detecting this technique with realistic alerts.
What security tools are used to detect Unsecured Credentials?
Unsecured Credentials can be detected using XDR, SIEM platforms. XDR tools are particularly effective for this technique because they provide visibility into the credential access phase of the attack chain. SOCSimulator simulates all three tool types for hands-on training.
How common is Unsecured Credentials in real-world attacks?
Unsecured Credentials is a well-documented MITRE ATT&CK technique in the Credential Access tactic. It appears in threat intelligence reports from multiple security vendors and has been observed in campaigns by various threat actor groups. SOCSimulator includes realistic Unsecured Credentials scenarios based on documented attack patterns, helping analysts build detection intuition.
Can I practice detecting Unsecured Credentials for free?
Yes. SOCSimulator offers free forever access to training scenarios, including Credential Access techniques like Unsecured Credentials. You can investigate realistic alerts in guided Operations rooms, build detection skills with SIEM, XDR, and Firewall interfaces, and test yourself under pressure in Shift Mode. No credit card required.