Skip to content
RCE Write-up Intermediate

Why boring?

The blog post describes several vulnerabilities in IoT/ICS data concentrators, including command injection via a password change field and a PPP configuration form, and a path traversal file download bug. An attacker could achieve remote code execution or read arbitrary files, potentially compromising the device and sensitive data.

redtimmy.com

Published on redtimmy.com

In one of my many previous lives, I worked as principal penetration tester/team leader in the OT area, verifying the full security of more than a dozen of IoT and ICS devices. Switching from IT to OT seemed to be an exciting step, but honestly I got bored pretty soon, and after one year and a half I retired.

The author, on redtimmy.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 improper input sanitisation: a function that tried to escape single quotes failed to handle non-URL-encoded input and used eval() before validation, and another function removed '..' non-recursively, allowing path traversal.

Impact

An attacker could execute arbitrary commands as root and download sensitive files, leading to full device compromise and data theft.

What the attacker needed

Access to the web interface; guest account with default password (for first bug); ability to submit crafted HTTP requests

How it was found

  1. Log in to the web admin interface with the undocumented guest account.
  2. Go to the change password page and enter a shell command after a single quote and semicolon in the password_text parameter.
  3. The command executes, allowing password change and SSH access.
  4. For the file disclosure bug, submit a crafted request with a pipe character between dots to bypass sanitisation and read /etc/passwd.
  5. For the PPP RCE, fill the PPP configuration form with a username and a password containing a connect option with a shell command.
  6. Submit the form; the pppd command is built and executed, running 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 is a story about security bugs found in industrial devices that control electricity meters. The author found ways to run commands on the devices and download files without permission, simply by typing special characters into web forms. These mistakes let attackers take over the devices.

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.