T1003: OS Credential Dumping

Adversaries may attempt to dump credentials to obtain account login and credential material, normally in the form of a hash or a clear text password. Credentials can be obtained from OS caches, memory, or structures. Credentials can then be used to perform Lateral Movement and access restricted information.

Several of the tools mentioned in associated sub-techniques may be used by both adversaries and professional security testers. Additional custom tools likely exist as well.

Positive Technologies products that cover the technique

MaxPatrol SIEM knowledge base

mitre_attck_cred_access: PT-CR-911: Svchost_Memory_Dump: An svchost dump is generated mitre_attck_cred_access: PT-CR-2487: RdpStrike_Usage: Signs of the RdpStrike tool (the Cobalt Strike module) that dumps credentials from the mstsc.exe process memory in cleartext 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_lateral_movement: PT-CR-225: Creation_Suspicious_File: Creation of a potentially malicious file is detected hacking_tools: PT-CR-757: Internal_Monologue_Attack: A NetNTLM downgrade attack using Internal Monologue is detected microsoft_mecm: PT-CR-1860: MECM_SharpSCCM: Using SharpSCCM to search for sensitive information about MECM clients

Subtechniques

Detection

IDDS0017Data source and componentCommand: Command ExecutionDescription

Monitor executed commands and arguments that may attempt to dump credentials to obtain account login and credential material, normally in the form of a hash or a clear text password, from the operating system and software. Look for command-lines that invoke AuditD or the Security Accounts Manager (SAM). Remote access tools may contain built-in features or incorporate existing tools like Mimikatz. PowerShell scripts also exist that contain credential dumping functionality, such as PowerSploit's Invoke-Mimikatz module, which may require additional logging features to be configured in the operating system to collect necessary information for analysis.

IDDS0029Data source and componentNetwork Traffic: Network Traffic ContentDescription

Monitor and analyze traffic patterns and packet inspection associated to protocol(s) that do not follow the expected protocol standards and traffic flows (e.g extraneous packets that do not belong to established flows, gratuitous or anomalous traffic patterns, anomalous syntax, or structure). Consider correlation with process monitoring and command line to detect anomalous processes execution and command line arguments associated to traffic patterns (e.g. monitor anomalies in use of files that do not normally initiate connections for respective protocol(s)).

IDDS0029Data source and componentNetwork Traffic: Network Traffic FlowDescription

Monitor network data for uncommon data flows. Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious.

IDDS0024Data source and componentWindows Registry: Windows Registry Key AccessDescription

Monitor for the SAM registry key being accessed that may attempt to dump credentials to obtain account login and credential material, normally in the form of a hash or a clear text password, from the operating system and software.

IDDS0026Data source and componentActive Directory: Active Directory Object AccessDescription

Monitor domain controller logs for replication requests and other unscheduled activity possibly associated with DCSync. Note: Domain controllers may not log replication requests originating from the default domain controller account. . Monitor for replication requests from IPs not associated with known domain controllers.

Analytic 1 - Suspicious AD

source="*WinEventLog:Security" EventCode="4662" AND AccessMask= "0x100" AND (guid= “1131f6ad-9c07-11d1-f79f-00c04fc2dcd2” OR guid= “1131f6aa-9c07-11d1-f79f-00c04fc2dcd2” OR guid= “9923a32a-3607-11d2-b9be-0000f87a36b2” OR guid= “89e95b76-444d-4c62-991a-0facbeda640c“)
IDDS0022Data source and componentFile: File AccessDescription

Monitor for hash dumpers opening the Security Accounts Manager (SAM) on the local file system (%SystemRoot%/system32/config/SAM). Some hash dumpers will open the local file system as a device and parse to the SAM table to avoid file access defenses. Others will make an in-memory copy of the SAM table before reading hashes. Detection of compromised ( LinkById: T1078) in-use by adversaries may help as well.

IDDS0022Data source and componentFile: File CreationDescription

Monitor for the unexpected creation of memory dump files (e.g., lsass{*}.dmp) for processes that may contain credentials, such as LSASS.

IDDS0009Data source and componentProcess: OS API ExecutionDescription

Monitor for API calls that may attempt to dump credentials to obtain account login and credential material, normally in the form of a hash or a clear text password, from the operating system and software.

IDDS0009Data source and componentProcess: Process CreationDescription

Monitor for newly executed processes that may be indicative of credential dumping. On Windows 8.1 and Windows Server 2012 R2, monitor Windows Logs for LSASS.exe creation to verify that LSASS started as a protected process.

IDDS0009Data source and componentProcess: Process AccessDescription

Monitor for unexpected processes interacting with lsass.exe. Common credential dumpers such as Mimikatz access the LSA Subsystem Service (LSASS) process by opening the process, locating the LSA secrets key, and decrypting the sections in memory where credential details are stored. Credential dumpers may also use methods for reflective Process Injection to reduce potential indicators of malicious activity.

Linux

To obtain the passwords and hashes stored in memory, processes must open a maps file in the /proc filesystem for the process being analyzed. This file is stored under the path /proc/<pid>/maps, where the <pid> directory is the unique pid of the program being interrogated for such authentication data. The AuditD monitoring tool, which ships stock in many Linux distributions, can be used to watch for hostile processes opening this file in the proc file system, alerting on the pid, process name, and arguments of such programs.

Mitigation

IDM1015NameActive Directory ConfigurationDescription

Manage the access control list for “Replicating Directory Changes” and other permissions associated with domain controller replication. Consider adding users to the "Protected Users" Active Directory security group. This can help limit the caching of users' plaintext credentials.

IDM1017NameUser TrainingDescription

Limit credential overlap across accounts and systems by training users and administrators not to use the same password for multiple accounts.

IDM1025NamePrivileged Process IntegrityDescription

On Windows 8.1 and Windows Server 2012 R2, enable Protected Process Light for LSA.

IDM1026NamePrivileged Account ManagementDescription

Windows: Do not put user or admin domain accounts in the local administrator groups across systems unless they are tightly controlled, as this is often equivalent to having a local administrator account with the same password on all systems. Follow best practices for design and administration of an enterprise network to limit privileged account use across administrative tiers.

Linux: Scraping the passwords from memory requires root privileges. Follow best practices in restricting access to privileged accounts to avoid hostile programs from accessing such sensitive regions of memory.

IDM1027NamePassword PoliciesDescription

Ensure that local administrator accounts have complex, unique passwords across all systems on the network.

IDM1028NameOperating System ConfigurationDescription

Consider disabling or restricting NTLM. Consider disabling WDigest authentication.

IDM1040NameBehavior Prevention on EndpointDescription

On Windows 10, enable Attack Surface Reduction (ASR) rules to secure LSASS and prevent credential stealing.

IDM1041NameEncrypt Sensitive InformationDescription

Ensure Domain Controller backups are properly secured.

IDM1043NameCredential Access ProtectionDescription

With Windows 10, Microsoft implemented new protections called Credential Guard to protect the LSA secrets that can be used to obtain credentials through forms of credential dumping. It is not configured by default and has hardware and firmware system requirements. It also does not protect against all forms of credential dumping.