Mimikatz Memssp Log File Detected
Identifies the password log file from the default Mimikatz memssp module.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2020/08/31"
3integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "m365_defender"]
4maturity = "production"
5min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
6min_stack_version = "8.14.0"
7updated_date = "2024/10/15"
8
9[rule]
10author = ["Elastic"]
11description = "Identifies the password log file from the default Mimikatz memssp module."
12from = "now-9m"
13index = ["winlogbeat-*", "logs-endpoint.events.file-*", "logs-windows.sysmon_operational-*", "endgame-*", "logs-sentinel_one_cloud_funnel.*", "logs-m365_defender.event-*"]
14language = "eql"
15license = "Elastic License v2"
16name = "Mimikatz Memssp Log File Detected"
17note = """## Triage and analysis
18
19### Investigating Mimikatz Memssp Log File Detected
20
21[Mimikatz](https://github.com/gentilkiwi/mimikatz) is an open-source tool used to collect, decrypt, and/or use cached credentials. This tool is commonly abused by adversaries during the post-compromise stage where adversaries have gained an initial foothold on an endpoint and are looking to elevate privileges and seek out additional authentication objects such as tokens/hashes/credentials that can then be used to laterally move and pivot across a network.
22
23This rule looks for the creation of a file named `mimilsa.log`, which is generated when using the Mimikatz misc::memssp module, which injects a malicious Windows SSP to collect locally authenticated credentials, which includes the computer account password, running service credentials, and any accounts that logon.
24
25#### Possible investigation steps
26
27- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.
28- Investigate other alerts associated with the user/host during the past 48 hours.
29- Investigate potentially compromised accounts. Analysts can do this by searching for login events (e.g., 4624) to the target host.
30- Retrieve and inspect the log file contents.
31- Search for DLL files created in the same location as the log file, and retrieve unsigned DLLs.
32 - Use the PowerShell Get-FileHash cmdlet to get the SHA-256 hash value of these files.
33 - Search for the existence of these files in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.
34 - Identify the process that created the DLL using file creation events.
35
36### False positive analysis
37
38- This file name `mimilsa.log` should not legitimately be created.
39
40### Related rules
41
42- Mimikatz Powershell Module Activity - ac96ceb8-4399-4191-af1d-4feeac1f1f46
43
44### Response and remediation
45
46- Initiate the incident response process based on the outcome of the triage.
47- Isolate the involved hosts to prevent further post-compromise behavior.
48- If the host is a Domain Controller (DC):
49 - Activate your incident response plan for total Active Directory compromise.
50 - Review the privileges assigned to users that can access the DCs to ensure that the least privilege principle is being followed and reduce the attack surface.
51- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
52- Reboot the host to remove the injected SSP from memory.
53- Reimage the host operating system or restore compromised files to clean versions.
54- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
55- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
56- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
57"""
58references = ["https://www.elastic.co/security-labs/detect-credential-access"]
59risk_score = 73
60rule_id = "ebb200e8-adf0-43f8-a0bb-4ee5b5d852c6"
61setup = """## Setup
62
63If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
64events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
65Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
66`event.ingested` to @timestamp.
67For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
68"""
69severity = "high"
70tags = [
71 "Domain: Endpoint",
72 "OS: Windows",
73 "Use Case: Threat Detection",
74 "Tactic: Credential Access",
75 "Resources: Investigation Guide",
76 "Data Source: Elastic Endgame",
77 "Data Source: Elastic Defend",
78 "Data Source: Sysmon",
79 "Data Source: SentinelOne",
80 "Data Source: Microsoft Defender for Endpoint",
81]
82timestamp_override = "event.ingested"
83type = "eql"
84
85query = '''
86file where host.os.type == "windows" and file.name : "mimilsa.log" and process.name : "lsass.exe"
87'''
88
89
90[[rule.threat]]
91framework = "MITRE ATT&CK"
92[[rule.threat.technique]]
93id = "T1003"
94name = "OS Credential Dumping"
95reference = "https://attack.mitre.org/techniques/T1003/"
96
97
98[rule.threat.tactic]
99id = "TA0006"
100name = "Credential Access"
101reference = "https://attack.mitre.org/tactics/TA0006/"
Triage and analysis
Investigating Mimikatz Memssp Log File Detected
Mimikatz is an open-source tool used to collect, decrypt, and/or use cached credentials. This tool is commonly abused by adversaries during the post-compromise stage where adversaries have gained an initial foothold on an endpoint and are looking to elevate privileges and seek out additional authentication objects such as tokens/hashes/credentials that can then be used to laterally move and pivot across a network.
This rule looks for the creation of a file named mimilsa.log
, which is generated when using the Mimikatz misc::memssp module, which injects a malicious Windows SSP to collect locally authenticated credentials, which includes the computer account password, running service credentials, and any accounts that logon.
Possible investigation steps
- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.
- Investigate other alerts associated with the user/host during the past 48 hours.
- Investigate potentially compromised accounts. Analysts can do this by searching for login events (e.g., 4624) to the target host.
- Retrieve and inspect the log file contents.
- Search for DLL files created in the same location as the log file, and retrieve unsigned DLLs.
- Use the PowerShell Get-FileHash cmdlet to get the SHA-256 hash value of these files.
- Search for the existence of these files in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.
- Identify the process that created the DLL using file creation events.
- Use the PowerShell Get-FileHash cmdlet to get the SHA-256 hash value of these files.
False positive analysis
- This file name
mimilsa.log
should not legitimately be created.
Related rules
- Mimikatz Powershell Module Activity - ac96ceb8-4399-4191-af1d-4feeac1f1f46
Response and remediation
- Initiate the incident response process based on the outcome of the triage.
- Isolate the involved hosts to prevent further post-compromise behavior.
- If the host is a Domain Controller (DC):
- Activate your incident response plan for total Active Directory compromise.
- Review the privileges assigned to users that can access the DCs to ensure that the least privilege principle is being followed and reduce the attack surface.
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
- Reboot the host to remove the injected SSP from memory.
- Reimage the host operating system or restore compromised files to clean versions.
- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
References
Related rules
- LSASS Memory Dump Creation
- Adobe Hijack Persistence
- Code Signing Policy Modification Through Registry
- Command Shell Activity Started via RunDLL32
- Conhost Spawned By Suspicious Parent Process