Detection: Windows Terminating Lsass Process

Description

The following analytic detects a process requesting PROCESS_TERMINATE access to Lsass.exe. It leverages Sysmon EventCode 10 and checks for access masks that combine PROCESS_TERMINATE (0x1).

1`sysmon`
2EventCode=10
3TargetImage="*\\lsass.exe"

PROCESS_TERMINATE is 0x1.

 1
 2| eval g_access_decimal = tonumber(replace(GrantedAccess,"0x",""),16)
 3
 4| eval PROCESS_TERMINATE = 1
 5
 6| eval terminate_set = bit_and(g_access_decimal, PROCESS_TERMINATE)
 7
 8| where terminate_set == PROCESS_TERMINATE
 9
10
11| stats count min(_time) as firstTime
12                max(_time) as lastTime
13    BY user_id dest
14       signature_id signature granted_access Opcode
15       SourceImage SourceProcessGUID SourceProcessId
16       TargetImage TargetProcessGUID TargetProcessId
17       CallTrace vendor_product
18
19
20| eval CallTrace=split(CallTrace, "
21|")
22
23
24| `security_content_ctime(firstTime)`
25
26| `security_content_ctime(lastTime)`
27
28| `windows_terminating_lsass_process_filter`

Data Source

Name Platform Sourcetype Source
Sysmon EventID 10 Windows icon Windows 'XmlWinEventLog' 'XmlWinEventLog:Microsoft-Windows-Sysmon/Operational'

Macros Used

Name Value
sysmon (source=WinEventLog:Microsoft-Windows-Sysmon/Operational OR source=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational OR source=Syslog:Linux-Sysmon/Operational)
windows_terminating_lsass_process_filter search *
windows_terminating_lsass_process_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Annotations

Default Configuration

This detection is configured by default in Splunk Enterprise Security to run with the following settings:

Setting Value
Disabled true
Cron Schedule 0 * * * *
Earliest Time -70m@m
Latest Time -10m@m
Schedule Window auto
Creates Finding (Notable) No
Creates Intermediate Finding (Risk Event) Yes
Anomaly detections generate Intermediate Findings (Risk Events). They do not generate a Finding (Notable) directly.

Implementation

This search requires Sysmon Logs and a Sysmon configuration, which includes EventCode 10 for lsass.exe. This search uses an input macro named sysmon. We strongly recommend that you specify your environment-specific configurations (index, source, sourcetype, etc.) for Windows Sysmon logs. Replace the macro definition with configurations for your Splunk environment. The search also uses a post-filter macro designed to filter out known false positives.

Known False Positives

No false positives have been identified at this time.

Associated Analytic Story

Intermediate Findings

Message Entity Field Entity Type Risk Score
A process [$SourceImage$] requested PROCESS_TERMINATE access [$granted_access$] to Lsass.exe on [$dest$]. dest system 20

Threat Objects

Field Type
TargetImage file_path

References

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation ✅ Passing N/A N/A N/A
Unit ✅ Passing Dataset XmlWinEventLog:Microsoft-Windows-Sysmon/Operational XmlWinEventLog
Integration ✅ Passing Dataset XmlWinEventLog:Microsoft-Windows-Sysmon/Operational XmlWinEventLog

Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range


Source: GitHub |

Version: 16