Services Registry Permissions Weakness
Services Registry Permissions Weakness [T1574.011]
Information
Name: Services Registry Permissions Weakness
ID: T1574.011
Technique: T1574
Introduction
The Services Registry Permissions Weakness (T1574.011) is a sub-technique within the MITRE ATT&CK framework under the Hijack Execution Flow (T1574) technique. This sub-technique involves adversaries exploiting weak permissions on Windows services registry keys to elevate privileges, maintain persistence, or execute malicious code. Attackers often leverage improperly configured access control settings, allowing unauthorized users to alter registry entries associated with legitimate Windows services. By manipulating these permissions, adversaries can hijack the execution flow of trusted services, resulting in unauthorized code execution and persistence on compromised systems.
Deep Dive Into Technique
Windows services rely on registry keys located primarily at:
HKLM\SYSTEM\CurrentControlSet\Services\
Each service has its own registry key containing configuration data, including:
Service executable path (
ImagePath
)Startup type (
Start
)Service dependencies (
DependOnService
)
Attackers exploit weak registry permissions by:
Enumerating registry keys of running or installed services to identify keys with overly permissive access control entries (ACEs).
Modifying the
ImagePath
registry value to point to a malicious executable or script.Changing service parameters to influence the execution flow, such as manipulating environment variables or service dependencies.
Restarting the targeted service or waiting for the system to reboot, causing the service to execute attacker-controlled code with elevated privileges.
Key points regarding the exploitation mechanism:
Permissions weaknesses typically arise from misconfigured or improperly secured registry ACLs (Access Control Lists).
Tools such as
regedit.exe
, PowerShell (Get-Acl
,Set-Acl
), or third-party utilities (AccessChk
,icacls
) are commonly utilized by attackers to discover and exploit these weaknesses.Exploitation can lead to privilege escalation, persistence, or lateral movement, depending on the compromised service and its privileges.
When this Technique is Usually Used
Attackers commonly use Services Registry Permissions Weakness (T1574.011) during various stages of an attack lifecycle, including:
Privilege Escalation Stage: Attackers exploit weak permissions to elevate privileges from a regular user to SYSTEM-level permissions by hijacking high-privileged services.
Persistence Stage: Modifying registry entries of services ensures malicious payload execution upon system reboot or service restart, providing long-term persistence.
Defense Evasion: Attackers may leverage trusted Windows services to execute their payloads, thus avoiding suspicion and potentially bypassing antivirus or endpoint detection solutions.
Lateral Movement: Attackers who have compromised one system may exploit registry permissions weaknesses to execute payloads remotely on other systems within the network.
Common scenarios include:
Misconfigured third-party application installers setting overly permissive registry ACLs.
Poorly secured legacy or custom-developed Windows services.
Improperly applied group policy or administrative scripts that unintentionally weaken registry permissions.
How this Technique is Usually Detected
Detection of Services Registry Permissions Weakness involves proactive monitoring, auditing, and analysis of registry permissions and service configurations:
Registry ACL Auditing: Regularly audit registry permissions on critical service keys using tools like
AccessChk
(Sysinternals), PowerShell scripts (Get-Acl
), or vulnerability scanners (Nessus, Qualys).Monitoring for Registry Modifications: Enable and monitor Windows Event Logs (e.g., Event ID 4657, 4663 for registry object access) to detect suspicious or unauthorized registry key modifications.
Endpoint Detection and Response (EDR): Utilize EDR solutions to detect anomalous behavior such as unexpected registry changes or service restarts.
Behavioral Analysis: Identify unusual execution patterns, such as known services executing from uncommon or suspicious executable paths.
Indicators of Compromise (IoCs):
Unexpected or suspicious changes to
ImagePath
values in service registry keys.New or modified service registry entries with unusual executable paths or command-line arguments.
Evidence of unauthorized registry access or modification events in Windows Security or Sysmon logs (Event ID 13 for registry modification).
Why it is Important to Detect This Technique
Early detection of Services Registry Permissions Weakness exploitation is critical due to the severe potential impacts:
Privilege Escalation: Attackers can escalate privileges to SYSTEM-level, gaining complete control over the compromised host.
Persistence: Malicious modifications to service registry keys allow attackers to maintain persistent access across system reboots, complicating remediation.
Defense Evasion: Hijacking legitimate Windows services enables attackers to execute malicious payloads stealthily, potentially evading traditional antivirus and endpoint security detection.
Lateral Movement: Exploitation can facilitate lateral movement within organizational networks, expanding the scope and severity of the compromise.
Data Theft and System Damage: Elevated privileges and persistent access allow attackers to exfiltrate sensitive data, deploy ransomware, or cause significant operational disruption.
Detecting and remediating this technique promptly significantly reduces attacker dwell time, limits damage, and prevents further exploitation.
Examples
Real-world examples and scenarios involving Services Registry Permissions Weakness (T1574.011):
Example 1: CVE-2019-0841 (Windows AppX Deployment Service Privilege Escalation):
Attackers exploited insecure registry permissions on the AppX Deployment Service (
AppXSvc
) registry key.By modifying the
ImagePath
registry value to point to a malicious executable, attackers gained SYSTEM-level privileges upon service restart.Impact: Privilege escalation from standard user to SYSTEM-level privileges.
Example 2: Third-party Application Misconfiguration (Common Scenario):
Poorly designed third-party software installers set overly permissive registry ACLs on service registry keys.
An attacker with low privileges modifies the
ImagePath
to execute malicious payloads.Impact: Persistent access and privilege escalation, enabling attackers to execute arbitrary code with elevated privileges.
Tools Commonly Used by Attackers:
Sysinternals Suite (
AccessChk
,PsExec
)PowerShell scripts (
Get-Acl
,Set-Acl
)Metasploit Framework modules targeting registry permissions weaknesses
Custom scripts or malware designed to enumerate and exploit weak registry permissions
These examples underscore the importance of securing registry permissions, regularly auditing service configurations, and promptly addressing identified vulnerabilities.
Last updated
Was this helpful?