T1543: Create or Modify System Process
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. On macOS, launchd processes known as Launch Daemon and Launch Agent are run to finish system initialization and load user specific parameters.
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.
Positive Technologies products that cover the technique
Detection
To detect creation and modification of services, PT NAD has several detection rules and a special module.
Examples of PT NAD detection rules
- ATTACK AD [PTsecurity] SCM Create remote service (sid 10004786)
- ATTACK [PTsecurity] WMI Service Create (sid 10008740)
PT NAD detection modules
- Remote creation or modification of Windows services
Detection
ID | DS0019 | Data source and component | Service: Service Modification | Description | 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. |
---|
ID | DS0027 | Data source and component | Driver: Driver Load | Description | Monitor for new service driver installations and loads (ex: Sysmon Event ID 6) that are not part of known software update/patch cycles. |
---|
ID | DS0032 | Data source and component | Container: Container Creation | Description | Monitor for newly constructed containers that repeatedly execute malicious payloads as part of persistence or privilege escalation. |
---|
ID | DS0009 | Data source and component | Process: Process Creation | Description | New, benign system processes may be created during installation of new software. |
---|
ID | DS0009 | Data source and component | Process: OS API Execution | Description | Monitor for API calls that may create or modify system-level processes to repeatedly execute malicious payloads as part of persistence. |
---|
ID | DS0024 | Data source and component | Windows Registry: Windows Registry Key Modification | Description | 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. |
---|
ID | DS0017 | Data source and component | Command: Command Execution | Description | 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. |
---|
ID | DS0024 | Data source and component | Windows Registry: Windows Registry Key Creation | Description | Monitor for newly constructed windows registry keys that may create or modify system-level processes to repeatedly execute malicious payloads as part of persistence. |
---|
ID | DS0022 | Data source and component | File: File Modification | Description | Monitor for changes to files associated with system-level processes. |
---|
ID | DS0022 | Data source and component | File: File Creation | Description | Monitor for newly constructed files that may create or modify system-level processes to repeatedly execute malicious payloads as part of persistence. |
---|
ID | DS0019 | Data source and component | Service: Service Creation | Description | Monitor for newly constructed services/daemons that may create or modify system-level processes to repeatedly execute malicious payloads as part of persistence. |
---|
Mitigation
ID | M1018 | Name | User Account Management | Description | Limit privileges of user accounts and groups so that only authorized administrators can interact with system-level process changes and service configurations. |
---|
ID | M1022 | Name | Restrict File and Directory Permissions | Description | Restrict read/write access to system-level process files to only select privileged users who have a legitimate need to manage system services. |
---|
ID | M1026 | Name | Privileged Account Management | Description | Manage the creation, modification, use, and permissions associated to privileged accounts, including SYSTEM and root. |
---|
ID | M1028 | Name | Operating System Configuration | Description | Ensure that Driver Signature Enforcement is enabled to restrict unsigned drivers from being installed. |
---|
ID | M1033 | Name | Limit Software Installation | Description | Restrict software installation to trusted repositories only and be cautious of orphaned software packages. |
---|
ID | M1040 | Name | Behavior Prevention on Endpoint | Description | On Windows 10, enable Attack Surface Reduction (ASR) rules to prevent an application from writing a signed vulnerable driver to the system. On Windows 10 and 11, enable Microsoft Vulnerable Driver Blocklist to assist in hardening against third party-developed drivers. |
---|
ID | M1045 | Name | Code Signing | Description | Enforce registration and execution of only legitimately signed service drivers where possible. |
---|
ID | M1047 | Name | Audit | Description | Use auditing tools capable of detecting privilege and service abuse opportunities on systems within an enterprise and correct them. |
---|
ID | M1054 | Name | Software Configuration | Description | 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. |
---|