| ID | Technique | Tactic |
|---|---|---|
| T1036.003 | Rename Legitimate Utilities | Stealth |
Detection: Windows Renamed LOLBAS Binary was Executed
Description
The following analytic identifies a LOLBAS process being executed where it's process name does not match it's original file name attribute. Processes that have been renamed and executed may be an indicator that an adversary is attempting to evade defenses or execute malicious code. The LOLBAS project documents Windows native binaries that can be abused by threat actors to perform tasks like executing malicious code.
Search
1
2| tstats `security_content_summariesonly`
3 count min(_time) AS firstTime
4 max(_time) AS lastTime
5
6FROM datamodel=Endpoint.Processes WHERE
7
8[
9
10| inputlookup renamed_lolbas_binaries
11
12| rename original_file_name as Processes.original_file_name
13
14| table Processes.original_file_name
15]
16
17NOT Processes.process_name IN (
18 "excelcnv.exe",
19 "installutil64.exe",
20 "protoc~1.exe",
21 "regwrite.exe",
22 "vzshadow.exe"
23)
24
25by Processes.action Processes.dest Processes.original_file_name Processes.parent_process
26 Processes.parent_process_exec Processes.parent_process_guid Processes.parent_process_id
27 Processes.parent_process_name Processes.parent_process_path
28 Processes.process Processes.process_exec Processes.process_guid
29 Processes.process_hash Processes.process_id Processes.process_integrity_level
30 Processes.process_name Processes.process_path
31 Processes.user Processes.user_id Processes.vendor_product
32
33
34| `drop_dm_object_name(Processes)`
35
36
37| eval process_name_norm=replace(lower(process_name), "\.exe$", ""),
38 original_file_name_norm=replace(lower(original_file_name), "\.exe$", "")
39
40| where process_name_norm != original_file_name_norm
41
42
43| lookup local=t renamed_lolbas_binaries original_file_name OUTPUT description
44
45
46| `security_content_ctime(firstTime)`
47
48| `security_content_ctime(lastTime)`
49
50| `windows_renamed_lolbas_binary_was_executed_filter`
Data Source
| Name | Platform | Sourcetype | Source |
|---|---|---|---|
| Sysmon EventID 1 | 'XmlWinEventLog' |
'XmlWinEventLog:Microsoft-Windows-Sysmon/Operational' |
|
| CrowdStrike ProcessRollup2 | Other | 'crowdstrike:events:sensor' |
'crowdstrike' |
Macros Used
| Name | Value |
|---|---|
| security_content_ctime | convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$) |
| windows_renamed_lolbas_binary_was_executed_filter | search * |
windows_renamed_lolbas_binary_was_executed_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 |
Implementation
The detection is based on data that originates from Endpoint Detection and Response (EDR) agents. These agents
are designed to provide security-related telemetry from the endpoints where the agent is installed. To implement
this search, you must ingest logs that contain the process GUID, process name, and parent process. Additionally,
you must ingest complete command-line executions. These logs must be processed using the appropriate Splunk
Technology Add-ons that are specific to the EDR product. The logs must also be mapped to the Processes node
of the Endpoint data model. Use the Splunk Common Information Model (CIM) to normalize the field names and
speed up the data modeling process.
Known False Positives
3rd party software binaries sharing the same name as LOLBAS utilities may trigger false positives.
Associated Analytic Story
Intermediate Findings
| Message | Entity Field | Entity Type | Risk Score |
|---|---|---|---|
| LOLBAS utility [$original_file_name$] was renamed as [$process_path$] and later executed on [$dest$] | dest | system | 20 |
Threat Objects
| Field | Type |
|---|---|
| process_path | 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: 1