T1552: Unsecured Credentials

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 (e.g. Bash History), operating system or application-specific repositories (e.g. Credentials in Registry), or other specialized files/artifacts (e.g. Private Keys).

Positive Technologies products that cover the technique

MaxPatrol SIEM knowledge base

clickhouse: PT-CR-1572: ClickHouse_Disable_User_Password: An attempt to disable a user account password is detected clickhouse: PT-CR-1582: ClickHouse_Modify_Password_To_Plaintext: An attempt to change the password of a user to an unencrypted password is detected clickhouse: PT-CR-1581: ClickHouse_Create_User_Without_Password: An attempt to create a user without a password is detected clickhouse: PT-CR-1574: ClickHouse_Create_User_With_Plaintext_Password: An attempt to create a user with an unencrypted password is detected mitre_attck_cred_access: PT-CR-299: LAPS_Enumeration: Search for users, groups, and computers with access to Microsoft LAPS (Local Administrator Password Solution). LAPS automatically manages the local administrator account password and backs up this password on devices connected to Active Directory services. mitre_attck_cred_access: PT-CR-911: Svchost_Memory_Dump: An svchost dump is generated mitre_attck_cred_access: PT-CR-768: Intercept_Creds_From_MSTSC: Unloading of credentials used in mstsc.exe during an RDP connection is detected mitre_attck_cred_access: PT-CR-898: Access_To_Files_Containing_Passwords: Access to files that can contain credentials indeed_pam: PT-CR-2888: Indeed_Credentials_Check_After_Policy_Change: User or application credentials were viewed after a policy parameter was changed in the Indeed PAM application enterprise_1c_and_bitrix: PT-CR-673: Enterprise_1C_Disable_User_Password_In_Authentication: A user password in a 1C system was disabled enterprise_1c_and_bitrix: PT-CR-672: Enterprise_1C_Create_User_Without_Password: A user account without a password was created

Subtechniques

Expert Required. The technique is detected only with the combination of «PT Product + Expert»

Detection

IDDS0017Data source and componentCommand: Command ExecutionDescription

While detecting adversaries accessing credentials may be difficult without knowing they exist in the environment, it may be possible to detect adversary use of credentials they have obtained. Monitor the command-line arguments of executing processes for suspicious words or regular expressions that may indicate searching for a password (for example: password, pwd, login, secure, or credentials). See Valid Accounts for more information.

IDDS0002Data source and componentUser Account: User Account AuthenticationDescription

Monitor for an attempt by a user to gain access to a network or computing resource, often by providing credentials that may search compromised systems to find and obtain insecurely stored credentials.

IDDS0024Data source and componentWindows Registry: Windows Registry Key AccessDescription

Monitor for unexpected windows registry key being accessed that may search compromised systems to find and obtain insecurely stored credentials.

IDDS0015Data source and componentApplication Log: Application Log ContentDescription

Monitor application logs for activity that may highlight malicious attempts to access application data, especially abnormal search activity targeting passwords and other artifacts related to credentials.

IDDS0022Data source and componentFile: File AccessDescription

Monitor for suspicious file access activity, specifically indications that a process is reading multiple files in a short amount of time and/or using command-line arguments indicative of searching for credential material (ex: regex patterns). These may be indicators of automated/scripted credential access behavior. Monitoring when the user's .bash_history is read can help alert to suspicious activity. While users do typically rely on their history of commands, they often access this history through other utilities like "history" instead of commands like cat ~/.bash_history.

IDDS0009Data source and componentProcess: Process CreationDescription

Monitor newly executed processes that may search compromised systems to find and obtain insecurely stored credentials.

Mitigation

IDM1015NameActive Directory ConfigurationDescription

Remove vulnerable Group Policy Preferences.

IDM1017NameUser TrainingDescription

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.

IDM1022NameRestrict File and Directory PermissionsDescription

Restrict file shares to specific directories with access only to necessary users.

IDM1026NamePrivileged Account ManagementDescription

If it is necessary that software must store credentials in the Registry, then ensure the associated accounts have limited permissions so they cannot be abused if obtained by an adversary.

IDM1027NamePassword PoliciesDescription

Use strong passphrases for private keys to make cracking difficult. Do not store credentials within the Registry. Establish an organizational policy that prohibits password storage in files.

IDM1028NameOperating System ConfigurationDescription

There are multiple methods of preventing a user's command history from being flushed to their .bash_history file, including use of the following commands: set +o history and set -o history to start logging again; unset HISTFILE being added to a user's .bash_rc file; and ln -s /dev/null ~/.bash_history to write commands to /dev/nullinstead.

IDM1035NameLimit Access to Resource Over NetworkDescription

Limit network access to sensitive services, such as the Instance Metadata API.

IDM1037NameFilter Network TrafficDescription

Limit access to the Instance Metadata API. A properly configured Web Application Firewall (WAF) may help prevent external adversaries from exploiting Server-side Request Forgery (SSRF) attacks that allow access to the Cloud Instance Metadata API.

IDM1041NameEncrypt Sensitive InformationDescription

When possible, store keys on separate cryptographic hardware instead of on the local system.

IDM1047NameAuditDescription

Preemptively search for files containing passwords or other credentials and take actions to reduce the exposure risk when found.

IDM1051NameUpdate SoftwareDescription

Apply patch KB2962486 which prevents credentials from being stored in GPPs.