Detection of Mimikatz Credential Dumping via PowerShell
This brief covers detection logic for identifying the use of the Mimikatz credential dumper within PowerShell scripts to extract sensitive Windows authentication material.
The Invoke-Mimikatz PowerShell script is a widely utilized post-exploitation tool designed to interact with the Windows Local Security Authority Subsystem Service (LSASS). By executing specialized memory-reading commands, the script enables attackers to extract plaintext credentials, Kerberos tickets, and digital certificates from memory. This technique is a cornerstone of credential access phases, allowing adversaries to escalate privileges or move laterally within a compromised network. Defenders should focus on Script Block Logging (Event ID 4104) to identify the execution of these specific function signatures and strings within the PowerShell runtime. While sometimes used by authorized penetration testers for security auditing, unauthorized execution of these commands is a strong indicator of an active credential theft attempt.
Attack Chain
- Attacker establishes an initial foothold on a Windows endpoint.
- Attacker loads a PowerShell environment to execute post-exploitation commands.
- Attacker imports or streams the Invoke-Mimikatz script into memory to avoid disk-based detection.
- Attacker executes specific memory manipulation commands such as 'sekurlsa::logonpasswords' or 'DumpCreds'.
- The script interfaces with LSASS to bypass security controls and scrape memory segments.
- Attacker exfiltrates the recovered credentials to an external command-and-control server.
- Attacker utilizes the stolen credentials to impersonate legitimate users or escalate privileges.
Impact
Successful execution of Mimikatz allows an adversary to obtain plaintext passwords, NTLM hashes, and Kerberos tickets for users currently logged into the system. This level of access grants the attacker the ability to maintain persistence, impersonate high-privilege accounts (such as Domain Admins), and perform lateral movement, often leading to full domain compromise and significant data exfiltration.
Recommendation
- Enable PowerShell Script Block Logging (Event ID 4104) across all Windows endpoints to capture script execution content.
- Deploy the provided Sigma rule to your SIEM to monitor for known Mimikatz command strings in PowerShell script blocks.
- Alert on any detected instances of 'sekurlsa::logonpasswords' or certificate dump functions.
- Conduct an immediate investigation if these commands are identified on high-value systems like domain controllers or workstations belonging to administrative personnel.
Immediate actions
Deploy the Sigma detection rule to monitor for credential dumping behavior.
Threat Hunt
Search historical Event ID 4104 logs for the identified command strings.
Data: PowerShell Operational logs
Detection coverage 1
Detect Mimikatz PowerShell Script Blocks
highDetects the execution of known Mimikatz credential dumping commands within PowerShell scripts.
Detection queries are available on the platform. Get full rules →