Common Information
Type Value
Value
Credential Dumping - T1003
Category Attack-Pattern
Type Mitre-Enterprise-Attack-Attack-Pattern
Misp Type Cluster
Description Credential dumping is the process of obtaining account login and password information, normally in the form of a hash or a clear text password, from the operating system and software. Credentials can then be used to perform Lateral Movement and access restricted information. Several of the tools mentioned in this technique may be used by both adversaries and professional security testers. Additional custom tools likely exist as well. ===SAM (Security Accounts Manager)=== The SAM is a database file that contains local accounts for the host, typically those found with the ‘net user’ command. To enumerate the SAM database, system level access is required.   A number of tools can be used to retrieve the SAM file through in-memory techniques: * pwdumpx.exe * gsecdump * Mimikatz * secretsdump.py Alternatively, the SAM can be extracted from the Registry with Reg: * <code>reg save HKLM\sam sam</code> * <code>reg save HKLM\system system</code> Creddump7 can then be used to process the SAM database locally to retrieve hashes. (Citation: GitHub Creddump7) Notes: Rid 500 account is the local, in-built administrator. Rid 501 is the guest account. User accounts start with a RID of 1,000+. ===Cached Credentials=== The DCC2 (Domain Cached Credentials version 2) hash, used by Windows Vista and newer caches credentials when the domain controller is unavailable. The number of default cached credentials varies, and this number can be altered per system. This hash does not allow pass-the-hash style attacks.   A number of tools can be used to retrieve the SAM file through in-memory techniques. * pwdumpx.exe * gsecdump * Mimikatz Alternatively, reg.exe can be used to extract from the Registry and Creddump7 used to gather the credentials. Notes: Cached credentials for Windows Vista are derived using PBKDF2. ===Local Security Authority (LSA) Secrets=== With SYSTEM access to a host, the LSA secrets often allows trivial access from a local account to domain-based account credentials. The Registry is used to store the LSA secrets.   When services are run under the context of local or domain users, their passwords are stored in the Registry. If auto-logon is enabled, this information will be stored in the Registry as well.   A number of tools can be used to retrieve the SAM file through in-memory techniques. * pwdumpx.exe * gsecdump * Mimikatz * secretsdump.py Alternatively, reg.exe can be used to extract from the Registry and Creddump7 used to gather the credentials. Notes: The passwords extracted by his mechanism are UTF-16 encoded, which means that they are returned in plaintext. Windows 10 adds protections for LSA Secrets described in Mitigation. ===NTDS from Domain Controller=== Active Directory stores information about members of the domain including devices and users to verify credentials and define access rights. The Active Directory domain database is stored in the NTDS.dit file. By default the NTDS file will be located in %SystemRoot%\NTDS\Ntds.dit of a domain controller. (Citation: Wikipedia Active Directory) The following tools and techniques can be used to enumerate the NTDS file and the contents of the entire Active Directory hashes.   * Volume Shadow Copy * secretsdump.py * Using the in-built Windows tool, ntdsutil.exe * Invoke-NinjaCopy ===Group Policy Preference (GPP) Files=== Group Policy Preferences (GPP) are tools that allowed administrators to create domain policies with embedded credentials. These policies, amongst other things, allow administrators to set local accounts.   These group policies are stored in SYSVOL on a domain controller, this means that any domain user can view the SYSVOL share and decrypt the password (the AES private key was leaked on-line. (Citation: Microsoft GPP Key) (Citation: SRD GPP)   The following tools and scripts can be used to gather and decrypt the password file from Group Policy Preference XML files:   * Metasploit’s post exploitation module: "post/windows/gather/credentials/gpp" * Get-GPPPassword (Citation: Obscuresecurity Get-GPPPassword) * gpprefdecrypt.py   Notes: On the SYSVOL share, the following can be used to enumerate potential XML files. dir /s *.xml ===Service Principle Names (SPNs)=== See Kerberoasting. ===Plaintext Credentials=== After a user logs on to a system, a variety of credentials are generated and stored in the Local Security Authority Subsystem Service (LSASS) process in memory. These credentials can be harvested by a administrative user or SYSTEM.   SSPI (Security Support Provider Interface) functions as a common interface to several Security Support Providers (SSPs): A Security Support Provider is a dynamic-link library (DLL) that makes one or more security packages available to applications. The following SSPs can be used to access credentials:   Msv: Interactive logons, batch logons, and service logons are done through the MSV authentication package. Wdigest: The Digest Authentication protocol is designed for use with Hypertext Transfer Protocol (HTTP) and Simple Authentication Security Layer (SASL) exchanges. (Citation: TechNet Blogs Credential Protection) Kerberos: Preferred for mutual client-server domain authentication in Windows 2000 and later. CredSSP:  Provides SSO and Network Level Authentication for Remote Desktop Services. (Citation: Microsoft CredSSP)   The following tools can be used to enumerate credentials:   * Windows Credential Editor * Mimikatz   As well as in-memory techniques, the LSASS process memory can be dumped from the target host and analyzed on a local system.   For example, on the target host use procdump: * <code>procdump -ma lsass.exe lsass_dump</code>   Locally, mimikatz can be run: * <code>sekurlsa::Minidump lsassdump.dmp</code> * <code>sekurlsa::logonPasswords</code> ===DCSync=== DCSync is a variation on credential dumping which can be used to acquire sensitive information from a domain controller. Rather than executing recognizable malicious code, the action works by abusing the domain controller's application programming interface (API) (Citation: Microsoft DRSR Dec 2017) (Citation: Microsoft GetNCCChanges) (Citation: Samba DRSUAPI) (Citation: Wine API samlib.dll) to simulate the replication process from a remote domain controller. Any members of the Administrators, Domain Admins, Enterprise Admin groups or computer accounts on the domain controller are able to run DCSync to pull password data (Citation: ADSecurity Mimikatz DCSync) from Active Directory, which may include current and historical hashes of potentially useful accounts such as KRBTGT and Administrators. The hashes can then in turn be used to create a Golden Ticket for use in Pass the Ticket (Citation: Harmj0y Mimikatz and DCSync) or change an account's password as noted in Account Manipulation. (Citation: InsiderThreat ChangeNTLM July 2017) DCSync functionality has been included in the "lsadump" module in Mimikatz. (Citation: GitHub Mimikatz lsadump Module) Lsadump also includes NetSync, which performs DCSync over a legacy replication protocol. (Citation: Microsoft NRPC Dec 2017) Detection: 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. Hash dumpers open the Security Accounts Manager (SAM) on the local file system (%SystemRoot%/system32/config/SAM) or create a dump of the Registry SAM key to access stored account password hashes. 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 Valid Accounts in-use by adversaries may help as well. 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. Monitor processes and command-line arguments for program execution that may be indicative of credential dumping. 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, (Citation: Powersploit) which may require additional logging features to be configured in the operating system to collect necessary information for analysis. Monitor domain controller logs for replication requests and other unscheduled activity possibly associated with DCSync. (Citation: Microsoft DRSR Dec 2017) (Citation: Microsoft GetNCCChanges) (Citation: Samba DRSUAPI) Note: Domain controllers may not log replication requests originating from the default domain controller account. (Citation: Harmj0y DCSync Sept 2015). Also monitor for network protocols (Citation: Microsoft DRSR Dec 2017) (Citation: Microsoft NRPC Dec 2017) and other replication requests (Citation: Microsoft SAMR) from IPs not associated with known domain controllers. (Citation: AdSecurity DCSync Sept 2015) Platforms: Windows Data Sources: API monitoring, Process command-line parameters, Process monitoring, PowerShell logs Permissions Required: Administrator, SYSTEM Contributors: Vincent Le Toux, Ed Williams, Trustwave, SpiderLabs
Details Published Attributes CTI Title
Details Website 2024-09-13 0 Simulating the RansomHub Ransomware: A Vital Exercise for Strengthening Detection and Response
Details Website 2024-09-12 13 Emulating the Persistent and Stealthy Ebury Linux Malware
Details Website 2024-09-10 56 Ransomware in the Cloud: Scattered Spider Targeting Insurance and Financial Industries
Details Website 2024-09-10 65 DragonRank, a Chinese-speaking SEO manipulator service provider
Details Website 2024-09-09 0 TIDRONE Espionage Group Targets Taiwan Drone Makers in Cyber Campaign
Details Website 2024-09-09 3 TIDRONE APT targets drone manufacturers in Taiwan
Details Website 2024-09-09 0 TIDRONE Espionage Group Targets Taiwan Drone Makers in Cyber Campaign - RedPacket Security
Details Website 2024-09-09 0 'TIDrone' Cyberattackers Target Taiwan's Drone Manufacturers
Details Website 2024-09-08 1 🔍Day 8: Understanding Sysmon for Enhanced Endpoint Visibility 🚀
Details Website 2024-09-08 114 深入剖析针对中国用户的攻击活动(判断为Hvv样本被捕获了,红队速来认领) | CTF导航
Details Website 2024-09-06 58 CISA Alert AA24-249A: Russian GRU Unit 29155 Targeting U.S. and Global Critical Infrastructure
Details Website 2024-09-06 3 MITRE TryHackme Write-Up
Details Website 2024-09-06 32 TIDRONE Targets Military and Satellite Industries in Taiwan
Details Website 2024-09-05 396 Russian Military Cyber Actors Target US and Global Critical Infrastructure | CISA
Details Website 2024-09-04 2 CAMO Unveiled: How Cybercriminals Exploit Legitimate Software for Stealthy Attacks - ReliaQuest
Details Website 2024-09-04 71 AZORult Malware: Technical Analysis - ANY.RUN's Cybersecurity Blog
Details Website 2024-09-03 46 Most interesting IR cases in 2023: insider threats and more
Details Website 2024-09-03 7 RansomHub 勒索软件集团在多个关键领域攻击 210 名受害者-安全客 - 安全资讯平台
Details Website 2024-09-02 7 RansomHub Ransomware Group Targets 210 Victims Across Critical Sectors
Details Website 2024-09-02 9 [LetsDefend Write-up] Log Analysis With Sysmon
Details Website 2024-09-02 7 RansomHub Ransomware Group Targets 210 Victims Across Critical Sectors - RedPacket Security
Details Website 2024-08-30 97 From Cobalt Strike to Mimikatz: A Deep Dive into the SLOW#TEMPEST Campaign Targeting Chinese Users
Details Website 2024-08-29 269 #StopRansomware: RansomHub Ransomware | CISA
Details Website 2024-08-22 1 Service Account Abuse - ReliaQuest
Details Website 2024-08-20 7 Exploring Impacket Abuse - ReliaQuest