Credentials In Files

T1552.001

Sub-technique of T1552 Unsecured Credentials.View on attack.mitre.org

About this technique

Adversaries may search local file systems and remote file shares for files containing insecurely stored credentials. These can be files created by users to store their own credentials, shared credential stores for a group of individuals, configuration files containing passwords for a system or service, or source code/binary files containing embedded passwords.

It is possible to extract passwords from backups or saved virtual machines through OS Credential Dumping. Passwords may also be obtained from Group Policy Preferences stored on the Windows Domain Controller.

In cloud and/or containerized environments, authenticated user and service account credentials are often stored in local configuration and credential files. They may also be found as parameters to deployment commands in container logs. In some cases, these files can be copied and reused on another machine or the contents can be read and then used to authenticate without needing to copy any files.

Detection rules27

Rules on DetectionCode tagged with T1552.001.

Sigma20

RuleLevelLog source
Copy Passwd Or Shadow From TMP Pathhighlinux / process_creation
Credentials In Fileshighmacos / process_creation
Credentials In Files - Linuxhighlinux / NULL
HackTool - Typical HiveNightmare SAM File Exporthighwindows / file_event
HackTool - WinPwn Executionhighwindows / process_creation
HackTool - WinPwn Execution - ScriptBlockhighwindows / ps_script
Linux Recon Indicatorshighlinux / process_creation
Automated Collection Command Promptmediumwindows / process_creation
Azure Key Vault Modified or Deletedmediumazure / NULL
Azure Keyvault Key Modified or Deletedmediumazure / NULL
Azure Keyvault Secrets Modified or Deletedmediumazure / NULL
Extracting Information with PowerShellmediumwindows / ps_script
Hidden Flag Set On File/Directory Via Chflags - MacOSmediummacos / process_creation
Potential PowerShell Console History Access Attempt via History Filemediumwindows / process_creation
Potentially Suspicious JWT Token Search Via CLImediumwindows / process_creation

Splunk7

RuleTypeRiskData source
MCP Github Suspicious OperationHuntingNULLMCP Server
MCP Sensitive System File SearchHuntingNULLMCP Server
Potential password in usernameHuntingNULLLinux Secure
Shai-Hulud 2 Exfiltration Artifact FilesTTPNULLSysmon for Linux EventID 11, Sysmon EventID 11
Windows Unusual FileZilla XML Config AccessAnomalyNULLWindows Event Log Security 4663
Windows Unusual Intelliform Storage Registry AccessAnomalyNULLWindows Event Log Security 4663
Windows WinSCP Configuration Security AccessAnomalyNULLWindows Event Log Security 4663

Groups15

Software23

Campaigns3

Procedure examples41

Groups15

Used byProcedure example
GroupAPT3

APT3 has a tool that can locate credentials in files on the file system such as those from Firefox or Chrome.

GroupAPT33

APT33 has used a variety of publicly available tools like LaZagne to gather credentials.

GroupEmber Bear

Ember Bear has dumped configuration settings in accessed IP cameras including plaintext credentials.

GroupFIN13

FIN13 has obtained administrative credentials by browsing through local files on a compromised machine.

GroupFox Kitten

Fox Kitten has accessed files to gain valid credentials.

GroupIndrik Spider

Indrik Spider has searched files to obtain and exfiltrate credentials.

GroupKimsuky

Kimsuky has used tools that are capable of obtaining credentials from saved mail.

GroupLeafminer

Leafminer used several tools for retrieving login and password information, including LaZagne.

View all 15 groups examples

Software23

Used byProcedure example
ToolAADInternals

AADInternals can gather unsecured credentials for Azure AD services, such as Azure AD Connect, from a local machine.

MalwareAgent Tesla

Agent Tesla has the ability to extract credentials from configuration or support files.

MalwareAzorult

Azorult can steal credentials in files belonging to common software such as Skype, Telegram, and Steam.

MalwareBlackEnergy

BlackEnergy has used a plug-in to gather credentials stored in files on the host by various software programs, including The Bat! email client, Outlook, and Windows Credential Store.

MalwareEmotet

Emotet has been observed leveraging a module that retrieves passwords stored on a system for the current logged-on user.

ToolEmpire

Empire can use various modules to search for files containing passwords.

MalwareHildegard

Hildegard has searched for SSH keys, Docker credentials, and Kubernetes service tokens.

MalwarejRAT

jRAT can capture passwords from common chat applications such as MSN Messenger, AOL, Instant Messenger, and and Google Talk.

View all 23 software examples

Campaigns3

Used byProcedure example
CampaignAnthropic AI-orchestrated Campaign

During the Anthropic AI-orchestrated Campaign, the adversary used Claude Code to extract authentication certificates stored in system configuration files across compromised environments.

CampaignLeviathan Australian Intrusions

Leviathan gathered credentials stored in files related to Building Management System (BMS) operations during Leviathan Australian Intrusions.

CampaignSharePoint ToolShell Exploitation

During SharePoint ToolShell Exploitation, threat actors accessed web.config and machine.config to extract MachineKey values, enabling them to forge legitimate VIEWSTATE tokens for future deserialization payloads.

References5

  1. CG 2014 Open source
    CG. (2014, May 20). Mimikatz Against Virtual Machine Memory Part 1. Retrieved November 12, 2014.
  2. SRD GPP Open source
    Security Research and Defense. (2014, May 13). MS14-025: An Update for Group Policy Preferences. Retrieved January 28, 2015.
  3. Specter Ops - Cloud Credential Storage Open source
    Maddalena, C.. (2018, September 12). Head in the Clouds. Retrieved October 4, 2019.
  4. Unit 42 Hildegard Malware Open source
    Chen, J. et al. (2021, February 3). Hildegard: New TeamTNT Cryptojacking Malware Targeting Kubernetes. Retrieved April 5, 2021.
  5. Unit 42 Unsecured Docker Daemons Open source
    Chen, J.. (2020, January 29). Attacker's Tactics and Techniques in Unsecured Docker Daemons Revealed. Retrieved March 31, 2021.

Data from MITRE ATT&CK® (Enterprise). ATT&CK® is a registered trademark of The MITRE Corporation.