Files
splunk-security_content/detections/endpoint/linux_service_restarted.yml
2022-01-10 12:52:25 -08:00

77 lines
3.0 KiB
YAML

name: Linux Service Restarted
id: 084275ba-61b8-11ec-8d64-acde48001122
version: 1
date: '2021-12-20'
author: Teoderick Contreras, Splunk
type: Anomaly
datamodel:
- Endpoint
description: This analytic looks for restarted or re-enable services in linux platform.
This technique can be executed or performed using systemctl or service tool application.
Adversaries may create or modify Windows services to repeatedly execute malicious
payloads as part of persistence. When Windows boots up, it starts programs or applications
called services that perform background system functions. Administrator may also
create a legitimated service for a specific tool or normal application as part of
task or automation, in this scenario it is suggested to look for the service path
of the actual script or executable that register as service and who created the
service for further verification.
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time)
as lastTime from datamodel=Endpoint.Processes where (Processes.process_name IN ("systemctl",
"service") OR Processes.process IN ("*systemctl *", "*service *")) Processes.process
IN ("*restart*", "*reload*", "*reenable*") by Processes.dest Processes.user Processes.parent_process_name
Processes.process_name Processes.process Processes.process_id Processes.parent_process_id
Processes.process_guid | `drop_dm_object_name(Processes)` | `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` | `linux_service_restarted_filter`'
how_to_implement: To successfully implement this search, you need to be ingesting
logs with the process name, parent process, and commandline executions from your
endpoints. If you are using Sysmon, you can use the Add-on for Linux Sysmon from Splunkbase.
known_false_positives: Administrator or network operator can use this commandline
for automation purposes. Please update the filter macros to remove false positives.
references:
- https://attack.mitre.org/techniques/T1543/003/
tags:
analytic_story:
- Linux Privilege Escalation
- Linux Persistence Techniques
dataset:
- https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1053.006/service_systemd/sysmon_linux.log
kill_chain_phases:
- Privilege Escalation
mitre_attack_id:
- T1053.006
- T1053
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
required_fields:
- _time
- Processes.dest
- Processes.user
- Processes.parent_process_name
- Processes.process_name
- Processes.process
- Processes.process_id
- Processes.parent_process_id
security_domain: endpoint
impact: 50
confidence: 50
risk_score: 25
context:
- Source:Endpoint
- Stage:Privilege Escalation
- Stage:Persistence
message: A commandline $process$ that may create or start a service on $dest$
observable:
- name: dest
type: Hostname
role:
- Victim
nist:
- DE.CM
cis20:
- CIS 3
- CIS 5
- CIS 16
automated_detection_testing: passed