lsass_process_memory_dump_file_creation
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
Query · yara_l
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