Potential Credential Access via DuplicateHandle in LSASS

Identifies suspicious access to an LSASS handle via DuplicateHandle from an unknown call trace module. This may indicate an attempt to bypass the NtOpenProcess API to evade detection and dump LSASS memory for credential access.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2021/09/27"
 3integration = ["windows"]
 4maturity = "production"
 5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 6min_stack_version = "8.3.0"
 7updated_date = "2023/02/22"
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Identifies suspicious access to an LSASS handle via DuplicateHandle from an unknown call trace module. This may indicate
13an attempt to bypass the NtOpenProcess API to evade detection and dump LSASS memory for credential access.
14"""
15from = "now-9m"
16index = ["winlogbeat-*", "logs-windows.*"]
17language = "eql"
18license = "Elastic License v2"
19name = "Potential Credential Access via DuplicateHandle in LSASS"
20note = """## Setup
21
22If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.
23"""
24references = ["https://github.com/CCob/MirrorDump"]
25risk_score = 47
26rule_id = "02a4576a-7480-4284-9327-548a806b5e48"
27severity = "medium"
28tags = ["Elastic", "Host", "Windows", "Threat Detection", "Credential Access", "Sysmon Only"]
29timestamp_override = "event.ingested"
30type = "eql"
31
32query = '''
33process where host.os.type == "windows" and event.code == "10" and
34
35 /* LSASS requesting DuplicateHandle access right to another process */
36 process.name : "lsass.exe" and winlog.event_data.GrantedAccess == "0x40" and
37
38 /* call is coming from an unknown executable region */
39 winlog.event_data.CallTrace : "*UNKNOWN*"
40'''
41
42
43[[rule.threat]]
44framework = "MITRE ATT&CK"
45[[rule.threat.technique]]
46id = "T1003"
47name = "OS Credential Dumping"
48reference = "https://attack.mitre.org/techniques/T1003/"
49[[rule.threat.technique.subtechnique]]
50id = "T1003.001"
51name = "LSASS Memory"
52reference = "https://attack.mitre.org/techniques/T1003/001/"
53
54
55
56[rule.threat.tactic]
57id = "TA0006"
58name = "Credential Access"
59reference = "https://attack.mitre.org/tactics/TA0006/"

Setup

If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define event.ingested and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate event.ingested to @timestamp for this rule to work.

to-top