InHand Networks InRouter302 console inhand command execution vulnerability
A hidden debug command in the router console decrypts a hard-coded password and, if the user supplies it, spawns a root shell. A low-privileged attacker with valid credentials could therefore gain full command execution on the device.
Originally disclosed on Cisco Talos
A command execution vulnerability exists in the console inhand functionality of InHand Networks InRouter302 V3.5.4. A specially-crafted network request can lead to arbitrary command execution.
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
Likely a leftover debug command that compares user input against a hard-coded AES-encrypted password and then executes a shell without further authorisation.
Impact
An attacker with low-privileged credentials could execute arbitrary commands on the router with the privileges of the console process.
What the attacker needed
Low-privileged credentials; access to telnet or SSH service
The fix
The vendor released updated firmware that removes or secures the debug command.
How it was found
- Log in to the router console with low-privileged credentials.
- Enter the hidden 'inhand' command.
- Provide the correct password when prompted.
- A /bin/sh shell is spawned.
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 router has a secret command that is not shown in the help menu. If you type the right password, it opens a full system shell, which lets you run any command on the device. Because the password is stored in the firmware and can be decrypted, anyone who can log in with a normal account can find it and take over the router.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.