(Pwn2Own) Triangle MicroWorks SCADA Data Gateway GTWWebMonitorService Unquoted Search Path Remote Code Execution Vulnerability
The GTWWebMonitorService service on Triangle MicroWorks SCADA Data Gateway has an unquoted search path containing spaces, allowing an attacker to execute arbitrary code as root. Authentication is required but can be bypassed.
This vulnerability allows remote attackers to execute code on affected installations of Triangle MicroWorks SCADA Data Gateway. Although authentication is required to exploit this vulnerability, the existing authentication mechanism can be bypassed.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The service executable path contains spaces and is not enclosed in quotation marks, so Windows interprets parts of the path as separate commands.
Impact
An attacker could execute arbitrary code with root privileges, but authentication is required and the existing authentication mechanism can be bypassed.
What the attacker needed
Authentication (bypassable); ability to place a file in a searched path
The fix
The vendor has issued an update to correct this vulnerability.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a Windows service starts, it looks for its program file using a path that may contain spaces. If that path is not wrapped in quotation marks, Windows tries to run each part of the path as a separate program. An attacker who can place a malicious file with the right name in a folder earlier in the search order can get their code to run with the service's high privileges.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.