Files
splunk-security_content/detections/endpoint/linux_service_started_or_enabled.yml
2022-03-09 14:43:09 +01:00

79 lines
3.0 KiB
YAML

name: Linux Service Started Or Enabled
id: e0428212-61b7-11ec-88a3-acde48001122
version: 1
date: '2021-12-20'
author: Teoderick Contreras, Splunk
type: Anomaly
datamodel:
- Endpoint
description: This analytic looks for created or 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 ("* start *", "* enable *") 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_started_or_enabled_filter`'
how_to_implement: To successfully implement this search, you need to be ingesting
logs with the process name, parent process, and command-line 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
automated_detection_testing: passed
cis20:
- CIS 3
- CIS 5
- CIS 16
confidence: 70
context:
- Source:Endpoint
- Stage:Privilege Escalation
- Stage:Persistence
dataset:
- https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1053.006/service_systemd/sysmon_linux.log
impact: 60
kill_chain_phases:
- Exploitation
message: a commandline $process$ that may create or start a service on $dest
mitre_attack_id:
- T1053.006
- T1053
nist:
- DE.CM
observable:
- name: dest
type: Hostname
role:
- Victim
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
risk_score: 42
security_domain: endpoint
asset_type: Endpoint