module
Windows Service Trusted Path Privilege Escalation
Disclosed | Created |
---|---|
10/25/2001 | 05/30/2018 |
Disclosed
10/25/2001
Created
05/30/2018
Description
This module exploits a logic flaw due to how the lpApplicationName parameter
is handled. When the lpApplicationName contains a space, the file name is
ambiguous. Take this file path as example: C:\program files\hello.exe;
The Windows API will try to interpret this as two possible paths:
C:\program.exe, and C:\program files\hello.exe, and then execute all of them.
To some software developers, this is an unexpected behavior, which becomes a
security problem if an attacker is able to place a malicious executable in one
of these unexpected paths, sometimes escalate privileges if run as SYSTEM.
Some software such as OpenVPN 2.1.1, OpenSSH Server 5, and others have the
same problem.
The offensive technique is also described in Writing Secure Code (2nd Edition),
Chapter 23, in the section "Calling Processes Security" on page 676.
is handled. When the lpApplicationName contains a space, the file name is
ambiguous. Take this file path as example: C:\program files\hello.exe;
The Windows API will try to interpret this as two possible paths:
C:\program.exe, and C:\program files\hello.exe, and then execute all of them.
To some software developers, this is an unexpected behavior, which becomes a
security problem if an attacker is able to place a malicious executable in one
of these unexpected paths, sometimes escalate privileges if run as SYSTEM.
Some software such as OpenVPN 2.1.1, OpenSSH Server 5, and others have the
same problem.
The offensive technique is also described in Writing Secure Code (2nd Edition),
Chapter 23, in the section "Calling Processes Security" on page 676.
Author
sinn3r
Platform
Windows
References
Module Options
To display the available options, load the module within the Metasploit console and run the commands ‘show options’ or ‘show advanced’:
msf > use exploit/windows/local/trusted_service_path msf /(h) > show actions ...actions... msf /(h) > set ACTION < action-name > msf /(h) > show options ...show and set options... msf /(h) > run

NEW
Explore Exposure Command
Confidently identify and prioritize exposures from endpoint to cloud with full attack surface visibility and threat-aware risk context.