mirror of
https://github.com/splunk/security_content
synced 2026-06-08 17:32:49 +00:00
89 lines
3.6 KiB
YAML
89 lines
3.6 KiB
YAML
name: Detect Prohibited Applications Spawning cmd exe
|
|
id: c10a18cb-fd80-4ffa-a844-25026e0a0c94
|
|
version: 3
|
|
date: '2022-03-01'
|
|
author: Ignacio Bermudez Corrales, Splunk
|
|
type: Anomaly
|
|
datamodel:
|
|
- Endpoint_Processes
|
|
description: The following analytic identifies parent processes, browsers, Windows
|
|
terminal applications, Office Products and Java spawning cmd.exe. By its very nature,
|
|
many applications spawn cmd.exe natively or built into macros. Much of this will
|
|
need to be tuned to further enhance the risk.
|
|
search: '| from read_ssa_enriched_events() | eval timestamp=parse_long(ucast(map_get(input_event,
|
|
"_time"), "string", null)) | eval process_name = ucast(map_get(input_event, "process_name"),
|
|
"string", null), parent_process_name = lower(ucast(input_event.parent_process_name,
|
|
"string", null)), cmd_line = lower(ucast(map_get(input_event, "process"),"string",
|
|
null)), dest_user_id=ucast(map_get(input_event, "dest_user_id"), "string", null),
|
|
dest_device_id=ucast(map_get(input_event, "dest_device_id"), "string", null), event_id=ucast(map_get(input_event,"event_id"),
|
|
"string", null) | where process_name="cmd.exe" | rex field=parent_process_name "(?<ParentBaseFileName>[^\\\\]+)$"
|
|
| where ParentBaseFileName="winword.exe" OR ParentBaseFileName="excel.exe" OR ParentBaseFileName="outlook.exe"
|
|
OR ParentBaseFileName="powerpnt.exe" OR ParentBaseFileName="visio.exe" OR ParentBaseFileName="mspub.exe"
|
|
OR ParentBaseFileName="acrobat.exe" OR ParentBaseFileName="acrord32.exe" OR ParentBaseFileName="iexplore.exe"
|
|
OR ParentBaseFileName="opera.exe" OR ParentBaseFileName="firefox.exe" OR (ParentBaseFileName="java.exe"
|
|
AND (parent_process_name IS NOT NULL AND match_regex(parent_process_name, /(?i)patch1-Hotfix1a/)=false))
|
|
OR ParentBaseFileName="powershell.exe" OR (ParentBaseFileName="chrome.exe" AND (cmd_line
|
|
IS NULL OR (cmd_line IS NOT NULL AND match_regex(cmd_line, /(?i)chrome-extension/)=false)))
|
|
| eval start_time=timestamp, end_time=timestamp, entities=mvappend(dest_device_id,
|
|
dest_user_id), body=create_map(["event_id", event_id, "process_name", process_name,
|
|
"parent_process_name", parent_process_name, "cmd_line", cmd_line, "ParentBaseFileName",
|
|
ParentBaseFileName]) | into write_ssa_detected_events()'
|
|
how_to_implement: In order to successfully implement this analytic, you will need
|
|
endpoint process data from a EDR product or Sysmon. This search has been modified
|
|
to process raw sysmon data from attack_range's nxlogs on DSP.
|
|
known_false_positives: There are circumstances where an application may legitimately
|
|
execute and interact with the Windows command-line interface.
|
|
references:
|
|
- https://attack.mitre.org/techniques/T1059/
|
|
tags:
|
|
analytic_story:
|
|
- Suspicious Command-Line Executions
|
|
- Insider Threat
|
|
cis20:
|
|
- CIS 8
|
|
confidence: 50
|
|
context:
|
|
- Source:Endpoint
|
|
- Stage:Defense Evasion
|
|
impact: 70
|
|
kill_chain_phases:
|
|
- Exploitation
|
|
message: An instance of $parent_process_name$ spawning $process_name$ was identified
|
|
on endpoint $dest_device_id$ by user $dest_user_id$, producing a suspicious event
|
|
that warrants investigating.
|
|
mitre_attack_id:
|
|
- T1059
|
|
nist:
|
|
- PR.PT
|
|
- DE.CM
|
|
observable:
|
|
- name: dest_user_id
|
|
type: User
|
|
role:
|
|
- Actor
|
|
- name: dest_device_id
|
|
type: Hostname
|
|
role:
|
|
- Victim
|
|
- name: parent_process_name
|
|
type: Process
|
|
role:
|
|
- Parent Process
|
|
- name: process_name
|
|
type: Process
|
|
role:
|
|
- Child Process
|
|
product:
|
|
- Splunk Behavioral Analytics
|
|
required_fields:
|
|
- process_name
|
|
- parent_process_name
|
|
- _time
|
|
- dest_device_id
|
|
- dest_user_id
|
|
- cmd_line
|
|
risk_score: 35
|
|
risk_severity: low
|
|
security_domain: endpoint
|
|
asset_type: Endpoint
|