systemd service created
A new or modified systemd service unit — a common Linux persistence mechanism.
What it detects
A new or modified systemd service unit — a common Linux persistence mechanism. Matches writes to /etc/systemd/system/*.service (auditd PATH) or a systemctl enable/daemon-reload command establishing a unit.
MITRE ATT&CK mapping
- T1543.002Create or Modify System Process: Systemd Service· Persistence
False positives and triage
Package installs create systemd units legitimately. Baseline expected units and review new services with unusual ExecStart paths (e.g. /tmp, /home).
The rule
Declarative YAML read by the detection engine — data, never executed. Confidence 70%. Source: rules/linux/systemd_service_created.yaml, licensed under the Apache License 2.0.
id: linux.persistence.systemd_service_created
version: 1.0.0
status: stable
severity: high
confidence: 0.7
platforms: [linux]
mitre_techniques: [T1543.002]
description: |
A new or modified systemd service unit — a common Linux persistence mechanism.
Matches writes to /etc/systemd/system/*.service (auditd PATH) or a `systemctl
enable`/`daemon-reload` command establishing a unit.
match:
raw_message_regex: '(?i)(/etc/systemd/system/[^\s\"]+\.service)|systemctl\s+(enable|link)\b|/lib/systemd/system/[^\s\"]+\.service'
false_positive_guidance: |
Package installs create systemd units legitimately. Baseline expected units and
review new services with unusual ExecStart paths (e.g. /tmp, /home).
Related detections
Run this rule on your own logs — offline
KIROSEC runs this rule and the rest of the library over Windows, Linux, macOS and cloud audit logs on the analyst's own machine. Every alert links to the events that raised it, and nothing leaves the device.
