Detection rules › YARA-L

LSASS Process Memory Dump Files

Severity
high
Type
Detection
Time window
5m
Match by
hostname
Source
github.com/chronicle/detection-rules

Detects creation of files with names used by different memory dumping tools to create a memory dump of the LSASS process memory, which contains user credentials

MITRE ATT&CK coverage

TacticTechniques
Credential AccessT1003.001 OS Credential Dumping: LSASS Memory

References

Event coverage

ProviderEventTitle
SysmonEvent ID 11FileCreate

Rule body yaral

/*
 * Copyright 2025 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

rule lsass_process_memory_dump_file_creation {

  meta:
    author = "Florian Roth (Nextron Systems)"
    description = "Detects creation of files with names used by different memory dumping tools to create a memory dump of the LSASS process memory, which contains user credentials"
    reference = "https://github.com/SigmaHQ/sigma/blob/master/rules/windows/file/file_event/file_event_win_lsass_default_dump_file_names.yml"
    license = "https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md"
    rule_name = "LSASS Process Memory Dump Files"
    sigma_uuid = "a5a2d357-1ab8-4675-a967-ef9990a59391"
    sigma_status = "test"
    rule_id = "mr_8fd8cb2b-18dc-468d-acdf-899da9f6de43"
    tactic = "TA0006"
    technique = "T1003.001"
    type = "Detection"
    data_source = "Sysmon"
    platform = "Windows"
    severity = "High"
    priority = "High"
    false_positives = "Unknown"

  events:
    $file.metadata.event_type = "FILE_CREATION"
    (
      re.regex($file.target.file.full_path, `\\(Andrew\.dmp|Coredump\.dmp|lsass\.dmp|lsass\.rar|lsass\.zip|NotLSASS\.zip|PPLBlade\.dmp|rustive\.dmp)\$`) nocase or
      strings.contains($file.target.file.full_path, "\\lsass_2") or
      strings.contains($file.target.file.full_path, "\\lsassdmp") or
      strings.contains($file.target.file.full_path, "\\lsassdump") or
      (
        strings.contains(strings.to_lower($file.target.file.full_path), "\\lsass") and
        re.regex($file.target.file.full_path, `\.dmp$`) nocase
      )
      or
      (
        strings.contains(strings.to_lower($file.target.file.full_path), "sqldmpr") and
        re.regex($file.target.file.full_path, `\.mdmp$`) nocase
      )
      or
      (
        (
          strings.contains(strings.to_lower($file.target.file.full_path), "\\nanodump") or
          strings.contains(strings.to_lower($file.target.file.full_path), "\\proc_")
        )
        and
        re.regex($file.target.file.full_path, `\.dmp$`) nocase
      )
    )
    $file.principal.hostname = $hostname

  match:
    $hostname over 5m

  outcome:
    //example usage of specifying test user and hostname to adjust risk score
    $risk_score = max(if($file.principal.user.userid = "user" and $file.principal.hostname = "hostname", 0, 15))
    $principal_hostname = array_distinct($file.principal.hostname)
    $principal_process_pid = array_distinct($file.principal.process.pid)
    $principal_process_command_line = array_distinct($file.principal.process.command_line)
    $principal_process_file_sha256 = array_distinct($file.principal.process.file.sha256)
    $principal_process_file_full_path = array_distinct($file.principal.process.file.full_path)
    $principal_process_product_specific_process_id = array_distinct($file.principal.process.product_specific_process_id)
    $principal_process_parent_process_product_specific_process_id = array_distinct($file.principal.process.parent_process.product_specific_process_id)
    $principal_user_userid = array_distinct($file.principal.user.userid)
    $target_file_sha256 = array_distinct($file.target.file.sha256)
    $target_file_full_path = array_distinct($file.target.file.full_path)

  condition:
    $file
}

Stages and Predicates

Stage 0: match + condition

match:
    $hostname over 5m
condition:
    $file

Fires when at least one $file event in the 5m window.

Stage 1: events: $file · FILE_CREATION

$file.metadata.event_type = "FILE_CREATION"
(
  re.regex($file.target.file.full_path, `\\(Andrew\.dmp|Coredump\.dmp|lsass\.dmp|lsass\.rar|lsass\.zip|NotLSASS\.zip|PPLBlade\.dmp|rustive\.dmp)\$`) nocase or
  strings.contains($file.target.file.full_path, "\\lsass_2") or
  strings.contains($file.target.file.full_path, "\\lsassdmp") or
  strings.contains($file.target.file.full_path, "\\lsassdump") or
  (
    strings.contains(strings.to_lower($file.target.file.full_path), "\\lsass") and
    re.regex($file.target.file.full_path, `\.dmp$`) nocase
  )
  or
  (
    strings.contains(strings.to_lower($file.target.file.full_path), "sqldmpr") and
    re.regex($file.target.file.full_path, `\.mdmp$`) nocase
  )
  or
  (
    (
      strings.contains(strings.to_lower($file.target.file.full_path), "\\nanodump") or
      strings.contains(strings.to_lower($file.target.file.full_path), "\\proc_")
    )
    and
    re.regex($file.target.file.full_path, `\.dmp$`) nocase
  )
)
$file.principal.hostname = $hostname

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
target.file.full_pathcontains
  • \\lsass transforms: tolower corpus 2 (chronicle 2)
  • \\lsass_2
  • \\lsassdmp
  • \\lsassdump
  • \\nanodump transforms: tolower
  • \\proc_ transforms: tolower
  • sqldmpr transforms: tolower corpus 2 (sigma 1, chronicle 1)
target.file.full_pathregex_match
  • .dmp$ transforms: nocase corpus 2 (chronicle 2)
  • .mdmp$ transforms: nocase
  • \(Andrew.dmp|Coredump.dmp|lsass.dmp|lsass.rar|lsass.zip|NotLSASS.zip|PPLBlade.dmp|rustive.dmp)$ transforms: nocase

Output fields

Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.

FieldSource
risk_scoremax(if($file.principal.user.userid = "user" and $file.principal.hostname = "hostname", 0, 15))
principal_hostnamearray_distinct($file.principal.hostname)
principal_process_pidarray_distinct($file.principal.process.pid)
principal_process_command_linearray_distinct($file.principal.process.command_line)
principal_process_file_sha256array_distinct($file.principal.process.file.sha256)
principal_process_file_full_patharray_distinct($file.principal.process.file.full_path)
principal_process_product_specific_process_idarray_distinct($file.principal.process.product_specific_process_id)
principal_process_parent_process_product_specific_process_idarray_distinct($file.principal.process.parent_process.product_specific_process_id)
principal_user_useridarray_distinct($file.principal.user.userid)
target_file_sha256array_distinct($file.target.file.sha256)
target_file_full_patharray_distinct($file.target.file.full_path)