Detection rule
Lsass Memory Dump via Comsvcs DLL
Overview
Detects adversaries leveraging the MiniDump export function from comsvcs.dll via rundll32 to perform a memory dump from lsass.
- Rule id
a49fa4d5-11db-418c-8473-1e014a8dd462- ATT&CK techniques
- T1003.001 OS Credential Dumping: LSASS Memory
- Severity
- High
- Confidence
- Low
- Origin
- SigmaHQ (community)
- SigmaHQ status
test- Used in defense packs
- The Gentlemen, qilin, Akira, safepay, Play, nightspire
Validation
- ExperimentalSyntax checked only. Not yet tested on events.
- Test-data validatedMatched positive test events and ignored near-miss events. Not yet run in a production SIEM.
- SIEM-validatedRun in a real SIEM, with a recorded result.
1 of 1 positive test events matched; 2 of 2 near-miss events were correctly ignored. Community rule reused unmodified from SigmaHQ. OffSet7 converted it and tested it on synthetic events.
Detection logic and queries
Queries are shown exactly as generated. Test them in your environment before you deploy them.
Sigma
Sigma (YAML) · a49fa4d5-11db-418c-8473-1e014a8dd462
title: Lsass Memory Dump via Comsvcs DLL
id: a49fa4d5-11db-418c-8473-1e014a8dd462
status: test
description: Detects adversaries leveraging the MiniDump export function from comsvcs.dll via rundll32 to perform a memory dump from lsass.
references:
- https://twitter.com/shantanukhande/status/1229348874298388484
- https://modexp.wordpress.com/2019/08/30/minidumpwritedump-via-com-services-dll/
author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research)
date: 2020-10-20
modified: 2023-11-29
tags:
- attack.credential-access
- attack.t1003.001
logsource:
category: process_access
product: windows
detection:
selection:
TargetImage|endswith: '\lsass.exe'
SourceImage|endswith: '\rundll32.exe'
CallTrace|contains: 'comsvcs.dll'
condition: selection
falsepositives:
- Unknown
level: highQRadar AQL
IBM QRadar AQL (hunting query)Hunting query
Hunting search for the Log Activity tab or the API. It is not a QRadar rule.
AQL search for the Log Activity tab or the API. It is NOT a deployable QRadar rule: real-time detection in QRadar is a CRE (Custom Rule Engine) rule, for which this build only writes a design specification (qradar_cre).
SELECT * FROM events WHERE devicetype=12 AND LOWER("Target Process Path") LIKE '%\lsass.exe' AND LOWER("Source Process Path") LIKE '%\rundll32.exe' AND LOWER("Call Trace") LIKE '%comsvcs.dll%'QRadar CRE
Design for the QRadar Rule Wizard. It is not importable and has not been tested in QRadar.
- Rule name
OffSet7: Lsass Memory Dump via Comsvcs DLL- Rule type
- Event rule (Local)
- Log source types
- Microsoft Windows Security Event Log DSM: Sysmon EID 10 (process access)
Building blocks
BB:OffSet7:Lsass Memory Dump via Comsvcs DLL:selection(match)All test lines must match (AND).Target Process Pathends with:\lsass.exeSource Process Pathends with:\rundll32.exeCall Tracecontains:comsvcs.dll
Main rule, option A (building blocks)
- when the event(s) were detected by one or more of these log source types:
Microsoft Windows Security Event Log DSM: Sysmon EID 10 (process access) - when an event matches the condition built from these building blocks:
BB:OffSet7:Lsass Memory Dump via Comsvcs DLL:selection
Main rule, option B (AQL filter test)
- when the event matches this AQL filter query:
devicetype=12 AND LOWER("Target Process Path") LIKE '%\lsass.exe' AND LOWER("Source Process Path") LIKE '%\rundll32.exe' AND LOWER("Call Trace") LIKE '%comsvcs.dll%'
Rule response
- Severity 7, credibility 6, relevance 7
- Ensure the detected event is part of an offense; index offense on Log Source (host) and annotate with the rule title and OffSet7 rule id
- Respond no more than once per 30 minutes per Log Source (tune per environment)
Limitations
- QRadar AQL LIKE / CRE string tests are case-sensitive unless the property is lower-cased; the AQL option uses LOWER() where the backend applied it.
Splunk
Splunk SPLSearch
Search for Splunk with Windows/Sysmon field names. A scheduled search or ES correlation search also needs a schedule, time range, throttling and an adaptive response, set in your environment.
TargetImage="*\\lsass.exe" SourceImage="*\\rundll32.exe" CallTrace="*comsvcs.dll*"Splunk savedsearches.conf stanzaScheduled search template
Template stanza. Review schedule, alert actions and index/sourcetype for your environment before enabling.
[default]
dispatch.earliest_time = -30d
dispatch.latest_time = now
[Lsass Memory Dump via Comsvcs DLL]
description = Detects adversaries leveraging the MiniDump export function from comsvcs.dll via rundll32 to perform a memory dump from lsass.
search = TargetImage="*\\lsass.exe" SourceImage="*\\rundll32.exe" CallTrace="*comsvcs.dll*"Elastic
Elastic Lucene (ECS)Hunting query
Lucene query over ECS fields (Winlogbeat/Elastic Agent Windows mappings). A detection rule also needs an index pattern, schedule and actions.
winlog.event_data.TargetImage:*\\lsass.exe AND process.executable:*\\rundll32.exe AND winlog.event_data.CallTrace:*comsvcs.dll*Elastic EQL (ECS)Hunting query
EQL query over ECS fields. Usable in an Elastic Security EQL rule after review; index pattern and schedule are set per environment.
any where winlog.event_data.TargetImage:"*\\lsass.exe" and process.executable:"*\\rundll32.exe" and winlog.event_data.CallTrace:"*comsvcs.dll*"Elastic ES|QL (ECS)Hunting query
ES|QL query over ECS fields; the FROM clause uses * and must be narrowed to your indices.
from * metadata _id, _index, _version | where ends_with(winlog.event_data.TargetImage, "\\lsass.exe") and ends_with(process.executable, "\\rundll32.exe") and winlog.event_data.CallTrace like "*comsvcs.dll*"No working conversion: Microsoft Sentinel KQL (ASIM) (No ASIM parser/table for this log source in the stock pipeline (see native draft on the Event table where one exists).); Microsoft Defender XDR KQL (No documented Defender XDR table with these fields (DeviceEvents ActionTypes are only listed in the in-portal schema); not drafted.)
Required telemetry
- Log source
product: windows · category: process_access- Fields used
CallTraceSourceImageTargetImage
False positives
- Unknown
Investigation and response
No OffSet7 investigation guidance has been written for this rule yet. Start from the false positives above and the ATT&CK technique pages.
References
Author and attribution
- Author
- Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research)
- Source
- SigmaHQ ·
rules/windows/process_access/proc_access_win_lsass_dump_comsvcs_dll.yml - Upstream commit
9688134317a2- Licence
- Detection Rule License (DRL) 1.1
Version history
- Version 1Imported from SigmaHQ
- OffSet7 build · SigmaHQ
9688134317a2