nerdexam
CompTIA

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.

Post-exploitation and lateral movement

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)
  • A
    5% (1)
  • C
    11% (2)
  • D
    84% (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.

AAttempt to crack the service account passwords.

Unquoted service paths do not expose service account credentials; extracting passwords requires a separate technique such as credential dumping or hash capture from memory.

BAttempt DLL hijacking attacks.

DLL hijacking exploits missing or incorrectly ordered DLL search paths, not the ambiguity in unquoted executable service paths.

CAttempt to locate weak file and folder permissions.

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.

DAttempt privilege escalation attacks.Correct

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

#unquoted service paths#privilege escalation#Windows services#local privilege escalation

Community Discussion

No community discussion yet for this question.

Full PT0-001 Practice