PEN-200 Windows Privilege Escalation Practice Question
You are attempting to escalate privileges on a Windows target and decide to exploit unquoted service paths. You find a service with the binary path `C:\Program Files\My App\service.exe` and the service is running as LocalSystem. Which condition must be true for this unquoted path to be exploitable?
⚠ Common exam trap
The trap here is assuming that write access to the service's own directory is required, when actually the vulnerability lies in writable parent directories due to missing quotes.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
A directory like `C:\Program.exe` or `C:\Program Files\My.exe` must be writable by your user, and the service must restart.
For an unquoted service path to be exploitable, a writable directory must exist in the search order before the intended executable, such as `C:\Program.exe` or `C:\Program Files\My.exe`. When the service starts, Windows will execute the first found executable from that path. If you can place a malicious binary in a writable location and the service restarts, you gain code execution as the service account.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The service must be configured to run as a domain user with a weak password that can be cracked.
Why it's wrong here
Unquoted service path exploitation does not involve cracking service account passwords. It relies on file system permissions and the way Windows resolves the executable path. The service account's password strength is irrelevant to this technique, so this condition is not required.
- ✓
A directory like `C:\Program.exe` or `C:\Program Files\My.exe` must be writable by your user, and the service must restart.
Why this is correct
Unquoted service paths are exploited by placing a malicious executable in a directory that Windows will search before reaching the intended binary. For the path `C:\Program Files\My App\service.exe`, Windows will try `C:\Program.exe`, then `C:\Program Files\My.exe`, and so on. If any of those locations are writable and the service restarts, your executable runs as LocalSystem.
- ✗
The service must have the `SeImpersonatePrivilege` enabled for the LocalSystem account.
Why it's wrong here
SeImpersonatePrivilege is unrelated to unquoted service path exploitation. This technique works by hijacking the executable search order, not by impersonating tokens. The LocalSystem account already has extensive privileges, and enabling SeImpersonatePrivilege is not a prerequisite for this attack.
- ✗
The directory `C:\Program Files\My App` must have Modify permissions for the Everyone group.
Why it's wrong here
While having write access to the service's own directory could allow replacing the binary, unquoted path exploitation specifically targets parent directories that Windows searches due to missing quotes. Write access to the actual service directory is not necessary for this exploit; the vulnerability lies in writable parent paths.
About these practice questions
This PEN-200 question is part of Courseiva's 285-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official OffSec exam blueprint
This PEN-200 practice question is part of Courseiva's free OffSec certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PEN-200 exam.