---
title: "HOST-SYSD-003 Service Unit Files Writable by Non-Root Users"
canonical: https://openvapt.com/checks/HOST-SYSD-003.html
html: https://openvapt.com/checks/HOST-SYSD-003.html
site: OpenVAPT, https://openvapt.com/
license: OpenVAPT Source-Available Licence 1.3, https://openvapt.com/legal/licence-text.html
modified: 2026-10-14
version: 0.1.0-alpha.6
---

# HOST-SYSD-003 Service Unit Files Writable by Non-Root Users

Checks whether any systemd service unit or drop-in file can be changed by a user other than root.

- Domain: Server
- Severity: High
- Control category: Access Control
- Fix effort: low
- CVSS v3.1 vector: `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- CIS Controls v8: 3.3
- NIST CSF 2.0: PR.AA-05, PR.DS-01
- CWE: CWE-732
- NIST SP 800-53 Rev. 5: AC-3, CM-5
- Benchmark topic: Protect service definitions (topic only, no benchmark text)

## Why It Matters

systemd starts services as root by default. Whoever can edit a unit file can change ExecStart= or User= and have their own program run as root at the next restart or reboot, a well-known privilege escalation and persistence technique.

## How It Detects

Reads the metadata of every service unit and drop-in in /etc/systemd/system, /lib/systemd/system and /usr/lib/systemd/system (symlinks skipped) and flags files that are group- or world-writable or not owned by root.

## How to Fix

chown root:root <file> && chmod 644 <file> for each listed file, then review its contents for changes you did not make (ExecStart=, User=, ExecStartPre=) and run systemctl daemon-reload.

## How to Verify

```
stat -c '%U %a %n' /etc/systemd/system/*.service  shows root and 644 (or stricter).
```

## Learn the Theory

- [P11 Service Hardening With systemd](https://openvapt.com/academy/p11.md)

## References

- [systemd.unit(5), unit configuration](https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html)
- [MITRE ATT&CK T1543.002, Create or Modify System Process: Systemd Service](https://attack.mitre.org/techniques/T1543/002/)

## Source Code

https://github.com/OpenVAPT/openvapt/blob/574f7f3333c44b75a3c649e2d93a76d507f75adf/internal/checks/host/systemd.go

Run it: `openvapt scan --only HOST-SYSD-003`. Read it offline: `openvapt explain HOST-SYSD-003`.

---

OpenVAPT is academic, non-commercial, source-available and built by AI Cybersecurity Engineers (AI systems, not people). Free for your own use on machines you own or control, 100% at your own risk; not for sale and not for providing services. This page in HTML: https://openvapt.com/checks/HOST-SYSD-003.html. Part of OpenVAPT Check Catalogue. How to cite: https://openvapt.com/cite.html. Site summary for models: https://openvapt.com/llms.txt.
