Skip to content
RCE Disclosed report Intermediate

GlassWireSetup.exe subject to EXE planting attack

GlassWireSetup.exe runs CertUtil.exe using an unqualified path, so a malicious CertUtil.exe placed in the user's Downloads folder is executed instead of the legitimate Windows tool. An attacker who can place a file in that folder could achieve code execution without the usual Windows security warning.

ericlaw Follow

Originally disclosed on HackerOne

Bounty$100 View original
  • Fixed in 17 days
  • Paid in 17 days
  • Disclosed after 38 days

GlassWire recently fixed a DLL hijacking attack whereby trojan DLLs would be loaded from the user's \Downloads\ folder.

However, it appears that GlasswireSetup.exe still uses an unqualified path when running CertUtil.exe and as a consequence a trojaned CertUtil.exe will execute from the \Downloads\ folder. Interestingly, it executes without any security warning that Windows would normally show for a downloaded executable run from the shell (suggesting that CreateProcess was used rather than ShellExecute).

To fix this, it might make the most sense to set the current working directory to the System folder early in the Setup process.

Attachments

TrojanCertUtil.png
TrojanCertUtil.png From the original on HackerOne

The original report as published on HackerOne, by ericlaw. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

Likely the installer calls CertUtil.exe by name without a full path, so Windows resolves it relative to the current working directory, which can be the user's Downloads folder.

Impact

A trojaned CertUtil.exe in the Downloads folder would execute when the installer runs, without the security warning Windows normally shows for a downloaded executable.

What the attacker needed

Attacker can write a file to the victim's Downloads folder; victim runs GlassWireSetup.exe

The fix

The installer should set its current working directory to the System folder early in setup.

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 program starts another program, it should give the full, exact location of that program. If it only gives a name, Windows may look in the current folder first, and an attacker can put a fake program with that name there. Here, the installer looked for CertUtil.exe in the Downloads folder, so a fake copy would run instead of the real one.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by ericlaw

View all

3 more disclosed reports, best first.

More from GlassWire

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.