Skip to content
RCE Write-up Advanced

Three Steps to the Terminal: A Siemens ROX II Zero-Day Trilogy

Three zero-day vulnerabilities in Siemens ROX II switches can be chained: an arbitrary file disclosure via xz, a command injection in feature key validation, and a command injection in the task scheduler. An attacker could escalate to root and achieve persistent control.

Emmanuel Zhou Follow

Published on unit42.paloaltonetworks.com

We conducted this research in close partnership with Siemens, reflecting our shared commitment to advancing the security and resilience of critical infrastructure.

Emmanuel Zhou, Adam Robbie, Rick Wyble, Miguel Pereira, on unit42.paloaltonetworks.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 causes are: (1) a privileged daemon passing user-supplied parameters to the xz utility, (2) a feature key signature verification function inserting an unsanitised signature string directly into a command executed with system(), and (3) improper sanitisation of task scheduler input fields allowing control characters to be injected into a root cron configuration.

Impact

An attacker could read sensitive files, gain full root access, and establish persistent root-level code execution that survives reboots, severely threatening the integrity and availability of the industrial network.

What the attacker needed

Network access to the switch; authenticated access to web UI; ability to upload feature key files

How it was found

  1. Use the web UI's normal file upload functionality for a feature key to upload a malicious script to a writable directory on the switch.
  2. Craft a new feature key file where the signature field contains a command injection payload designed to execute the previously uploaded script.
  3. Upload the specially crafted feature key, causing the vulnerable verification function to execute the injected command with root privileges.
  4. Use the task scheduler interface to create a new scheduled task, crafting a special input string for some task configuration fields to inject an execution command.
  5. Save the configuration, causing the scheduled task mechanism to process the injected command and execute the attacker's prepared code with root privileges, achieving persistent control.

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.

These are three separate software flaws in industrial network switches. The first lets an attacker read any file on the device, the second lets them run commands as the all-powerful root user, and the third lets them keep those commands running even after a reboot. Together they give an attacker complete control of the switch.

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.