T1552.001 Credentials In Files
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.
|T1552.001, T1552.002, T1552.003, T1552.004, T1552.005, T1552.006, T1552.007, T1552.008
|Containers, IaaS, Linux, Windows, macOS
|Administrator, SYSTEM, User
|04 February 2020
|30 March 2023
|AADInternals can gather unsecured credentials for Azure AD services, such as Azure AD Connect, from a local machine.
|Agent Tesla has the ability to extract credentials from configuration or support files.
|APT3 has a tool that can locate credentials in files on the file system such as those from Firefox or Chrome.
|APT33 has used a variety of publicly available tools like LaZagne to gather credentials.
|Azorult can steal credentials in files belonging to common software such as Skype, Telegram, and Steam.
|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.
|Emotet has been observed leveraging a module that retrieves passwords stored on a system for the current logged-on user.
|Empire can use various modules to search for files containing passwords.
|Fox Kitten has accessed files to gain valid credentials.
|Hildegard has searched for SSH keys, Docker credentials, and Kubernetes service tokens.
|jRAT can capture passwords from common chat applications such as MSN Messenger, AOL, Instant Messenger, and and Google Talk.
|Kimsuky has used tools that are capable of obtaining credentials from saved mail.
|LaZagne can obtain credentials from chats, databases, mail, and WiFi.
|Leafminer used several tools for retrieving login and password information, including LaZagne.
|MuddyWater has run a tool that steals passwords saved in victim email.
|OilRig has used credential dumping tools such as LaZagne to steal credentials to accounts logged into the compromised system and to Outlook Web Access.
|If an initial connectivity check fails, pngdowner attempts to extract proxy details and credentials from Windows Protected Storage and from the IE Credentials Store. This allows the adversary to use the proxy credentials for subsequent requests if they enable outbound HTTP access.
|PoshC2 contains modules for searching for passwords in local and remote files.
|Pupy can use Lazagne for harvesting credentials.
|Pysa has extracted credentials from the password database before encrypting the files.
|QuasarRAT can obtain passwords from FTP clients.
|Smoke Loader searches for files named logins.json to parse for credentials.
|TA505 has used malware to gather credentials from FTP clients and Outlook.
|TeamTNT has searched for unsecured AWS credentials and Docker API credentials.
|TrickBot can obtain passwords stored in files from several applications such as Outlook, Filezilla, OpenSSH, OpenVPN and WinSCP. Additionally, it searches for the “.vnc.lnk” affix to steal VNC credentials.
|XTunnel is capable of accessing locally stored passwords on victims.
|Preemptively search for files containing passwords and take actions to reduce the exposure risk when found.
|Establish an organizational policy that prohibits password storage in files.
|Restrict File and Directory Permissions
|Restrict file shares to specific directories with access only to necessary users.
|Ensure that developers and system administrators are aware of the risk associated with having plaintext passwords in software configuration files that may be left on endpoint systems or servers.