Skip to content
RCE Write-up Intermediate

Remote Code Execution vulnerability in Inteno's Iopsys

An authenticated user could modify the DHCP daemon's lease trigger setting to point to an arbitrary script, which then executed as root when a new DHCP lease was granted. By creating a Samba share and uploading a script, the attacker could gain a root shell on the router.

blog.nns.ee

Published on blog.nns.ee

I've discovered a remote code execution vulnerability in the latest version of Iopsys router software. This affects all Inteno routers and is caused by the dhcp daemon.

The author, on blog.nns.ee

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

Impact

An authenticated attacker with the default low-privileged credentials could execute arbitrary code as root, leading to full compromise of the router; however, uploaded files sometimes disappeared after reboot, making triggering inconsistent.

What the attacker needed

Authenticated access as low-privileged user; default WiFi key or 'user' password; Samba share feature enabled; ability to upload files via SMB

The fix

The vendor developed a patch to fix this issue.

How it was found

  1. Authenticate to the router's ubus JSON-RPC interface with the low-privileged user credentials.
  2. Set the DHCP daemon's lease trigger to a path on the Samba mount and commit the change.
  3. Create a Samba share pointing to /mnt and enable Samba, then commit.
  4. Upload a malicious script to the share using smbclient.
  5. Restart the DHCP daemon and wait for a new lease to trigger the script.
  6. Connect to the router as root using the SSH key added by the script.

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.

The router's DHCP service runs a helper program whenever it hands out a network address. The router let a logged-in user change which program that was, and it ran with the highest privileges. The attacker uploaded their own script through a file-sharing feature and waited for the router to run it, giving them full control.

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.