Skip to content
RCE Advisory Intermediate CVE-2022-26042

InHand Networks InRouter302 daretools binary OS command injection vulnerability

A hidden debug command in the router console runs a binary that passes user input straight to a shell command. An attacker with low-privileged console access and the hard-coded password could run arbitrary commands on the device.

Francesco Benvenuto Follow

Originally disclosed on Cisco Talos

Critical 9.9 View original

An OS command injection vulnerability exists in the daretools binary functionality of InHand Networks InRouter302 V3.5.4. A specially-crafted network request can lead to arbitrary command execution.

Francesco Benvenuto, 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 daretools binary passes user-supplied input directly to the system() function without sanitising shell metacharacters, and the hidden inhand command is protected only by a hard-coded password.

What the attacker needed

Low-privileged console login; knowledge of the hard-coded password; telnet or SSH access to the router

The fix

The vendor released updated firmware; the underlying fix should remove the hidden debug command and stop passing user input to a shell.

How it was found

  1. Log in to the router console over telnet or SSH with low-privileged credentials.
  2. Run the hidden inhand command and supply the correct password.
  3. When prompted for a test command, enter a value starting with 'a' or 'r' followed by shell metacharacters and a command.
  4. The injected command runs in a shell on the device.

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.

This router has a hidden command that asks for a password and then starts a test tool. That tool takes whatever you type and runs it as a system command, so typing extra shell instructions after a letter like 'a' makes the router execute them. Anyone who can log in with a normal low-privilege account and knows the hidden password can take full control of 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.

More by Francesco Benvenuto

View all

152 more disclosed reports, best first.

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.