Remote command injection through an endpoint security product
The endpoint security product Heimdal Thor did not validate TLS certificates, allowing a man-in-the-middle attacker to intercept and modify update traffic. The attacker could inject commands into the 'beforeInstallScript' and 'afterInstallScript' fields, leading to remote command execution on the client machine.
pentestpartners.com
Published on pentestpartners.com
We discovered command injection in a popular endpoint security product, Heimdal Thor. By using the product, customers PCs were exposed to compromise.
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 write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, certificate validation was bypassed in the software, probably to work around a functionality problem, and this allowed man-in-the-middle attacks.
Impact
An attacker with network access could execute arbitrary commands on affected machines, potentially taking full control, though the attacker must be able to intercept traffic.
What the attacker needed
Attacker can intercept network traffic; victim uses affected Heimdal Thor version
The fix
The issue was fixed by correcting the certificate validation and automatically deploying the update.
How it was found
- Set up a Wi-Fi access point and redirect traffic through an intercepting proxy.
- Connect a Windows laptop running Heimdal Thor to the access point.
- Observe that HTTPS traffic can be intercepted without certificate errors.
- Modify the JSON software update list to add commands in the beforeInstallScript or afterInstallScript fields.
- Wait for the client to update the software, causing the commands to execute.
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 write-up has not been written yet. The Original tab links to the source.
When your computer downloads updates, it should check that it is talking to the real server using a digital certificate. This product skipped that check, so someone on the same Wi-Fi could pretend to be the server and send malicious update instructions. Those instructions included commands that the product would run, giving the attacker control of the computer.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.