Moxa AWK-3131A Encrypted Diagnostic Script Command Injection Vulnerability
An encrypted diagnostic script file can contain arbitrary busybox commands that are executed as root when uploaded by a low-privilege authenticated user. An attacker could gain remote control over the device.
An exploitable command injection vulnerability exists in encrypted diagnostic script functionality of the Moxa AWK-3131A firmware version 1.13. A specially crafted diagnostic script file can cause arbitrary busybox commands to be executed, resulting in remote control over the device.
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 diagnostic script format allows arbitrary command arguments and the device executes them as root without validating or restricting the commands.
Impact
An authenticated low-privilege user could execute arbitrary commands as root, leading to full remote control of the device.
What the attacker needed
Authenticated as a low-privilege user; ability to upload a file to the web portal
How it was found
- Create a diagnostic script file with the required magic header and a loop definition.
- Include a command line that uses a permitted command with arguments to run an arbitrary action.
- Encrypt the script file using the hardcoded password.
- Upload the encrypted file to the web portal's advanced diagnostics feature while authenticated as a low-privilege user.
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.
The device lets users upload a diagnostic script file to run some network commands. The script is encrypted with a hardcoded password, so anyone can create a valid file. The device runs the commands in the file as the root user without checking what they are, so an attacker can run any command and take over the device.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.