Adversaries may create or modify system-level processes to repeatedly execute malicious payloads as part of persistence. When operating systems boot up, they can start processes that perform background system functions. On Windows and Linux, these system processes are referred to as services.[1] On macOS, launchd processes known as Launch Daemon and Launch Agent are run to finish system initialization and load user specific parameters.[2]
Adversaries may install new services, daemons, or agents that can be configured to execute at startup or a repeatable interval in order to establish persistence. Similarly, adversaries may modify existing services, daemons, or agents to achieve the same effect.
Services, daemons, or agents may be created with administrator privileges but executed under root/SYSTEM privileges. Adversaries may leverage this functionality to create or modify system processes in order to escalate privileges.[3]
ID | Name | Description |
---|---|---|
S0401 | Exaramel for Linux |
Exaramel for Linux has a hardcoded location that it uses to achieve persistence if the startup system is Upstart or System V and it is running as root.[4] |
S1152 | IMAPLoader |
IMAPLoader modifies Windows tasks on the victim machine to reference a retrieved PE file through a path modification.[5] |
S1121 | LITTLELAMB.WOOLTEA |
LITTLELAMB.WOOLTEA can initialize itself as a daemon to run persistently in the background.[6] |
S1142 | LunarMail |
LunarMail can create an arbitrary process with a specified command line and redirect its output to a staging directory.[7] |
ID | Mitigation | Description |
---|---|---|
M1047 | Audit |
Use auditing tools capable of detecting privilege and service abuse opportunities on systems within an enterprise and correct them. |
M1040 | Behavior Prevention on Endpoint |
On Windows 10, enable Attack Surface Reduction (ASR) rules to prevent an application from writing a signed vulnerable driver to the system.[8] On Windows 10 and 11, enable Microsoft Vulnerable Driver Blocklist to assist in hardening against third party-developed drivers.[9] |
M1045 | Code Signing |
Enforce registration and execution of only legitimately signed service drivers where possible. |
M1033 | Limit Software Installation |
Restrict software installation to trusted repositories only and be cautious of orphaned software packages. |
M1028 | Operating System Configuration |
Ensure that Driver Signature Enforcement is enabled to restrict unsigned drivers from being installed. |
M1026 | Privileged Account Management |
Manage the creation, modification, use, and permissions associated to privileged accounts, including SYSTEM and root. |
M1022 | Restrict File and Directory Permissions |
Restrict read/write access to system-level process files to only select privileged users who have a legitimate need to manage system services. |
M1054 | Software Configuration |
Where possible, consider enforcing the use of container services in rootless mode to limit the possibility of privilege escalation or malicious effects on the host running the container. |
M1018 | User Account Management |
Limit privileges of user accounts and groups so that only authorized administrators can interact with system-level process changes and service configurations. |
ID | Data Source | Data Component | Detects |
---|---|---|---|
DS0017 | Command | Command Execution |
Command-line invocation of tools capable of modifying services may be unusual, depending on how systems are typically used in a particular environment. Look for abnormal process call trees from known services and for execution of other commands that could relate to Discovery or other adversary techniques. |
DS0032 | Container | Container Creation |
Monitor for newly constructed containers that repeatedly execute malicious payloads as part of persistence or privilege escalation. |
DS0027 | Driver | Driver Load |
Monitor for new service driver installations and loads (ex: Sysmon Event ID 6) that are not part of known software update/patch cycles. |
DS0022 | File | File Creation |
Monitor for newly constructed files that may create or modify system-level processes to repeatedly execute malicious payloads as part of persistence. |
File Modification |
Monitor for changes to files associated with system-level processes. |
||
DS0009 | Process | OS API Execution |
Monitor for API calls that may create or modify system-level processes to repeatedly execute malicious payloads as part of persistence. |
Process Creation |
New, benign system processes may be created during installation of new software. |
||
DS0019 | Service | Service Creation |
Monitor for newly constructed services/daemons that may create or modify system-level processes to repeatedly execute malicious payloads as part of persistence. |
Service Modification |
Monitor for changes to system processes that do not correlate with known software, patch cycles, etc., including by comparing results against a trusted system baseline. |
||
DS0024 | Windows Registry | Windows Registry Key Creation |
Monitor for newly constructed windows registry keys that may create or modify system-level processes to repeatedly execute malicious payloads as part of persistence. |
Windows Registry Key Modification |
Monitor for changes to windows registry keys and/or values that may create or modify system-level processes to repeatedly execute malicious payloads as part of persistence. |