PT0-001 · Question #123
A penetration tester locates a few unquoted service paths during an engagement. Which of the following can the tester attempt to do with these?
The correct answer is D. Attempt privilege escalation attacks. Unquoted service paths in Windows allow an attacker to place a malicious executable in a parent directory that the Service Control Manager executes with the service's elevated privileges, enabling privilege escalation.
Question
A penetration tester locates a few unquoted service paths during an engagement. Which of the following can the tester attempt to do with these?
Options
- AAttempt to crack the service account passwords.
- BAttempt DLL hijacking attacks.
- CAttempt to locate weak file and folder permissions.
- DAttempt privilege escalation attacks.
How the community answered
(19 responses)- A5% (1)
- C11% (2)
- D84% (16)
Why each option
Unquoted service paths in Windows allow an attacker to place a malicious executable in a parent directory that the Service Control Manager executes with the service's elevated privileges, enabling privilege escalation.
Unquoted service paths do not expose service account credentials; extracting passwords requires a separate technique such as credential dumping or hash capture from memory.
DLL hijacking exploits missing or incorrectly ordered DLL search paths, not the ambiguity in unquoted executable service paths.
Identifying weak file and folder permissions is a distinct enumeration step; unquoted service paths specifically enable code execution through path parsing ambiguity, not through permission weaknesses on existing files.
When a Windows service executable path contains spaces and is not enclosed in quotation marks, the Service Control Manager attempts to resolve the path by executing at each space-delimited segment before reaching the intended binary. An attacker with write access to an earlier directory in the path can place a malicious executable that Windows runs under the service's elevated account, achieving local privilege escalation.
Concept tested: Windows unquoted service path privilege escalation
Source: https://learn.microsoft.com/en-us/windows/win32/services/service-control-manager
Topics
Community Discussion
No community discussion yet for this question.