Skip to content
RCE Write-up Intermediate

rConfig v3.9.2 authenticated and unauthenticated RCE (CVE-2019-16663) and (CVE-2019-16662)

Two remote code execution vulnerabilities were found in rConfig: an unauthenticated one in ajaxServerSettingsChk.php via the rootUname parameter, and an authenticated one in search.crud.php via the catCommand parameter. An attacker could execute arbitrary OS commands on the server, leading to a shell.

shells.systems

Published on shells.systems

rConfig is an open source network device configuration management utility for network engineers to take frequent configuration snapshots of their network devices.

The author, on shells.systems

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

Root cause

Likely the application concatenated user-supplied input directly into shell commands passed to exec() without sanitisation or escaping.

Impact

An attacker could execute arbitrary commands on the server, leading to a reverse shell; the unauthenticated flaw requires no credentials, while the authenticated one requires valid login.

What the attacker needed

For unauthenticated RCE: none; For authenticated RCE: valid credentials

How it was found

  1. Send a GET request to the ajaxServerSettingsChk.php file with a crafted rootUname parameter containing a command injection payload.
  2. For the authenticated RCE, log in and send a GET request to search.crud.php with searchTerm and catCommand parameters, where catCommand contains the injection payload.
  3. Use a sleep command to confirm command execution by observing a delay in the response.
  4. Use a PHP reverse shell payload to obtain an interactive shell.

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.

Remote code execution (RCE) means an attacker can run their own commands on a server. In this case, the application took user input and passed it directly to a system command without checking it, so an attacker could add extra commands. The first flaw needed no login, the second needed a valid account.

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.