Skip to content
RCE Advisory Intermediate CVE-2017-14459

Moxa AWK-3131A Multiple Features Login Username Parameter OS Command Injection Vulnerability

The login username field of the Telnet, SSH and console services was passed into a shell command used to log failed authentication attempts, so an unauthenticated attacker could run operating system commands as root. This gave remote root-level command execution, and the authors confirmed it on Telnet, SSH and the console port.

Patrick DeSantis Follow

Originally disclosed on Cisco Talos

Critical 10.0 View original

An exploitable OS Command Injection vulnerability exists in the Telnet, SSH, and console login functionality of Moxa AWK-3131A Industrial IEEE 802.11a/b/g/n wireless AP/bridge/client in firmware versions 1.4 to 1.7 (current). An attacker can inject commands via the username parameter of several services (SSH, Telnet…

Patrick DeSantis and Dave McDaniel, on Cisco Talos

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 report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The failed-login logging code formats the username into a command string and passes it to system(), so shell metacharacters in the username are executed.

Impact

An unauthenticated attacker could execute commands as root remotely over Telnet or SSH, or locally via the console port; the web interface was suspected but not confirmed vulnerable.

What the attacker needed

Network access to Telnet or SSH; or physical access to console port

The fix

The text gives no vendor fix; it recommends disabling SSH, Telnet and the web application before deployment and restricting physical access to the console port.

How it was found

  1. Connect to the Telnet or console login prompt.
  2. Enter a username containing a shell command wrapped in backticks.
  3. The device runs the command as root when it logs the failed login.
  4. For SSH, escape the backticks with backslashes in the username.
  5. Redirect output to stderr to see the command's output on the console.

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 you log in, the device writes your username into a log message. It builds that message as a shell command and runs it, so special characters in the username are treated as commands rather than plain text. Because the login runs as the most powerful user (root), anyone who can reach the login prompt can run their own commands without a password.

What is RCE?

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

More from Cisco Talos

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.