Abuse of Shell Open Registry Keys for Persistence and UAC Bypass
Adversaries manipulate Windows shell open command registry keys to facilitate User Account Control (UAC) bypass and establish persistence through file association hijacking.
Windows shell open registry keys, specifically those under "ms-settings" and "exefile", represent a critical surface for privilege escalation and persistence. Attackers manipulate these keys to hijack file associations or exploit high-integrity processes that trust these registry locations, such as fodhelper.exe. By injecting custom commands or symbolic links into these paths, attackers can force the operating system to execute arbitrary payloads with elevated privileges or upon specific system triggers. This technique is well-documented in UAC bypass research and has been observed in various malware campaigns, including infostealers like Lokibot. Defenders must monitor these registry paths for unauthorized modifications, as they are rarely changed by legitimate administrative activity.
Attack Chain
- Attacker gains initial access to the target system as a low-privileged user.
- Attacker identifies a target registry key (e.g., HKCU\Software\Classes\ms-settings\shell\open\command) for manipulation.
- Attacker modifies the "(Default)" value or adds a "DelegateExecute" entry to the targeted registry key.
- Attacker inserts a path to a malicious executable or a command string into the registry value.
- Attacker triggers a legitimate high-integrity process (e.g., fodhelper.exe) that queries the hijacked registry key.
- The system executes the attacker-controlled path due to the hijacked association.
- Attacker achieves local privilege escalation or established persistence under the security context of the triggered process.
Impact
Successful manipulation of these keys allows adversaries to bypass UAC prompts, enabling them to execute malicious code in high-integrity contexts without user consent. This capability is frequently used to escalate privileges, deploy persistent backdoors, and maintain long-term access to compromised systems, significantly increasing the risk of widespread data exfiltration and ransomware deployment.
Recommendation
Deploy the provided Sigma rule to monitor for unauthorized modifications to shell open registry keys. Prioritize alerting on writes to the specified paths, excluding known-good COM object CLSIDs that are used by legitimate system functions.
Immediate actions
Deploy the Sigma rule to detect registry modifications to ms-settings and exefile paths.
Threat Hunt
Search for unauthorized SetValue events on shell open command keys in registry audit logs.
Data: Registry modification logs (EID 12/13/14)
Mitigations
Enforce strict GPOs or EDR policies to restrict modifications to Classes and shell-related registry keys.
T1548.002
Detection coverage 1
Detect Shell Open Registry Keys Manipulation
highDetects manipulation of shell open command registry keys commonly abused for UAC bypass or persistence.
Detection queries are available on the platform. Get full rules →