Persistence · Privilege Escalation · ATT&CK v20
T1543.002 Create or Modify System Process: Systemd Service
A Persistence technique. Keeping access across reboots, password changes and clean-ups.
- T1543.002Technique ID
- Persistence, Privilege EscalationTactics
- 2Places taught
What the attacker does
The attacker creates or changes a systemd service on Linux so their program starts at boot and restarts if it dies.
How it shows up in the logs
- A new or changed unit file in /etc/systemd/system or ~/.config/systemd/user (auditd, file integrity monitoring).
- systemctl enable or daemon-reload in auditd execve records.
- A service whose ExecStart points to /tmp, /dev/shm or a hidden folder.
Questions to ask in triage
- What does the unit run, as which user?
- Who created it and when?
- Stop, disable and remove it, and find how they got root.
Read T1543.002 on attack.mitre.org
A sub-technique of T1543.
Where you meet it in CyberSim
In the L3 war room
- A miner was installed on the database server as a systemd service named like a kernel thread.
In the theory
More Persistence techniques
- T1053.003 Scheduled Task/Job: Cron
- T1053.005 Scheduled Task/Job: Scheduled Task
- T1098 Account Manipulation
- T1098.003 Account Manipulation: Additional Cloud Roles
- T1098.004 Account Manipulation: SSH Authorized Keys
- T1098.005 Account Manipulation: Device Registration
- T1136.001 Create Account: Local Account
- T1136.002 Create Account: Domain Account
- T1505.003 Server Software Component: Web Shell
- T1543.003 Create or Modify System Process: Windows Service
- T1547.001 Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder
- T1556.006 Modify Authentication Process: Multi-Factor Authentication
Source: MITRE ATT&CK T1543.002, tactic TA0003.