Skip to content
RCE Write-up Advanced

Understanding the vulnerabilities

Multiple vulnerabilities in WAGO's dataagent service and related components allow an attacker with control of an Azure IoT Hub instance to send malicious firmware update commands, leading to OS command injection and ultimately root access on the device. The flaws include improper host validation, command injection in firmware update handling, and information exposure of admin credentials.

blog.talosintelligence.com

Published on blog.talosintelligence.com

WAGO makes several programmable automation controllers that are used in many industries including automotive, rail, power engineering, manufacturing and building management. Cisco Talos discovered 41 vulnerabilities in their PFC200 and PFC100 controllers.

The author, on blog.talosintelligence.com

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 the root cause is insufficient validation and sanitisation of cloud-supplied data, combined with running critical services with elevated privileges.

What the attacker needed

Access to an Azure IoT Hub instance; ability to configure the device's cloud connection; WBM admin credentials (leaked via timing attack)

The fix

WAGO released a firmware update to resolve the issues.

How it was found

  1. Leak the WBM admin password hash using a timing attack against the PHP crypt() function.
  2. Crack the hash to obtain the admin password.
  3. Configure the dataagent service to connect to an attacker-controlled Azure IoT Hub instance.
  4. Send a crafted firmware update command to the device via MQTT.
  5. For attack chain 1, host a malicious XML control file and a shell script, then trigger the firmware update to execute the script as root.
  6. For attack chain 2, use the firmware update to place a malicious iocheckCache.xml file, then send a message to iocheckd to execute the injected command as root.

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.

This report describes security holes in WAGO industrial controllers. An attacker who can set up a fake cloud service can trick the device into running harmful commands, eventually taking full control. The problems include weak checks on which cloud server the device trusts and unsafe handling of firmware update messages.

What is RCE?

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

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.