Techniques › T1574 › T1574.011
T1574.011 Services Registry Permissions Weakness
stealth · execution — Windows · attack.mitre.org · JSON
1
MITRE detection strategy
1
analytics
11
Sigma rules tagged attack.t1574.011
0
KEV CVEs mapped here
<p>Adversaries may execute their own malicious payloads by hijacking the Registry entries used by services. Flaws in the permissions for Registry keys related to services can allow adversaries to redirect the originally specified executable to one they control, launching their own code when a service starts. Windows stores local service configuration information in the Registry under <code>HKLM\SYSTEM\CurrentControlSet\Services</code>. The information stored under a service's Registry keys can be manipulated to modify a service's execution parameters through tools such as the service controller, sc.exe, PowerShell, or Reg. Access to Registry keys is controlled through access control lists and user permissions.</p><p>If the permissions for users and groups are not properly set and allow access to the Registry keys for a service, adversaries may change the service's binPath/ImagePath to point to a different executable under their control. When the service starts or is restarted, the adversary-controlled program will execute, allowing the adversary to establish persistence and/or privilege escalation to the account context the service is set to execute under (local/domain account, SYSTEM, LocalService, or NetworkService).</p><p>Adversaries may also alter other Registry keys in the service’s Registry tree. For example, the <code>FailureCommand</code> key may be changed so that the service is executed in an elevated context anytime the service fails or is intentionally corrupted.</p><p>The <code>Performance</code> key contains the name of a driver service's performance DLL and the names of several exported functions in the DLL. If the <code>Performance</code> key is not already present and if an adversary-controlled user has the <code>Create Subkey</code> permission, adversaries may create the <code>Performance</code> key in the service’s Registry tree to point to a malicious DLL.</p><p>Adversaries may also add the <code>Parameters</code> key, which can reference malicious drivers file paths. This technique has been identified to be a method of abuse by configuring DLL file paths within the <code>Parameters</code> key of a given services registry configuration. By placing and configuring the <code>Parameters</code> key to reference a malicious DLL, adversaries can ensure that their code is loaded persistently whenever the associated service or library is invoked.</p><p>For example, the registry path <code>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters</code> contains the <code>AutodiaDLL</code> value, which specifies the DLL to be loaded for autodial funcitionality. An adversary could set the <code>AutodiaDLL</code> to point to a hijacked or malicious DLL:</p><p><code>"AutodialDLL"="c:\temp\foo.dll"</code></p><p>This ensures persistence, as it causes the DLL (in this case, foo.dll) to be loaded each time the Winsock 2 library is invoked.</p>
KEV CVEs mapped to this technique · CTID Mappings Explorer
None. No KEV entry in the public mapping names this technique. Given that 74.7% of KEV has no mapping at all, this says more about the mapping than about the technique.
Detection strategy · ATT&CK Enterprise v19.2
- DET0427 Detection Strategy for Hijack Execution Flow through Service Registry Premission Weakness. v1.0
AN1195 WindowsUnauthorized modification of service-related registry keys such as ImagePath, FailureCommand, ServiceDll, or Performance/Parameters keys. Defender correlates registry modifications, anomalous service metadata changes, and subsequent service process executions that deviate from baseline configurations.Tunable:
MonitoredServiceKeysBaselineServiceConfigTimeWindowPrivilegedAccounts
Sigma rules · SigmaHQ da9bb07d64, tag attack.t1574.011
Author: Teymur Kheirkhabarov
· 2019-10-26 (modified 2024-12-01) · logsource: product=windows category=process_creation · 0f9c21f1-6a73-4b0e-9809-cb562cb8d981
Detect modification of services configuration (ImagePath, FailureCommand and ServiceDLL) in registry by processes with Medium integrity level
Author: Center for Threat Informed Defense (CTID) Summiting the Pyramid Team
· 2023-09-28 · logsource: product=windows service=security · 11d00fff-5dc3-428c-8184-801f292faec0
Detects "read access" requests on the services registry key.
Adversaries may execute their own malicious payloads by hijacking the Registry entries used by services.
Adversaries may use flaws in the permissions for Registry keys related to services to redirect from the originally specified executable to one that they control, in order to launch their own code when a service starts.
Author: Nasreddine Bencherchali (Nextron Systems)
· 2022-10-24 · logsource: product=windows category=ps_script · 22d80745-6f2c-46da-826b-77adaededd74
Detects usage of the "Set-Service" powershell cmdlet to configure a new SecurityDescriptor that allows a service to be hidden from other utilities such as "sc.exe", "Get-Service"...etc. (Works only in powershell 7)
Author: Sreeman
· 2020-09-29 (modified 2023-02-04) · logsource: product=windows category=process_creation · 38879043-7e1e-47a9-8d46-6bec88e201df
Detects the modification of an existing service in order to execute an arbitrary payload when the service is started or killed as a potential method for persistence.
Author: Nasreddine Bencherchali (Nextron Systems)
· 2022-10-17 · logsource: product=windows category=process_creation · 514e4c3a-c77d-4cde-a00f-046425e2301e
Detects usage of the "Set-Service" powershell cmdlet to configure a new SecurityDescriptor that allows a service to be hidden from other utilities such as "sc.exe", "Get-Service"...etc. (Works only in powershell 7)
Author: Nasreddine Bencherchali (Nextron Systems)
· 2022-10-17 · logsource: product=windows category=ps_script · 953945c5-22fe-4a92-9f8a-a9edc1e522da
Detects usage of the "Set-Service" powershell cmdlet to configure a new SecurityDescriptor that allows a service to be hidden from other utilities such as "sc.exe", "Get-Service"...etc. (Works only in powershell 7)
Author: frack113
· 2021-12-30 · logsource: product=windows category=ps_script · 95afc12e-3cbb-40c3-9340-84a032e596a3
Adversaries may execute their own malicious payloads by hijacking the Registry entries used by services.
Adversaries may use flaws in the permissions for registry to redirect from the originally specified executable to one that they control, in order to launch their own code at Service start.
Windows stores local service configuration information in the Registry under HKLM\SYSTEM\CurrentControlSet\Services
Author: Nasreddine Bencherchali (Nextron Systems)
· 2023-02-28 · logsource: product=windows category=process_creation · 98c5aeef-32d5-492f-b174-64a691896d25
Detection of sc.exe utility adding a new service with special permission which hides that service.
Author: frack113
· 2021-12-30 (modified 2024-03-13) · logsource: product=windows category=process_creation · 9b0b7ac3-6223-47aa-a3fd-e8f211e637db
Adversaries may execute their own malicious payloads by hijacking the Registry entries used by services.
Adversaries may use flaws in the permissions for registry to redirect from the originally specified executable to one that they control, in order to launch their own code at Service start.
Windows stores local service configuration information in the Registry under HKLM\SYSTEM\CurrentControlSet\Services
Author: Andreas Hunkeler (@Karneades)
· 2021-12-20 (modified 2022-08-08) · logsource: product=windows category=process_creation · a537cfc3-4297-4789-92b5-345bfd845ad0
Detects usage of the "sc.exe" utility adding a new service with special permission seen used by threat actors which makes the service hidden and unremovable.
Author: Teymur Kheirkhabarov
· 2019-10-26 (modified 2024-12-01) · logsource: product=windows category=process_creation · d937b75f-a665-4480-88a5-2f20e9f9b22a
Detection of sc.exe utility spawning by user with Medium integrity level to change service ImagePath or FailureCommand
Rules tagged at the parent level (attack.t1574) 8
These target the parent technique, not this sub-technique specifically. Listed for completeness, not counted as coverage.
Author: FPT.EagleEye, Thomas Patzke (improvements)
· 2021-06-29 (modified 2022-06-02) · logsource: product=windows category=image_load · 02fb90de-c321-4e63-a6b9-25f4b03dfd14
Detect DLL Load from Spooler Service backup folder. This behavior has been observed during the exploitation of the Print Spooler Vulnerability CVE-2021-1675 and CVE-2021-34527 (PrinterNightmare).
Author: Florian Roth (Nextron Systems), oscd.community, Jonhnathan Ribeiro
· 2019-11-15 (modified 2021-11-27) · logsource: product=windows category=process_creation · 1c373b6d-76ce-4553-997d-8c1da9a6b5f5
Detects exploitation attempt of privilege escalation vulnerability via SetupComplete.cmd and PartnerSetupComplete.cmd described in CVE-2019-1378
Author: Florian Roth (Nextron Systems)
· 2019-07-17 (modified 2023-05-24) · logsource: product=windows category=process_creation · 50919691-7302-437f-8e10-1fe088afa145
Detects a "regsvr32" execution where the DLL doesn't contain a common file extension.
Author: Bhabesh Raj
· 2021-07-01 (modified 2023-02-17) · logsource: product=windows category=file_delete · 5b2bbc47-dead-4ef7-8908-0cf73fcbecbf
Detect DLL deletions from Spooler Service driver folder. This might be a potential exploitation attempt of CVE-2021-1675
Author: frack113
· 2022-08-07 (modified 2023-08-17) · logsource: product=windows category=registry_set · 9827ae57-3802-418f-994b-d5ecf5cd974b
Detects the addition of the "Debugger" value to the "DbgManagedDebugger" key in order to achieve persistence. Which will get invoked when an application crashes
Author: Ivan Dyachkov, Yulia Fomina, oscd.community
· 2020-10-07 (modified 2021-11-27) · logsource: product=windows category=process_creation · a2910908-e86f-4687-aeba-76a5f996e652
Detects using register-cimprovider.exe to execute arbitrary dll file.
Author: Tim Rauch (rule), Elastic (idea)
· 2022-10-21 · logsource: product=windows category=file_event · dbbd9f66-2ed3-4ca2-98a4-6ea985dd1a1c
Detects attempts to create a DLL file to a known desktop application dependencies folder such as Slack, Teams or OneDrive and by an unusual process. This may indicate an attempt to load a malicious module via DLL search order hijacking.
Author: Florian Roth (Nextron Systems)
· 2020-07-01 (modified 2023-08-17) · logsource: product=windows category=registry_set · e0813366-0407-449a-9869-a2db1119dc41
Detects a suspicious printer driver installation with an empty Manufacturer value