Potential Exploitation of an Unquoted Service Path Vulnerability
This rule detects potential exploitation of unquoted service path vulnerabilities, where adversaries may escalate privileges by placing a malicious executable in a higher-level directory within the path of an unquoted service executable.
Unquoted service paths in Windows can be exploited to escalate privileges. When a service path lacks quotes, Windows may execute a malicious executable placed in a higher-level directory. This detection rule identifies suspicious processes starting from common unquoted paths, like “C:\Program.exe” or executables within “C:\Program Files (x86)\” or “C:\Program Files\”, signaling potential exploitation attempts. The rule aims to detect early stages of privilege escalation threats. This rule is designed for data generated by Elastic Defend, Microsoft Defender XDR, SentinelOne Cloud Funnel, Sysmon, Windows Security Event Logs, and Crowdstrike.
Attack Chain
- An attacker identifies a service running with an unquoted path, such as “C:\Program Files\Unquoted Path Service\Common\Service.exe”.
- The attacker places a malicious executable named “Program.exe” in “C:"
- The operating system attempts to start the service “C:\Program Files\Unquoted Path Service\Common\Service.exe”.
- Due to the unquoted path, the OS incorrectly parses the path and first attempts to execute “C:\Program.exe”.
- The malicious “Program.exe” executes with the privileges of the service account.
- The malicious executable performs actions to escalate privileges, such as adding a user to the local administrators group.
- The attacker gains elevated access to the system.
Impact
Successful exploitation of an unquoted service path vulnerability can lead to complete system compromise, as the attacker gains the privileges of the service account. This can allow the attacker to install programs, view, change, or delete data, or create new accounts with full user rights. The impact is high, potentially leading to a loss of confidentiality, integrity, and availability of the affected system.
Recommendation
- Review process executable paths to confirm if they match the patterns specified in the rule query, such as “?:\Program.exe” or executables within “C:\Program Files (x86)\” or “C:\Program Files\”.
- Deploy the Sigma rule “Potential Exploitation of an Unquoted Service Path Vulnerability” to your SIEM and tune for your environment.
- Enable Sysmon process-creation logging with Event ID 1 to activate the Sigma rules above.
- Conduct a thorough review of service configurations to identify and correct any unquoted service paths as part of remediation steps.
Detection coverage 2
Potential Exploitation of an Unquoted Service Path Vulnerability
lowDetects potential exploitation of unquoted service path vulnerabilities by identifying processes executing from common unquoted paths.
Suspicious Process Executing from Root Drive
mediumDetects processes executing directly from the root of a drive, which is often associated with unquoted path exploitation.
Detection queries are kept inside the platform. Get full rules →